X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Ftranscode_ffmpeg.h;h=2ee7529dc51e83507fcb9ee11d2dc05326e43ef7;hb=ef6f0de5a31bd14a4d48e806b3b56b2845ebd690;hp=932bfe051bee8d8ee91f4eba69da93243e39f11d;hpb=66ee2c8e597ca9a07d614cf56b4002e5303e3645;p=ardour.git diff --git a/gtk2_ardour/transcode_ffmpeg.h b/gtk2_ardour/transcode_ffmpeg.h index 932bfe051b..2ee7529dc5 100644 --- a/gtk2_ardour/transcode_ffmpeg.h +++ b/gtk2_ardour/transcode_ffmpeg.h @@ -21,17 +21,9 @@ #define __ardour_transcode_ffmpeg_h__ #include +#include "ardour/system_exec.h" #include "ardour/types.h" -#include "system_exec.h" -/* TODO: use a namespace here ? */ -struct AudioStream { - 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() @@ -121,18 +122,20 @@ class TranscodeFfmpeg : public sigc::trackable void set_avoffset(double av_offset) { m_avoffset = av_offset; } void set_leadinout(double lead_in, double lead_out) { m_lead_in = lead_in; m_lead_out = lead_out; } + void set_fps(double fps) { m_fps = fps; } // on export, used for rounding only. #if 1 /* tentative debug mode */ void set_debug (bool onoff) { debug_enable = onoff; } #endif protected: std::string infile; - SystemExec *ffcmd; + ARDOUR::SystemExec *ffcmd; bool probe (); double m_fps; double m_aspect; + std::string m_sar; ARDOUR::framecnt_t m_duration; int m_width; int m_height; @@ -145,7 +148,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);