FFmpeg
|
#include <stddef.h>
#include <stdint.h>
#include "libavutil/frame.h"
#include "libavutil/rational.h"
Go to the source code of this file.
Data Structures | |
struct | CCFifo |
Macros | |
#define | CC_BYTES_PER_ENTRY 3 |
Functions | |
int | ff_ccfifo_init (CCFifo *ccf, AVRational framerate, void *log_ctx) |
Initialize a CCFifo. More... | |
void | ff_ccfifo_uninit (CCFifo *ccf) |
Free all memory allocated in a CCFifo and clear the context. More... | |
int | ff_ccfifo_extract (CCFifo *ccf, AVFrame *frame) |
Extract CC data from an AVFrame. More... | |
int | ff_ccfifo_extractbytes (CCFifo *ccf, uint8_t *data, size_t len) |
Just like ff_ccfifo_extract(), but takes the raw bytes instead of an AVFrame. More... | |
static int | ff_ccfifo_getoutputsize (const CCFifo *ccf) |
Provide the size in bytes of an output buffer to allocate. More... | |
int | ff_ccfifo_inject (CCFifo *ccf, AVFrame *frame) |
Insert CC data from the FIFO into an AVFrame (as side data) More... | |
int | ff_ccfifo_injectbytes (CCFifo *ccf, uint8_t *data, size_t len) |
Just like ff_ccfifo_inject(), but takes the raw bytes to insert the CC data int rather than an AVFrame. More... | |
static int | ff_ccfifo_ccdetected (const CCFifo *ccf) |
Returns 1 if captions have been found as a prior call to ff_ccfifo_extract() or ff_ccfifo_extractbytes() More... | |
CC FIFO Buffer
Definition in file ccfifo.h.
int ff_ccfifo_init | ( | CCFifo * | ccf, |
AVRational | framerate, | ||
void * | log_ctx | ||
) |
Initialize a CCFifo.
framerate | output framerate |
log_ctx | used for any av_log() calls |
Definition at line 53 of file ccfifo.c.
Referenced by config_input(), config_out_props(), config_props(), ff_decklink_write_header(), and ff_yadif_config_output_common().
void ff_ccfifo_uninit | ( | CCFifo * | ccf | ) |
Free all memory allocated in a CCFifo and clear the context.
ccf | Pointer to the CCFifo which should be uninitialized |
Definition at line 46 of file ccfifo.c.
Referenced by ff_ccfifo_init(), ff_decklink_write_trailer(), ff_yadif_uninit(), and uninit().
Extract CC data from an AVFrame.
Extract CC bytes from the AVFrame, insert them into our queue, and remove the side data from the AVFrame. The side data is removed as it will be re-inserted at the appropriate rate later in the filter.
Definition at line 183 of file ccfifo.c.
Referenced by ff_yadif_filter_frame(), filter_frame(), and read_frame().
int ff_ccfifo_extractbytes | ( | CCFifo * | ccf, |
uint8_t * | data, | ||
size_t | len | ||
) |
Just like ff_ccfifo_extract(), but takes the raw bytes instead of an AVFrame.
Definition at line 154 of file ccfifo.c.
Referenced by decklink_write_subtitle_packet(), and ff_ccfifo_extract().
|
inlinestatic |
Provide the size in bytes of an output buffer to allocate.
Ask for how many bytes the output will contain, so the caller can allocate an appropriately sized buffer and pass it to ff_ccfifo_injectbytes()
Definition at line 95 of file ccfifo.h.
Referenced by ff_ccfifo_inject(), and ff_ccfifo_injectbytes().
Insert CC data from the FIFO into an AVFrame (as side data)
Dequeue the appropriate number of CC tuples based on the frame rate, and insert them into the AVFrame
Definition at line 133 of file ccfifo.c.
Referenced by ff_yadif_filter_frame(), filter_frame(), return_frame(), and write_frame().
int ff_ccfifo_injectbytes | ( | CCFifo * | ccf, |
uint8_t * | data, | ||
size_t | len | ||
) |
Just like ff_ccfifo_inject(), but takes the raw bytes to insert the CC data int rather than an AVFrame.
Definition at line 92 of file ccfifo.c.
Referenced by ff_ccfifo_inject().
|
inlinestatic |
Returns 1 if captions have been found as a prior call to ff_ccfifo_extract() or ff_ccfifo_extractbytes()