Go to the documentation of this file.
27 #define MAX_CC_ELEMENTS 128
39 { 24000, 1001, 25, 3 },
41 { 30000, 1001, 20, 2},
43 { 60000, 1001, 10, 1},
50 memset(ccf, 0,
sizeof(*ccf));
57 memset(ccf, 0,
sizeof(*ccf));
94 int cc_608_tuples = 0;
95 int cc_708_tuples = 0;
112 cc_filled += cc_608_tuples;
120 cc_filled += cc_708_tuples;
123 while (cc_filled < ccf->expected_cc_count) {
160 "cc_fifo cannot transcode captions fps=%d/%d\n",
171 if (cc_type == 0x00 || cc_type == 0x01) {
173 }
else if (cc_valid && (cc_type == 0x02 || cc_type == 0x03)) {
static void error(const char *err)
#define AV_LOG_WARNING
Something somehow does not look correct.
int ff_ccfifo_extractbytes(CCFifo *ccf, uint8_t *cc_bytes, size_t len)
Just like ff_ccfifo_extract(), but takes the raw bytes instead of an AVFrame.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
AVFrameSideData * av_frame_get_side_data(const AVFrame *frame, enum AVFrameSideDataType type)
AVFrameSideData * av_frame_new_side_data(AVFrame *frame, enum AVFrameSideDataType type, size_t size)
Add a new side data to a frame.
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
const static struct cc_lookup cc_lookup_vals[]
This structure describes decoded (raw) audio or video data.
int av_fifo_write(AVFifo *f, const void *buf, size_t nb_elems)
Write data into a FIFO.
void ff_ccfifo_uninit(CCFifo *ccf)
Free all memory allocated in a CCFifo and clear the context.
#define FF_ARRAY_ELEMS(a)
int av_fifo_read(AVFifo *f, void *buf, size_t nb_elems)
Read data from a FIFO.
int ff_ccfifo_inject(CCFifo *ccf, AVFrame *frame)
Insert CC data from the FIFO into an AVFrame (as side data)
static int ff_ccfifo_getoutputsize(const CCFifo *ccf)
Provide the size in bytes of an output buffer to allocate.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Rational number (pair of numerator and denominator).
size_t av_fifo_can_read(const AVFifo *f)
int ff_ccfifo_extract(CCFifo *ccf, AVFrame *frame)
Extract CC data from an AVFrame.
struct AVFifo * cc_608_fifo
#define CC_BYTES_PER_ENTRY
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type)
Remove and free all side data instances of the given type.
#define i(width, name, range_min, range_max)
int ff_ccfifo_init(CCFifo *ccf, AVRational framerate, void *log_ctx)
Initialize a CCFifo.
int ff_ccfifo_injectbytes(CCFifo *ccf, uint8_t *cc_data, size_t len)
Just like ff_ccfifo_inject(), but takes the raw bytes to insert the CC data int rather than an AVFram...
AVFifo * av_fifo_alloc2(size_t nb_elems, size_t elem_size, unsigned int flags)
Allocate and initialize an AVFifo with a given element size.
struct AVFifo * cc_708_fifo
void av_log_once(void *avcl, int initial_level, int subsequent_level, int *state, const char *fmt,...)
Structure to hold side data for an AVFrame.
void av_fifo_freep2(AVFifo **f)
Free an AVFifo and reset pointer to NULL.