58#if !LAVC_DEP_AV_INIT_PACKET
63 void init_packet(AVPacket *pkt)
const;
73 void video_stream_setup(AVCodecContext *output_codec_ctx, AVStream* output_stream, AVCodecContext *input_codec_ctx, AVRational framerate, AVPixelFormat enc_hw_pix_fmt) const;
84 int dict_set_with_check(AVDictionary **pm,
const char *key,
const char *value,
int flags,
const char *
filename =
nullptr,
bool nodelete =
false)
const;
95 int dict_set_with_check(AVDictionary **pm,
const char *key, int64_t value,
int flags,
const char *
filename =
nullptr,
bool nodelete =
false)
const;
112 void video_info(
bool out_file,
const AVFormatContext *format_ctx,
const AVStream *stream)
const;
119 void audio_info(
bool out_file,
const AVFormatContext *format_ctx,
const AVStream *stream)
const;
126 void subtitle_info(
bool out_file,
const AVFormatContext *format_ctx,
const AVStream *stream)
const;
139#if LAVU_DEP_OLD_CHANNEL_LAYOUT
153 static std::string get_channel_layout_name(int nb_channels, uint64_t channel_layout);
177 uint32_t
pts_to_frame(AVStream* stream, int64_t pts)
const;
184 int64_t
frame_to_pts(AVStream* stream, uint32_t frame_no)
const;
190 int get_channels(
const AVCodecParameters *codecpar)
const;
196 void set_channels(AVCodecParameters *codecpar_out,
const AVCodecParameters *codecpar_in)
const;
202 int get_channels(
const AVCodecContext *codec_ctx)
const;
208 void set_channels(AVCodecContext *codec_ctx_out,
const AVCodecContext *codec_ctx_in)
const;
214 void set_channels(AVCodecContext *codec_ctx_out,
int channels)
const;
216#define ASS_DEFAULT_PLAYRESX 384
217#define ASS_DEFAULT_PLAYRESY 288
218#define ASS_DEFAULT_FONT "Arial"
219#define ASS_DEFAULT_FONT_SIZE 16
230#define ASS_DEFAULT_COLOUR 0xffffff
231#define ASS_DEFAULT_BACK_COLOUR 0
232#define ASS_DEFAULT_BOLD 0
233#define ASS_DEFAULT_ITALIC 0
234#define ASS_DEFAULT_UNDERLINE 0
250#define ASS_DEFAULT_ALIGNMENT 2
256#define ASS_DEFAULT_BORDERSTYLE 1
277 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.
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.