Beispiel #1
0
jint Java_com_dozingcatsoftware_eyeball_video_WebMEncoder_nativeFinishEncoding(JNIEnv* env, jobject thiz) {
	return finish_encode(&gContext);
}
Beispiel #2
0
Audex::Audex(QWidget* parent, ProfileModel *profile_model, CDDAModel *cdda_model) : QObject(parent) {

  Q_UNUSED(parent);

  this->profile_model = profile_model;
  this->cdda_model = cdda_model;

  p_profile_name = profile_model->data(profile_model->index(profile_model->currentProfileRow(), PROFILE_MODEL_COLUMN_NAME_INDEX)).toString();
  p_suffix = profile_model->getSelectedEncoderSuffixFromCurrentIndex();
  p_single_file = profile_model->data(profile_model->index(profile_model->currentProfileRow(), PROFILE_MODEL_COLUMN_SF_INDEX)).toBool();
  p_replaygain = profile_model->data(profile_model->index(profile_model->currentProfileRow(), PROFILE_MODEL_COLUMN_RG_INDEX)).toBool();

  encoder_wrapper = new EncoderWrapper(this,
                        profile_model->getSelectedEncoderPatternFromCurrentIndex(),
                        profile_model->getSelectedEncoderNameAndVersion(),
                        Preferences::deletePartialFiles());

  if (!encoder_wrapper) {
    kDebug() << "PANIC ERROR. Could not load object EncoderWrapper. Low mem?";
    return;
  }

  cdda_extract_thread = new CDDAExtractThread(this, cdda_model->paranoia());
  if (!cdda_extract_thread) {
    kDebug() << "PANIC ERROR. Could not load object CDDAExtractThread. Low mem?";
    return;
  }
  cdda_extract_thread->setSampleOffset(Preferences::sampleOffset());

  jobs = new AudexJobs();
  connect(jobs, SIGNAL(newJobAvailable()), this, SLOT(start_encode()));

  wave_file_writer = new WaveFileWriter();

  last_measuring_point_sector = -1;
  timer_extract = new QTimer(this);
  connect(timer_extract, SIGNAL(timeout()), this, SLOT(calculate_speed_extract()));
  timer_extract->start(4000);

  last_measuring_point_encoder_percent = -1;
  timer_encode = new QTimer(this);
  connect(timer_encode, SIGNAL(timeout()), this, SLOT(calculate_speed_encode()));
  timer_encode->start(2000);

  connect(encoder_wrapper, SIGNAL(progress(int)), this, SLOT(progress_encode(int)));
  connect(encoder_wrapper, SIGNAL(finished()), this, SLOT(finish_encode()));
  connect(encoder_wrapper, SIGNAL(info(const QString&)), this, SLOT(slot_info(const QString&)));
  connect(encoder_wrapper, SIGNAL(warning(const QString&)), this, SLOT(slot_warning(const QString&)));
  connect(encoder_wrapper, SIGNAL(error(const QString&, const QString&)), this, SLOT(slot_error(const QString&, const QString&)));

  connect(cdda_extract_thread, SIGNAL(progress(int, int, int)), this, SLOT(progress_extract(int, int, int)));
  connect(cdda_extract_thread, SIGNAL(output(const QByteArray&)), this, SLOT(write_to_wave(const QByteArray&)));
  connect(cdda_extract_thread, SIGNAL(finished()), this, SLOT(finish_extract()));
  connect(cdda_extract_thread, SIGNAL(terminated()), this, SLOT(finish_extract()));
  connect(cdda_extract_thread, SIGNAL(info(const QString&)), this, SLOT(slot_info(const QString&)));
  connect(cdda_extract_thread, SIGNAL(warning(const QString&)), this, SLOT(slot_warning(const QString&)));
  connect(cdda_extract_thread, SIGNAL(error(const QString&, const QString&)), this, SLOT(slot_error(const QString&, const QString&)));

  process_counter = 0;
  timeout_done = FALSE;
  timeout_counter = 0;
  _finished = FALSE;
  _finished_successful = FALSE;

  en_track_index = 0;
  en_track_count = 0;

  ex_track_index = 0;
  ex_track_count = 0;

  current_sector = 0;
  current_encoder_percent = 0;

  overall_frames = 0;

}