FFmpeg
Data Structures | Functions | Variables
dts2pts.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/fifo.h"
#include "libavutil/mem.h"
#include "libavutil/tree.h"
#include "bsf.h"
#include "bsf_internal.h"
#include "cbs.h"
#include "cbs_h264.h"
#include "h264_parse.h"
#include "h264_ps.h"
#include "refstruct.h"

Go to the source code of this file.

Data Structures

struct  DTS2PTSNode
 
struct  DTS2PTSFrame
 
struct  DTS2PTSH264Context
 
struct  DTS2PTSContext
 

Functions

static int cmp_insert (const void *key, const void *node)
 
static int cmp_find (const void *key, const void *node)
 
static int dec_poc (void *opaque, void *elem)
 
static int free_node (void *opaque, void *elem)
 
static int alloc_and_insert_node (AVBSFContext *ctx, int64_t ts, int64_t duration, int poc, int poc_diff, int gop)
 
static int h264_init (AVBSFContext *ctx)
 
static int get_mmco_reset (const H264RawSliceHeader *header)
 
static int h264_queue_frame (AVBSFContext *ctx, AVPacket *pkt, int poc, int *queued)
 
static int h264_filter (AVBSFContext *ctx)
 
static void h264_flush (AVBSFContext *ctx)
 
static int dts2pts_init (AVBSFContext *ctx)
 
static int dts2pts_filter (AVBSFContext *ctx, AVPacket *out)
 
static void dts2pts_flush (AVBSFContext *ctx)
 
static void dts2pts_close (AVBSFContext *ctx)
 

Variables

static const CodedBitstreamUnitType h264_decompose_unit_types []
 
struct {
   enum AVCodecID   id
 
   int(*   init )(AVBSFContext *ctx)
 
   int(*   filter )(AVBSFContext *ctx)
 
   void(*   flush )(AVBSFContext *ctx)
 
   size_t   fifo_size
 
func_tab []
 
static enum AVCodecID dts2pts_codec_ids []
 
const FFBitStreamFilter ff_dts2pts_bsf
 

Detailed Description

Derive PTS by reordering DTS from supported streams

Definition in file dts2pts.c.

Function Documentation

◆ cmp_insert()

static int cmp_insert ( const void *  key,
const void *  node 
)
static

Definition at line 86 of file dts2pts.c.

Referenced by alloc_and_insert_node(), and dts2pts_filter().

◆ cmp_find()

static int cmp_find ( const void *  key,
const void *  node 
)
static

Definition at line 94 of file dts2pts.c.

Referenced by dts2pts_filter().

◆ dec_poc()

static int dec_poc ( void *  opaque,
void *  elem 
)
static

Definition at line 104 of file dts2pts.c.

Referenced by h264_filter(), and h264_queue_frame().

◆ free_node()

static int free_node ( void *  opaque,
void *  elem 
)
static

Definition at line 112 of file dts2pts.c.

Referenced by dts2pts_flush().

◆ alloc_and_insert_node()

static int alloc_and_insert_node ( AVBSFContext ctx,
int64_t  ts,
int64_t  duration,
int  poc,
int  poc_diff,
int  gop 
)
static

Definition at line 120 of file dts2pts.c.

Referenced by dts2pts_filter(), and h264_queue_frame().

◆ h264_init()

static int h264_init ( AVBSFContext ctx)
static

Definition at line 155 of file dts2pts.c.

◆ get_mmco_reset()

static int get_mmco_reset ( const H264RawSliceHeader header)
static

Definition at line 169 of file dts2pts.c.

Referenced by h264_filter().

◆ h264_queue_frame()

static int h264_queue_frame ( AVBSFContext ctx,
AVPacket pkt,
int  poc,
int *  queued 
)
static

Definition at line 185 of file dts2pts.c.

Referenced by h264_filter().

◆ h264_filter()

static int h264_filter ( AVBSFContext ctx)
static

Definition at line 225 of file dts2pts.c.

◆ h264_flush()

static void h264_flush ( AVBSFContext ctx)
static

Definition at line 354 of file dts2pts.c.

◆ dts2pts_init()

static int dts2pts_init ( AVBSFContext ctx)
static

Definition at line 376 of file dts2pts.c.

◆ dts2pts_filter()

static int dts2pts_filter ( AVBSFContext ctx,
AVPacket out 
)
static

Definition at line 427 of file dts2pts.c.

◆ dts2pts_flush()

static void dts2pts_flush ( AVBSFContext ctx)
static

Definition at line 503 of file dts2pts.c.

Referenced by dts2pts_close().

◆ dts2pts_close()

static void dts2pts_close ( AVBSFContext ctx)
static

Definition at line 525 of file dts2pts.c.

Variable Documentation

◆ h264_decompose_unit_types

const CodedBitstreamUnitType h264_decompose_unit_types[]
static
Initial value:

Definition at line 148 of file dts2pts.c.

Referenced by h264_init().

◆ id

enum AVCodecID id

Definition at line 367 of file dts2pts.c.

Referenced by accumulate_huff_bit_consumption(), add_tracked_method(), alf_get_coeff_and_clip(), ape_tag_read_field(), asf_read_picture(), av_channel_from_string(), av_codec_get_id(), av_new_program(), avi_add_ientry(), avi_get_ientry(), avpriv_new_chapter(), che_configure(), create_new_audio_stream(), decode_frame(), derive_scale_m(), dxtory_decode_v1_rgb(), ebml_writer_add(), eval_expr(), exif_decode_tag(), ff_aac_output_configure(), ff_aac_usac_reset_state(), ff_flac_parse_picture(), ff_get_wav_header(), ff_jpegls_decode_lse(), ff_mjpeg_decode_sos(), ff_mov_read_stsd_entries(), ff_rtsp_tcp_read_packet(), ff_rtsp_tcp_write_packet(), ff_wav_codec_get_id(), ffat_update_ctx(), flush_packet(), frame_configure_elements(), get_codec_data(), get_sindex(), LLVMFuzzerTestOneInput(), lsp_unquant_high(), lsp_unquant_lbr(), lsp_unquant_nb(), lvf_read_header(), lvf_read_packet(), mjpeg_decode_app(), mov_codec_id(), mov_get_channel_layout(), mov_read_covr(), mov_read_frma(), mpegts_check_bitstream(), of_map_group(), parse_object_segment(), parse_palette_segment(), print_section(), put_system_header(), qdm2_parse_subpacket(), read_apic(), remap_deprecated_codec_id(), rso_read_header(), scaling_derive(), set_codec_from_probe_data(), sol_read_header(), txd_read_packet(), v4l2_get_ext_ctrl(), v4l2_set_ext_ctrl(), wavarc_probe(), wavarc_read_header(), wavpack_decode_block(), webm_reformat_vtt(), webvtt_write_packet(), write_chapter(), and wv_read_block_header().

◆ init

int(* init) (AVBSFContext *ctx)

◆ filter

int(* filter) (AVBSFContext *ctx)

Definition at line 369 of file dts2pts.c.

◆ flush

void(* flush) (AVBSFContext *ctx)

◆ fifo_size

size_t fifo_size

Definition at line 371 of file dts2pts.c.

Referenced by async_read_internal(), and async_seek().

◆ func_tab

const { ... } func_tab[]
Initial value:

Referenced by dts2pts_init().

◆ dts2pts_codec_ids

enum AVCodecID dts2pts_codec_ids[]
static
Initial value:

Definition at line 537 of file dts2pts.c.

◆ ff_dts2pts_bsf

const FFBitStreamFilter ff_dts2pts_bsf
Initial value:
= {
.p.name = "dts2pts",
.p.codec_ids = dts2pts_codec_ids,
.priv_data_size = sizeof(DTS2PTSContext),
.close = dts2pts_close,
}

Definition at line 542 of file dts2pts.c.

dts2pts_flush
static void dts2pts_flush(AVBSFContext *ctx)
Definition: dts2pts.c:503
H264_NAL_SLICE
@ H264_NAL_SLICE
Definition: h264.h:35
DTS2PTSContext
Definition: dts2pts.c:62
dts2pts_filter
static int dts2pts_filter(AVBSFContext *ctx, AVPacket *out)
Definition: dts2pts.c:427
h264_init
static int h264_init(AVBSFContext *ctx)
Definition: dts2pts.c:155
H264_NAL_PPS
@ H264_NAL_PPS
Definition: h264.h:42
filter
int(* filter)(AVBSFContext *ctx)
Definition: dts2pts.c:369
h264_flush
static void h264_flush(AVBSFContext *ctx)
Definition: dts2pts.c:354
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: codec_id.h:79
H264_MAX_DPB_FRAMES
@ H264_MAX_DPB_FRAMES
Definition: h264.h:76
flush
void(* flush)(AVBSFContext *ctx)
Definition: dts2pts.c:370
H264_NAL_IDR_SLICE
@ H264_NAL_IDR_SLICE
Definition: h264.h:39
dts2pts_init
static int dts2pts_init(AVBSFContext *ctx)
Definition: dts2pts.c:376
dts2pts_codec_ids
static enum AVCodecID dts2pts_codec_ids[]
Definition: dts2pts.c:537
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:368
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
h264_filter
static int h264_filter(AVBSFContext *ctx)
Definition: dts2pts.c:225
dts2pts_close
static void dts2pts_close(AVBSFContext *ctx)
Definition: dts2pts.c:525
H264_NAL_SPS
@ H264_NAL_SPS
Definition: h264.h:41