FFmpeg: libavcodec/bsf/trace_headers.c Source File
Go to the documentation of this file. 1 /*
2 * This file is part of FFmpeg.
3 *
4 * FFmpeg is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * FFmpeg is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with FFmpeg; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19 #include <inttypes.h>
20
24
28
29
34
35
37 {
39 int err;
40
42 if (err < 0)
43 return err;
44
45 ctx->cbc->trace_enable = 1;
47 ctx->cbc->trace_context =
ctx->cbc;
49
52
54
56
58 }
59
60 return err;
61 }
62
64 {
66
69 }
70
72 {
75 char tmp[256] = { 0 };
76 int err;
77
79 if (err < 0)
80 return err;
81
86
89 else
93 else
97
99
102
105
106 if (err < 0) {
108 return err;
109 }
111 }
112
114
116
117 if (err < 0)
119 return err;
120 }
121
123 .
p.
name =
"trace_headers",
129 };
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
AVCodecParameters * par_in
Parameters of the input stream.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
av_cold void ff_cbs_fragment_free(CodedBitstreamFragment *frag)
Free the units array of a fragment in addition to what ff_cbs_fragment_reset does.
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
int ff_cbs_read_extradata(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const AVCodecParameters *par)
Read the extradata bitstream found in codec parameters into a fragment, then split into units and dec...
int ff_cbs_read_packet_side_data(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const AVPacket *pkt)
void ff_cbs_fragment_reset(CodedBitstreamFragment *frag)
Free the units contained in a fragment as well as the fragment's own data buffer, but not the units a...
Context structure for coded bitstream operations.
void(* filter)(uint8_t *src, int stride, int qscale)
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
size_t av_strlcatf(char *dst, size_t size, const char *fmt,...)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
The bitstream filter state.
av_cold void ff_cbs_close(CodedBitstreamContext **ctx_ptr)
Close a context and free all internal state.
void ff_cbs_trace_read_log(void *trace_context, GetBitContext *gbc, int length, const char *str, const int *subscripts, int64_t value)
Helper function for read tracing which formats the syntax element and logs the result.
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
Coded bitstream fragment structure, combining one or more units.
enum AVCodecID ff_cbs_all_codec_ids[]
Table of all supported codec IDs.
AVBitStreamFilter p
The public AVBitStreamFilter.
int(* init)(AVBSFContext *ctx)
#define AV_NOPTS_VALUE
Undefined timestamp value.
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
int flags
A combination of AV_PKT_FLAG values.
#define AV_LOG_INFO
Standard information.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
void * priv_data
Opaque filter-specific private data.
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,...
int ff_cbs_read_packet(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, const AVPacket *pkt)
Read the data bitstream from a packet into a fragment, then split into units and decompose.
av_cold int ff_cbs_init(CodedBitstreamContext **ctx_ptr, enum AVCodecID codec_id, void *log_ctx)
Create and initialise a new context for the given codec.
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
This structure stores compressed data.
int ff_bsf_get_packet_ref(AVBSFContext *ctx, AVPacket *pkt)
Called by bitstream filters to get packet for filtering.
Generated on Fri Aug 22 2025 13:58:12 for FFmpeg by
doxygen
1.8.17