157 .class_name =
"Decoder",
159 .parent_log_context_offset = offsetof(
DecoderPriv, log_parent),
202 return ret >= 0 ?
AVERROR(ENOMEM) : ret;
209 const int sr =
frame->sample_rate;
219 if (prev / gcd >= INT_MAX / sr) {
221 "Audio timestamps cannot be represented exactly after "
222 "sample rate change: %d -> %d\n", prev, sr);
231 if (
frame->time_base.num == 1 &&
frame->time_base.den > tb_new.
den &&
232 !(
frame->time_base.den % tb_new.
den))
233 tb_new =
frame->time_base;
262 frame->pts = pts_pred;
263 frame->time_base = tb;
272 tb,
frame->nb_samples,
282 frame->time_base = tb_filter;
303 const int duration_unreliable =
frame->duration == 1 && ts_diff > 2 *
frame->duration;
307 (
frame->duration > 0 && !ts_unreliable && !duration_unreliable))
308 return frame->duration;
311 int fields =
frame->repeat_pict + 2;
319 if (codec_duration > 0 && ts_unreliable)
320 return codec_duration;
328 if (
frame->duration > 0)
329 return frame->duration;
330 if (codec_duration > 0)
331 return codec_duration;
366 "output frame: %d.\n", err);
388 unsigned *outputs_mask)
417 "decoder -> pts:%s pts_time:%s "
418 "pkt_dts:%s pkt_dts_time:%s "
419 "duration:%s duration_time:%s "
420 "keyframe:%d frame_type:%d time_base:%d/%d\n",
444 *outputs_mask = (uintptr_t)
frame->opaque;
453 .format =
src->format,
454 .start_display_time =
src->start_display_time,
455 .end_display_time =
src->end_display_time,
467 for (
int i = 0;
i <
src->num_rects;
i++) {
481 dst_rect->
x = src_rect->
x;
482 dst_rect->
y = src_rect->
y;
483 dst_rect->
w = src_rect->
w;
484 dst_rect->
h = src_rect->
h;
499 for (
int j = 0; j < 4; j++) {
507 if (!src_rect->
data[j])
550 sub =
av_memdup(subtitle,
sizeof(*subtitle));
553 memset(subtitle, 0,
sizeof(*subtitle));
581 if (end < sub_prev->end_display_time) {
583 "Subtitle duration reduced from %"PRId32
" to %d%s\n",
585 end <= 0 ?
", dropping it" :
"");
620 !prev_subtitle->
num_rects || signal_pts <= prev_subtitle->
pts)
629 subtitle->
pts = signal_pts;
704 if (
pkt &&
pkt->size == 0)
725 "This is a bug, please report it.\n");
741 unsigned outputs_mask = 1;
757 }
else if (ret < 0) {
769 "corrupt decoded frame\n");
796 "Error while processing the decoded data\n");
809 outputs_mask &= ~(1U <<
pos);
838 if (!
pkt->opaque_ref)
845 memset(&o, 0,
sizeof(o));
869 char name[16] =
"dec";
887 memset(dt, 0,
sizeof(*dt));
892 memset(dt, 0,
sizeof(*dt));
913 int ret = 0, input_status = 0;
921 while (!input_status) {
925 have_data = input_status >= 0 &&
938 if (input_status < 0) {
940 "Cannot initialize a standalone decoder\n");
977 }
else if (ret < 0) {
1002 "Error signalling EOF timestamp: %s\n",
av_err2str(ret));
1013 }
else if (err_rate)
1028 unsigned out_idx = 0;
1038 "Manually selecting views with -view_ids cannot be combined "
1039 "with view selection via stream specifiers. It is strongly "
1040 "recommended you always use stream specifiers only.\n");
1089 unsigned views_wanted = 0;
1091 unsigned nb_view_ids_av, nb_view_ids;
1092 unsigned *view_ids_av =
NULL, *view_pos_av =
NULL;
1093 int *view_ids =
NULL;
1111 "Multiview decoding requested, but decoder '%s' does not "
1112 "support it\n",
dec_ctx->codec->name);
1116 if (nb_view_ids_av) {
1117 unsigned nb_view_pos_av;
1119 if (nb_view_ids_av >=
sizeof(views_wanted) * 8) {
1125 view_ids_av =
av_calloc(nb_view_ids_av,
sizeof(*view_ids_av));
1139 if (ret >= 0 && nb_view_pos_av == nb_view_ids_av) {
1140 view_pos_av =
av_calloc(nb_view_ids_av,
sizeof(*view_pos_av));
1155 view_ids_av =
av_calloc(nb_view_ids_av,
sizeof(*view_ids_av));
1156 view_pos_av =
av_calloc(nb_view_ids_av,
sizeof(*view_pos_av));
1157 if (!view_ids_av || !view_pos_av) {
1180 if (vs->
val >= nb_view_ids_av) {
1182 "View with index %u requested, but only %u views available "
1183 "in current video sequence (more views may or may not be "
1184 "available in later sequences).\n",
1185 vs->
val, nb_view_ids_av);
1193 views_wanted |= 1U << vs->
val;
1200 for (
unsigned j = 0; j < nb_view_ids_av; j++) {
1201 if (view_ids_av[j] == vs->
val) {
1208 "View with ID %u requested, but is not available "
1209 "in the video sequence\n", vs->
val);
1217 views_wanted |= 1U << view_idx;
1225 for (
unsigned j = 0; view_pos_av && j < nb_view_ids_av; j++) {
1226 if (view_pos_av[j] == vs->
val) {
1233 "View position '%s' requested, but is not available "
1242 views_wanted |= 1U << view_idx;
1248 views_wanted |= (1U << nb_view_ids_av) - 1;
1256 if (!views_wanted) {
1270 for (
unsigned i = 0;
i < nb_view_ids;
i++) {
1275 views_wanted &= ~(1U <<
pos);
1277 view_ids[
i] = view_ids_av[
pos];
1308 "is not recommended, use view specifiers instead\n");
1337 for (
int i = 0;;
i++) {
1341 if (!(config->methods &
1344 if (config->pix_fmt == *p)
1369 "Requested hwaccel output format '%s' not available, "
1370 "falling back to '%s'\n",
1386 int view_id = sd ? *(
int*)sd->
data : 0;
1403 for (
int i = 0;;
i++) {
1417 const char *hwaccel_device)
1422 int err, auto_device = 0;
1424 if (hwaccel_device) {
1443 "specified for decoder: device %s of type %s is not "
1444 "usable with hwaccel %s.\n", dev->
name,
1485 for (
int i = 0; !dev;
i++) {
1489 type = config->device_type;
1493 "hwaccel type %s with existing device %s.\n",
1497 for (
int i = 0; !dev;
i++) {
1501 type = config->device_type;
1509 if (hwaccel_device) {
1511 "hwaccel type %s with new device created "
1516 "hwaccel type %s with new default device.\n",
1524 "disabled: no device found.\n");
1532 "for decoder: device type %s needed for codec %s.\n",
1601 "Hardware device setup failed for decoder: %s\n",
1697 ret =
dec_open(dp, dec_opts, o, param_out);
1715 int of_index, ost_index;
1735 of_index = strtol(
arg, &p, 0);
1742 ost_index = strtol(p + 1,
NULL, 0);
1743 if (ost_index < 0 || ost_index >= of->
nb_streams) {
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Libavcodec external API header.
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
int check_avoptions(AVDictionary *m)
#define GROW_ARRAY(array, nb_elems)
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
static AVCodecContext * dec_ctx
FrameData * frame_data(AVFrame *frame)
Get our axiliary frame data attached to the frame, allocating it if needed.
FrameData * packet_data(AVPacket *pkt)
void update_benchmark(const char *fmt,...)
OutputFile ** output_files
@ PKT_OPAQUE_SUB_HEARTBEAT
@ PKT_OPAQUE_FIX_SUB_DURATION
int enc_loopback(Encoder *enc)
#define FFMPEG_ERROR_RATE_EXCEEDED
@ VIEW_SPECIFIER_TYPE_ALL
@ VIEW_SPECIFIER_TYPE_POS
@ VIEW_SPECIFIER_TYPE_IDX
@ VIEW_SPECIFIER_TYPE_NONE
HWDevice * hw_device_get_by_name(const char *name)
@ FRAME_OPAQUE_SUB_HEARTBEAT
int hw_device_init_from_type(enum AVHWDeviceType type, const char *device, HWDevice **dev_out)
HWDevice * hw_device_get_by_type(enum AVHWDeviceType type)
@ DECODER_FLAG_SEND_END_TS
@ DECODER_FLAG_FIX_SUB_DURATION
@ DECODER_FLAG_FRAMERATE_FORCED
@ DECODER_FLAG_TS_UNRELIABLE
void dec_free(Decoder **pdec)
int dec_filter_add(Decoder *d, InputFilter *ifilter, InputFilterOptions *opts, const ViewSpecifier *vs, SchedulerNode *src)
static int dec_standalone_open(DecoderPriv *dp, const AVPacket *pkt)
static void dec_thread_set_name(const DecoderPriv *dp)
static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat *pix_fmts)
static int hw_device_setup_for_decode(DecoderPriv *dp, const AVCodec *codec, const char *hwaccel_device)
static void dec_thread_uninit(DecThreadContext *dt)
static DecoderPriv * dp_from_dec(Decoder *d)
static int decoder_thread(void *arg)
static int hwaccel_retrieve_data(AVCodecContext *avctx, AVFrame *input)
static int get_buffer(AVCodecContext *dec_ctx, AVFrame *frame, int flags)
static int process_subtitle(DecoderPriv *dp, AVFrame *frame)
int dec_request_view(Decoder *d, const ViewSpecifier *vs, SchedulerNode *src)
int dec_create(const OptionsContext *o, const char *arg, Scheduler *sch)
Create a standalone decoder.
static void audio_ts_process(DecoderPriv *dp, AVFrame *frame)
static int subtitle_wrap_frame(AVFrame *frame, AVSubtitle *subtitle, int copy)
static int64_t video_duration_estimate(const DecoderPriv *dp, const AVFrame *frame)
static int multiview_setup(DecoderPriv *dp, AVCodecContext *dec_ctx)
static const AVClass dec_class
static int copy_av_subtitle(AVSubtitle *dst, const AVSubtitle *src)
static int dec_open(DecoderPriv *dp, AVDictionary **dec_opts, const DecoderOpts *o, AVFrame *param_out)
static int dec_thread_init(DecThreadContext *dt)
static HWDevice * hw_device_match_by_codec(const AVCodec *codec)
static int transcode_subtitles(DecoderPriv *dp, const AVPacket *pkt, AVFrame *frame)
int dec_init(Decoder **pdec, Scheduler *sch, AVDictionary **dec_opts, const DecoderOpts *o, AVFrame *param_out)
static AVRational audio_samplerate_update(DecoderPriv *dp, const AVFrame *frame)
static void subtitle_free(void *opaque, uint8_t *data)
static int fix_sub_duration_heartbeat(DecoderPriv *dp, int64_t signal_pts)
static int video_frame_process(DecoderPriv *dp, AVFrame *frame, unsigned *outputs_mask)
static int packet_decode(DecoderPriv *dp, AVPacket *pkt, AVFrame *frame)
static int dec_alloc(DecoderPriv **pdec, Scheduler *sch, int send_end_ts)
static const char * dec_item_name(void *obj)
static void multiview_check_manual(DecoderPriv *dp, const AVDictionary *dec_opts)
int sch_add_dec(Scheduler *sch, SchThreadFunc func, void *ctx, int send_end_ts)
Add a decoder to the scheduler.
int sch_add_dec_output(Scheduler *sch, unsigned dec_idx)
Add another output to decoder (e.g.
int sch_dec_send(Scheduler *sch, unsigned dec_idx, unsigned out_idx, AVFrame *frame)
Called by decoder tasks to send a decoded frame downstream.
int sch_connect(Scheduler *sch, SchedulerNode src, SchedulerNode dst)
int sch_dec_receive(Scheduler *sch, unsigned dec_idx, AVPacket *pkt)
Called by decoder tasks to receive a packet for decoding.
#define DEFAULT_FRAME_THREAD_QUEUE_SIZE
Default size of a frame thread queue.
#define SCH_DEC_OUT(decoder, out_idx)
#define SCH_DEC_IN(decoder)
static int clone_side_data(AVFrameSideData ***dst, int *nb_dst, AVFrameSideData *const *src, int nb_src, unsigned int flags)
Wrapper calling av_frame_side_data_clone() in a loop for all source entries.
static void flush_buffers(InputFile *ifile)
static char * output_format
static av_cold void cleanup(FlashSV2Context *s)
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_UINT
Underlying C type is unsigned int.
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
#define AV_CODEC_FLAG_BITEXACT
Use only bitexact stuff (except (I)DCT).
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
#define AV_CODEC_RECEIVE_FRAME_FLAG_SYNCHRONOUS
The decoder will bypass frame threading and return the next frame as soon as possible.
const AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
const AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
const AVCodecHWConfig * avcodec_get_hw_config(const AVCodec *codec, int index)
Retrieve supported hardware configurations for a codec.
#define AV_CODEC_FLAG_COPY_OPAQUE
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
@ SUBTITLE_BITMAP
A bitmap, pict will be set.
@ AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX
The codec supports this format via the hw_device_ctx interface.
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags)
The default callback for AVCodecContext.get_buffer2().
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
Decode a subtitle message.
int attribute_align_arg avcodec_receive_frame_flags(AVCodecContext *avctx, AVFrame *frame, unsigned flags)
Return decoded output data from a decoder or encoder (when the AV_CODEC_FLAG_RECON_FRAME flag is used...
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal codec state / flush internal buffers.
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
int av_channel_layout_copy(AVChannelLayout *dst, const AVChannelLayout *src)
Make a copy of a channel layout.
AVBufferRef * av_buffer_ref(const AVBufferRef *buf)
Create a new reference to an AVBuffer.
AVBufferRef * av_buffer_create(uint8_t *data, size_t size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
Create an AVBuffer from an existing array.
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
#define AVERROR_DECODER_NOT_FOUND
Decoder not found.
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
#define AVERROR_EOF
End of file.
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define AV_FRAME_FLAG_CORRUPT
The frame data may be corrupted, e.g.
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd)
Free all side data entries and their contents, then zeroes out the values which the pointers are poin...
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
int av_frame_apply_cropping(AVFrame *frame, int flags)
Crop the given video AVFrame according to its crop_left/crop_top/crop_right/ crop_bottom fields.
@ AV_FRAME_CROP_UNALIGNED
Apply the maximum possible cropping, even if it requires setting the AVFrame.data[] entries to unalig...
@ AV_FRAME_DATA_VIEW_ID
This side data must be associated with a video frame.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_LOG_FATAL
Something went wrong and recovery is not possible.
#define AV_LOG_VERBOSE
Detailed information.
#define AV_LOG_INFO
Standard information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
static av_always_inline AVRational av_inv_q(AVRational q)
Invert a rational.
int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb)
Rescale a timestamp while preserving known durations.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
int64_t av_gcd(int64_t a, int64_t b)
Compute the greatest common divisor of two integer operands.
int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, enum AVRounding rnd)
Rescale a 64-bit integer by 2 rational numbers with specified rounding.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
@ AV_ROUND_UP
Round toward +infinity.
void * av_memdup(const void *p, size_t size)
Duplicate a buffer with av_malloc().
const char * av_get_media_type_string(enum AVMediaType media_type)
Return a string describing the media_type enum, NULL if media_type is unknown.
size_t av_strlcat(char *dst, const char *src, size_t size)
Append the string src to the string dst, but to a total length of no more than size - 1 bytes,...
#define AV_NOPTS_VALUE
Undefined timestamp value.
#define AV_TIME_BASE
Internal time base represented as integer.
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
#define LIBAVUTIL_VERSION_INT
const char * av_stereo3d_view_name(unsigned int view)
Provide a human-readable name of a given stereo3d view.
@ AV_STEREO3D_VIEW_UNSPEC
Content is unspecified.
int av_opt_get_array(void *obj, const char *name, int search_flags, unsigned int start_elem, unsigned int nb_elems, enum AVOptionType out_type, void *out_val)
For an array-type option, retrieve the values of one or more array elements.
int av_opt_get_array_size(void *obj, const char *name, int search_flags, unsigned int *out_val)
For an array-type option, get the number of elements in the array.
#define AV_OPT_SEARCH_CHILDREN
Search in possible children of the given object first.
int av_opt_set_array(void *obj, const char *name, int search_flags, unsigned int start_elem, unsigned int nb_elems, enum AVOptionType val_type, const void *val)
Add, replace, or remove elements for an array option.
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
int av_opt_set_dict2(void *obj, AVDictionary **options, int search_flags)
Set all the options from a given dictionary on an object.
const char * av_hwdevice_get_type_name(enum AVHWDeviceType type)
Get the string name of an AVHWDeviceType.
int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags)
Copy data to or from a hw surface.
static int ff_thread_setname(const char *name)
static enum AVPixelFormat pix_fmts[]
#define FFSWAP(type, a, b)
void * av_calloc(size_t nmemb, size_t size)
Memory handling functions.
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
#define AV_PIX_FMT_FLAG_HWACCEL
Pixel format is an HW accelerated format.
AVPixelFormat
Pixel format.
static int get_format(AVCodecContext *avctx, const enum AVPixelFormat *pix_fmts)
#define FF_ARRAY_ELEMS(a)
#define stdc_count_ones(value)
#define stdc_trailing_zeros(value)
A reference to a data buffer.
uint8_t * data
The data buffer.
Describe the class of an AVClass context structure.
main external API structure.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int subtitle_header_size
Header containing style information for text subtitles.
int width
picture width / height.
AVChannelLayout ch_layout
Audio channel layout.
enum AVSampleFormat sample_fmt
audio sample format
enum AVColorRange color_range
MPEG vs JPEG YUV range.
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
enum AVPixelFormat(* get_format)(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
Callback to negotiate the pixel format.
enum AVMediaType codec_type
int64_t frame_num
Frame counter, set by libavcodec.
int apply_cropping
Video decoding only.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown) That is the width of a pixel divided by the height of the pixel.
const struct AVCodec * codec
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
enum AVColorSpace colorspace
YUV colorspace type.
int sample_rate
samples per second
void * opaque
Private data of the user, can be used to carry app specific stuff.
uint8_t * subtitle_header
int flags
AV_CODEC_FLAG_*.
AVFrameSideData ** decoded_side_data
Array containing static side data, such as HDR10 CLL / MDCV structures.
enum AVAlphaMode alpha_mode
Indicates how the alpha channel of the video is represented.
AVBufferRef * hw_device_ctx
A reference to the AVHWDeviceContext describing the device which will be used by a hardware encoder/d...
int extra_hw_frames
Video decoding only.
int(* get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags)
This callback is called at the beginning of each frame to get data buffer(s) for it.
This struct describes the properties of a single codec described by an AVCodecID.
AVRational sample_aspect_ratio
The aspect ratio (width/height) which a single pixel should have when displayed.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
const char * name
Name of the codec implementation.
Structure to hold side data for an AVFrame.
This structure describes decoded (raw) audio or video data.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
AVRational time_base
Time base for the timestamps in this frame.
void * opaque
Frame owner's private data.
AVFrameSideData ** side_data
AVBufferRef * buf[AV_NUM_DATA_POINTERS]
AVBuffer references backing the data for this frame.
AVRational sample_aspect_ratio
Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
enum AVColorRange color_range
MPEG vs JPEG YUV range.
enum AVColorSpace colorspace
YUV colorspace type.
enum AVAlphaMode alpha_mode
Indicates how the alpha channel of the video is to be handled.
int sample_rate
Sample rate of the audio data.
AVChannelLayout ch_layout
Channel layout of the audio data.
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames,...
This structure stores compressed data.
AVBufferRef * buf
A reference to the reference-counted buffer where the packet data is stored.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
void * opaque
for some private data of the user
AVRational time_base
Time base of the packet's timestamps.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Rational number (pair of numerator and denominator).
int x
top left corner of pict, undefined when pict is not set
char * ass
0 terminated ASS/SSA compatible event line.
int w
width of pict, undefined when pict is not set
int nb_colors
number of colors in pict, undefined when pict is not set
char * text
0 terminated plain UTF-8 text
uint8_t * data[4]
data+linesize for the bitmap of this subtitle.
int y
top left corner of pict, undefined when pict is not set
int h
height of pict, undefined when pict is not set
uint32_t end_display_time
int64_t pts
Same as packet pts, in AV_TIME_BASE.
enum AVHWDeviceType hwaccel_device_type
const AVCodecParameters * par
enum AVPixelFormat hwaccel_output_format
enum HWAccelID hwaccel_id
int multiview_user_config
struct DecoderPriv::@260041143141251327335334307275372141005071125343 standalone_init
int64_t last_frame_duration_est
enum HWAccelID hwaccel_id
enum AVHWDeviceType hwaccel_device_type
enum AVPixelFormat hwaccel_output_format
struct DecoderPriv::@227023135125140132015305245061171227052043121215 * view_map
int64_t last_filter_in_rescale_delta
int last_frame_sample_rate
enum AVPixelFormat hwaccel_pix_fmt
struct DecoderPriv::@340032070334353373263065367120317314122101074253 * views_requested
uint8_t * subtitle_header
struct FrameData::@304126211346234154321045014345346376220164157123 dec
int64_t wallclock[LATENCY_PROBE_NB]
AVCodecParameters * par_enc
AVDictionary * codec_opts
SpecifierOptList codec_names
union SpecifierOpt::@356325016025214271156003270003007057215065005026 u
enum ViewSpecifierType type
#define av_malloc_array(a, b)
static AVDictionary * opts
int64_t av_gettime_relative(void)
Get the current time in microseconds since some unspecified starting point.
timestamp utils, mostly useful for debugging/logging purposes
#define av_ts2str(ts)
Convenience macro, the return value should be used only directly in function arguments but never stan...
#define av_ts2timestr(ts, tb)
Convenience macro, the return value should be used only directly in function arguments but never stan...
static void copy(const float *p1, float *p2, const int length)