diff --git a/gtk2_ardour/export_video_dialog.cc b/gtk2_ardour/export_video_dialog.cc index ce85fad81e..eb4213b237 100644 --- a/gtk2_ardour/export_video_dialog.cc +++ b/gtk2_ardour/export_video_dialog.cc @@ -584,7 +584,7 @@ ExportVideoDialog::encode_pass (int pass) } std::string preset = preset_combo.get_active_text(); - FFSettings ffs ; /* = transcoder->default_encoder_settings(); */ + TranscodeFfmpeg::FFSettings ffs ; /* = transcoder->default_encoder_settings(); */ ffs.clear(); if (fps_checkbox.get_active()) { @@ -740,7 +740,7 @@ ExportVideoDialog::encode_pass (int pass) transcoder->set_avoffset(av_offset / (double)_session->nominal_frame_rate()); } - FFSettings meta = transcoder->default_meta_data(); + TranscodeFfmpeg::FFSettings meta = transcoder->default_meta_data(); if (meta_checkbox.get_active()) { ARDOUR::SessionMetadata * session_data = ARDOUR::SessionMetadata::Metadata(); if (session_data->year() > 0 ) { diff --git a/gtk2_ardour/transcode_ffmpeg.cc b/gtk2_ardour/transcode_ffmpeg.cc index 657b79ffba..9499c6c184 100644 --- a/gtk2_ardour/transcode_ffmpeg.cc +++ b/gtk2_ardour/transcode_ffmpeg.cc @@ -261,10 +261,10 @@ TranscodeFfmpeg::probe () return true; } -FFSettings +TranscodeFfmpeg::FFSettings TranscodeFfmpeg::default_encoder_settings () { - FFSettings ffs; + TranscodeFfmpeg::FFSettings ffs; ffs.clear(); ffs["-vcodec"] = "mpeg4"; ffs["-acodec"] = "ac3"; @@ -273,10 +273,10 @@ TranscodeFfmpeg::default_encoder_settings () return ffs; } -FFSettings +TranscodeFfmpeg::FFSettings TranscodeFfmpeg::default_meta_data () { - FFSettings ffm; + TranscodeFfmpeg::FFSettings ffm; ffm.clear(); ffm["comment"] = "Created with ardour"; return ffm; @@ -308,7 +308,7 @@ TranscodeFfmpeg::format_metadata (std::string key, std::string value) } bool -TranscodeFfmpeg::encode (std::string outfile, std::string inf_a, std::string inf_v, FFSettings ffs, FFSettings meta, bool map) +TranscodeFfmpeg::encode (std::string outfile, std::string inf_a, std::string inf_v, TranscodeFfmpeg::FFSettings ffs, TranscodeFfmpeg::FFSettings meta, bool map) { #define MAX_FFMPEG_ENCODER_ARGS (100) char **argp; @@ -327,11 +327,11 @@ TranscodeFfmpeg::encode (std::string outfile, std::string inf_a, std::string inf argp[a++] = strdup("-i"); argp[a++] = strdup(inf_a.c_str()); - for(FFSettings::const_iterator it = ffs.begin(); it != ffs.end(); ++it) { + for(TranscodeFfmpeg::FFSettings::const_iterator it = ffs.begin(); it != ffs.end(); ++it) { argp[a++] = strdup(it->first.c_str()); argp[a++] = strdup(it->second.c_str()); } - for(FFSettings::const_iterator it = meta.begin(); it != meta.end(); ++it) { + for(TranscodeFfmpeg::FFSettings::const_iterator it = meta.begin(); it != meta.end(); ++it) { argp[a++] = strdup("-metadata"); argp[a++] = format_metadata(it->first.c_str(), it->second.c_str()); } diff --git a/gtk2_ardour/transcode_ffmpeg.h b/gtk2_ardour/transcode_ffmpeg.h index d1f445bf48..61267ac853 100644 --- a/gtk2_ardour/transcode_ffmpeg.h +++ b/gtk2_ardour/transcode_ffmpeg.h @@ -24,14 +24,6 @@ #include "ardour/types.h" #include "system_exec.h" -/* TODO: use a namespace here ? */ -struct FFAudioStream { - std::string name; - std::string stream_id; - uint32_t channels; -}; -typedef std::vector AudioStreams; -typedef std::map FFSettings; /** @class TranscodeFfmpeg * @brief wrapper around ffmpeg and ffprobe command-line utils @@ -46,6 +38,15 @@ class TranscodeFfmpeg : public sigc::trackable { public: + struct FFAudioStream { + std::string name; + std::string stream_id; + uint32_t channels; + }; + typedef std::vector FFAudioStreams; + typedef std::map FFSettings; + + /** instantiate a new transcoder. If a file-name is given, the file's * attributes (fps, duration, geometry etc) are read. * @@ -110,7 +111,7 @@ class TranscodeFfmpeg : public sigc::trackable ARDOUR::framecnt_t get_duration() { return m_duration; } std::string get_codec() { return m_codec; } - AudioStreams get_audio() { return m_audio; } + FFAudioStreams get_audio() { return m_audio; } /** override file duration used with the \ref Progress signal. * @param d duration in video-frames = length_in_seconds * get_fps() @@ -145,7 +146,7 @@ class TranscodeFfmpeg : public sigc::trackable bool ffexecok; bool probeok; - AudioStreams m_audio; + FFAudioStreams m_audio; char *format_metadata (std::string, std::string); void ffmpegparse_v (std::string d, size_t s); diff --git a/gtk2_ardour/transcode_video_dialog.cc b/gtk2_ardour/transcode_video_dialog.cc index fa5d447a3a..5c6ae0c7b4 100644 --- a/gtk2_ardour/transcode_video_dialog.cc +++ b/gtk2_ardour/transcode_video_dialog.cc @@ -88,7 +88,7 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile) int w = 0, h = 0; m_aspect = 4.0/3.0; - AudioStreams as; as.clear(); + TranscodeFfmpeg::FFAudioStreams as; as.clear(); path_hbox->pack_start (path_label, false, false, 3); path_hbox->pack_start (path_entry, true, true, 3); @@ -227,7 +227,7 @@ TranscodeVideoDialog::TranscodeVideoDialog (Session* s, std::string infile) t->attach (audio_combo, 1, 4, 2, 3); audio_combo.append_text("No audio"); if (as.size() > 0) { - for (AudioStreams::iterator it = as.begin(); it < as.end(); ++it) { + for (TranscodeFfmpeg::FFAudioStreams::iterator it = as.begin(); it < as.end(); ++it) { audio_combo.append_text((*it).name); } }