|
FFmpeg
|
#include "libavutil/avassert.h"#include "libavutil/mem.h"#include "libavutil/opt.h"#include "libavcodec/bsf.h"#include "filters.h"#include "packetsync.h"Go to the source code of this file.
Macros | |
| #define | OFFSET(member) offsetof(FFPacketSync, member) |
| #define | FLAGS (AV_OPT_FLAG_BSF_PARAM|AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_VIDEO_PARAM) |
Enumerations | |
| enum | { STATE_BOF, STATE_RUN, STATE_EOF } |
Variables | |
| static const AVOption | packetsync_options [] |
| const AVClass | ff_packetsync_class |
Packet sync API. Heavily based on libavfilter/framesync.c by Nicolas George
Definition in file packetsync.c.
| #define OFFSET | ( | member | ) | offsetof(FFPacketSync, member) |
Definition at line 32 of file packetsync.c.
| #define FLAGS (AV_OPT_FLAG_BSF_PARAM|AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_VIDEO_PARAM) |
Definition at line 33 of file packetsync.c.
| anonymous enum |
| Enumerator | |
|---|---|
| STATE_BOF | |
| STATE_RUN | |
| STATE_EOF | |
Definition at line 71 of file packetsync.c.
|
static |
Definition at line 35 of file packetsync.c.
| const AVClass* ff_packetsync_child_class_iterate | ( | void ** | iter | ) |
Definition at line 64 of file packetsync.c.
|
static |
Definition at line 301 of file packetsync.c.
Referenced by packetsync_advance().
| void ff_packetsync_preinit | ( | FFPacketSync * | fs | ) |
Pre-initialize a packet sync structure.
It sets the class pointer and inits the options to their default values. The entire structure is expected to be already set to 0. This step is optional, but necessary to use the options.
Definition at line 79 of file packetsync.c.
Referenced by ff_packetsync_init().
| int ff_packetsync_init | ( | FFPacketSync * | fs, |
| AVBitStreamFilterContext * | parent, | ||
| unsigned | nb_in | ||
| ) |
Initialize a packet sync structure.
The entire structure is expected to be already set to 0 or preinited.
| fs | packet sync structure to initialize |
| parent | parent AVBitStreamFilterContext object |
| nb_in | number of inputs |
Definition at line 87 of file packetsync.c.
Referenced by ff_packetsync_init_dualinput().
|
static |
Definition at line 107 of file packetsync.c.
Referenced by packetsync_advance(), and packetsync_sync_level_update().
|
static |
Definition at line 114 of file packetsync.c.
Referenced by ff_packetsync_configure(), and packetsync_inject_status().
| int ff_packetsync_configure | ( | FFPacketSync * | fs | ) |
Configure a packet sync structure.
Must be called after all options are set but before all use.
Definition at line 138 of file packetsync.c.
Referenced by config_output().
|
static |
Definition at line 178 of file packetsync.c.
Referenced by ff_packetsync_activate().
|
static |
Definition at line 227 of file packetsync.c.
Referenced by packetsync_inject_status().
|
static |
Definition at line 233 of file packetsync.c.
Referenced by consume_from_fifos().
|
static |
Definition at line 246 of file packetsync.c.
Referenced by consume_from_fifos().
| int ff_packetsync_get_packet | ( | FFPacketSync * | fs, |
| unsigned | in, | ||
| AVPacket ** | rpacket, | ||
| unsigned | get | ||
| ) |
Get the current packet in an input.
| fs | packet sync structure |
| in | index of the input |
| rpacket | used to return the current packet (or NULL) |
| get | if not zero, the calling code needs to get ownership of the returned packet; the current packet will either be duplicated or removed from the packetsync structure |
Definition at line 257 of file packetsync.c.
Referenced by ff_packetsync_dualinput_get().
| void ff_packetsync_uninit | ( | FFPacketSync * | fs | ) |
Free all memory currently allocated.
Definition at line 289 of file packetsync.c.
Referenced by uninit().
| int ff_packetsync_activate | ( | FFPacketSync * | fs | ) |
Examine the packets in the filter's input and try to produce output.
This function can be the complete implementation of the activate method of a filter using packetsync.
Definition at line 340 of file packetsync.c.
Referenced by activate().
| int ff_packetsync_init_dualinput | ( | FFPacketSync * | fs, |
| AVBitStreamFilterContext * | parent | ||
| ) |
Initialize a packet sync structure for dualinput.
Compared to generic packetsync, dualinput assumes the first input is the main one and the filtering is performed on it. The first input will be the only one with sync set and generic timeline support will just pass it unchanged when disabled.
Equivalent to ff_packetsync_init(fs, parent, 2) then setting the time base, sync and ext modes on the inputs.
Definition at line 366 of file packetsync.c.
Referenced by config_output().
| int ff_packetsync_dualinput_get | ( | FFPacketSync * | fs, |
| AVPacket ** | f0, | ||
| AVPacket ** | f1 | ||
| ) |
| f0 | used to return the main packet |
| f1 | used to return the second packet, or NULL if disabled |
Definition at line 384 of file packetsync.c.
Referenced by ff_packetsync_dualinput_get_writable(), and lcevc_merge().
| int ff_packetsync_dualinput_get_writable | ( | FFPacketSync * | fs, |
| AVPacket ** | f0, | ||
| AVPacket ** | f1 | ||
| ) |
Same as ff_packetsync_dualinput_get(), but make sure that f0 is writable.
Definition at line 402 of file packetsync.c.
|
static |
Definition at line 40 of file packetsync.c.
| const AVClass ff_packetsync_class |
Definition at line 55 of file packetsync.c.
Referenced by ff_packetsync_child_class_iterate(), and ff_packetsync_preinit().
1.8.17