FFmpeg
Data Structures | Enumerations | Functions | Variables
pgs_frame_merge_bsf.c File Reference
#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "bsf.h"
#include "bsf_internal.h"

Go to the source code of this file.

Data Structures

struct  PGSMergeContext
 

Enumerations

enum  PGSSegmentType {
  PALETTE_SEGMENT = 0x14, OBJECT_SEGMENT = 0x15, PRESENTATION_SEGMENT = 0x16, WINDOW_SEGMENT = 0x17,
  END_DISPLAY_SET_SEGMENT = 0x80
}
 

Functions

static av_cold void frame_merge_flush (AVBSFContext *bsf)
 
static int frame_merge_output (PGSMergeContext *ctx, AVPacket *dst, AVPacket *src)
 
static int frame_merge_filter (AVBSFContext *bsf, AVPacket *out)
 
static av_cold int frame_merge_init (AVBSFContext *bsf)
 
static av_cold void frame_merge_close (AVBSFContext *bsf)
 

Variables

static enum AVCodecID frame_merge_codec_ids []
 
const FFBitStreamFilter ff_pgs_frame_merge_bsf
 

Detailed Description

This bitstream filter merges PGS subtitle packets containing incomplete set of segments into a single packet

Packets already containing a complete set of segments will be passed through unchanged.

Definition in file pgs_frame_merge_bsf.c.

Enumeration Type Documentation

◆ PGSSegmentType

Enumerator
PALETTE_SEGMENT 
OBJECT_SEGMENT 
PRESENTATION_SEGMENT 
WINDOW_SEGMENT 
END_DISPLAY_SET_SEGMENT 

Definition at line 36 of file pgs_frame_merge_bsf.c.

Function Documentation

◆ frame_merge_flush()

static av_cold void frame_merge_flush ( AVBSFContext bsf)
static

Definition at line 50 of file pgs_frame_merge_bsf.c.

Referenced by frame_merge_filter().

◆ frame_merge_output()

static int frame_merge_output ( PGSMergeContext ctx,
AVPacket dst,
AVPacket src 
)
static

Definition at line 59 of file pgs_frame_merge_bsf.c.

Referenced by frame_merge_filter().

◆ frame_merge_filter()

static int frame_merge_filter ( AVBSFContext bsf,
AVPacket out 
)
static

Definition at line 70 of file pgs_frame_merge_bsf.c.

◆ frame_merge_init()

static av_cold int frame_merge_init ( AVBSFContext bsf)
static

Definition at line 159 of file pgs_frame_merge_bsf.c.

◆ frame_merge_close()

static av_cold void frame_merge_close ( AVBSFContext bsf)
static

Definition at line 171 of file pgs_frame_merge_bsf.c.

Variable Documentation

◆ frame_merge_codec_ids

enum AVCodecID frame_merge_codec_ids[]
static
Initial value:

Definition at line 179 of file pgs_frame_merge_bsf.c.

◆ ff_pgs_frame_merge_bsf

const FFBitStreamFilter ff_pgs_frame_merge_bsf
Initial value:
= {
.p.name = "pgs_frame_merge",
.p.codec_ids = frame_merge_codec_ids,
.priv_data_size = sizeof(PGSMergeContext),
}

Definition at line 183 of file pgs_frame_merge_bsf.c.

filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
AV_CODEC_ID_HDMV_PGS_SUBTITLE
@ AV_CODEC_ID_HDMV_PGS_SUBTITLE
Definition: codec_id.h:533
init
static int init
Definition: av_tx.c:47
frame_merge_flush
static av_cold void frame_merge_flush(AVBSFContext *bsf)
Definition: pgs_frame_merge_bsf.c:50
frame_merge_close
static av_cold void frame_merge_close(AVBSFContext *bsf)
Definition: pgs_frame_merge_bsf.c:171
frame_merge_codec_ids
static enum AVCodecID frame_merge_codec_ids[]
Definition: pgs_frame_merge_bsf.c:179
frame_merge_filter
static int frame_merge_filter(AVBSFContext *bsf, AVPacket *out)
Definition: pgs_frame_merge_bsf.c:70
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:606
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:48
PGSMergeContext
Definition: pgs_frame_merge_bsf.c:44
frame_merge_init
static av_cold int frame_merge_init(AVBSFContext *bsf)
Definition: pgs_frame_merge_bsf.c:159