示例#1
0
  /** {@inheritDoc} */
  public void start() {

    Video v = getVideo();
    if (v != null) {

      try {

        File tmp = File.createTempFile("generate", ".png");
        setImageFile(tmp);
        ThumbnailerJob job = new ThumbnailerJob(v.getPath(), tmp.getPath(), 300);
        job.addJobListener(this);
        JobContainer jc = JobManager.getJobContainer(job);
        jc.start();
        setTerminate(false);

      } catch (IOException ex) {
      }
    }
  }
示例#2
0
  /** {@inheritDoc} */
  public void start(BundleContext bc) {

    setBundleContext(bc);

    SchedulesDirectProgramData pd = new SchedulesDirectProgramData();
    setSchedulesDirectProgramData(pd);

    Db4oServiceTracker t = new Db4oServiceTracker(bc, pd);
    setDb4oServiceTracker(t);
    t.open();

    SchedulesDirectProgramDataJob job = new SchedulesDirectProgramDataJob(pd);
    JobContainer jc = JobManager.getJobContainer(job);
    setJobContainer(jc);
    jc.start();

    Hashtable<String, String> dict = new Hashtable<String, String>();
    dict.put(ProgramData.TITLE_PROPERTY, pd.getTitle());

    bc.registerService(ProgramData.class.getName(), pd, dict);
  }