FFmpeg
Data Structures | Enumerations | Functions | Variables
pgs_frame_merge.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.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.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.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.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.c.

◆ frame_merge_init()

static av_cold int frame_merge_init ( AVBSFContext bsf)
static

Definition at line 159 of file pgs_frame_merge.c.

◆ frame_merge_close()

static av_cold void frame_merge_close ( AVBSFContext bsf)
static

Definition at line 171 of file pgs_frame_merge.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.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.c.

frame_merge_close
static av_cold void frame_merge_close(AVBSFContext *bsf)
Definition: pgs_frame_merge.c:171
filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
AV_CODEC_ID_HDMV_PGS_SUBTITLE
@ AV_CODEC_ID_HDMV_PGS_SUBTITLE
Definition: codec_id.h:556
flush
void(* flush)(AVBSFContext *ctx)
Definition: dts2pts.c:368
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:366
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
PGSMergeContext
Definition: pgs_frame_merge.c:44
frame_merge_flush
static av_cold void frame_merge_flush(AVBSFContext *bsf)
Definition: pgs_frame_merge.c:50
frame_merge_filter
static int frame_merge_filter(AVBSFContext *bsf, AVPacket *out)
Definition: pgs_frame_merge.c:70
frame_merge_codec_ids
static enum AVCodecID frame_merge_codec_ids[]
Definition: pgs_frame_merge.c:179
frame_merge_init
static av_cold int frame_merge_init(AVBSFContext *bsf)
Definition: pgs_frame_merge.c:159