66 void video_stream_setup(AVCodecContext *output_codec_ctx, AVStream* output_stream, AVCodecContext *input_codec_ctx, AVRational framerate, AVPixelFormat enc_hw_pix_fmt)
const;
77 int dict_set_with_check(AVDictionary **pm,
const char *key,
const char *value,
int flags,
const char *
filename =
nullptr,
bool nodelete =
false)
const;
88 int dict_set_with_check(AVDictionary **pm,
const char *key, int64_t value,
int flags,
const char *
filename =
nullptr,
bool nodelete =
false)
const;
105 void video_info(
bool out_file,
const AVFormatContext *format_ctx,
const AVStream *stream)
const;
112 void audio_info(
bool out_file,
const AVFormatContext *format_ctx,
const AVStream *stream)
const;
119 void subtitle_info(
bool out_file,
const AVFormatContext *format_ctx,
const AVStream *stream)
const;
132#if LAVU_DEP_OLD_CHANNEL_LAYOUT
146 static std::string get_channel_layout_name(int nb_channels, uint64_t channel_layout);
170 uint32_t
pts_to_frame(AVStream* stream, int64_t pts)
const;
177 int64_t
frame_to_pts(AVStream* stream, uint32_t frame_no)
const;
183 int get_channels(
const AVCodecParameters *codecpar)
const;
189 void set_channels(AVCodecParameters *codecpar_out,
const AVCodecParameters *codecpar_in)
const;
195 int get_channels(
const AVCodecContext *codec_ctx)
const;
201 void set_channels(AVCodecContext *codec_ctx_out,
const AVCodecContext *codec_ctx_in)
const;
207 void set_channels(AVCodecContext *codec_ctx_out,
int channels)
const;
209#define ASS_DEFAULT_PLAYRESX 384
210#define ASS_DEFAULT_PLAYRESY 288
211#define ASS_DEFAULT_FONT "Arial"
212#define ASS_DEFAULT_FONT_SIZE 16
223#define ASS_DEFAULT_COLOUR 0xffffff
224#define ASS_DEFAULT_BACK_COLOUR 0
225#define ASS_DEFAULT_BOLD 0
226#define ASS_DEFAULT_ITALIC 0
227#define ASS_DEFAULT_UNDERLINE 0
243#define ASS_DEFAULT_ALIGNMENT 2
249#define ASS_DEFAULT_BORDERSTYLE 1
270 int get_script_info(AVCodecContext *codec_ctx,
int play_res_x,
int play_res_y,
const char *font,
int font_size,
int primary_color,
int secondary_color,
int outline_color,
int back_color,
int bold,
int italic,
int underline,
int border_style,
int alignment)
const;
static std::string get_sample_fmt_name(AVSampleFormat sample_fmt)
Calls av_get_sample_fmt_name and returns a std::string with the format name.
int get_channels(const AVCodecParameters *codecpar) const
Get the number of channels from AVCodecParameters.
int opt_set_with_check(void *obj, const char *key, const char *value, int flags, const char *filename=nullptr) const
Call av_opt_set and check result code. Displays an error message if appropriate.
int get_script_info(AVCodecContext *codec_ctx, int play_res_x, int play_res_y, const char *font, int font_size, int primary_color, int secondary_color, int outline_color, int back_color, int bold, int italic, int underline, int border_style, int alignment) const
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS. Nicked from the FFmpeg API funct...
void audio_info(bool out_file, const AVFormatContext *format_ctx, const AVStream *stream) const
Print data from the audio stream to log.
int64_t frame_to_pts(AVStream *stream, uint32_t frame_no) const
Convert frame number to PTS value.
uint32_t pts_to_frame(AVStream *stream, int64_t pts) const
Convert PTS value to frame number.
virtual const char * virtname() const =0
Return virtual filename. Must be implemented in child class.
virtual ~FFmpeg_Base()=default
Destruct FFmpeg_Base object.
void video_info(bool out_file, const AVFormatContext *format_ctx, const AVStream *stream) const
Print data from the video stream to a log.
virtual const char * destname() const =0
Return destination filename. Must be implemented in child class.
void subtitle_info(bool out_file, const AVFormatContext *format_ctx, const AVStream *stream) const
Print data from the subtitle stream to log.
VIRTUALFILE * m_virtualfile
Underlying virtual file object.
void video_stream_setup(AVCodecContext *output_codec_ctx, AVStream *output_stream, AVCodecContext *input_codec_ctx, AVRational framerate, AVPixelFormat enc_hw_pix_fmt) const
Set up a video stream.
static std::string get_channel_layout_name(const AVChannelLayout *ch_layout)
Calls av_channel_layout_describe and returns a std::string with the channel layout.
static std::string get_pix_fmt_name(AVPixelFormat pix_fmt)
Calls av_get_pix_fmt_name and returns a std::string with the pix format name.
int dict_set_with_check(AVDictionary **pm, const char *key, const char *value, int flags, const char *filename=nullptr, bool nodelete=false) const
Call av_dict_set and check the result code. It displays an error message if appropriate.
void set_channels(AVCodecParameters *codecpar_out, const AVCodecParameters *codecpar_in) const
Set the number of channels from AVCodecParameters.
FFmpeg_Base()
Construct FFmpeg_Base object.
virtual const char * filename() const =0
Return source filename. Must be implemented in child class.
Various FFmpegfs utility functions.