FFmpeg
Data Structures | Functions | Variables
h264_mp4toannexb_bsf.c File Reference
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bsf.h"
#include "h264.h"

Go to the source code of this file.

Data Structures

struct  H264BSFContext
 

Functions

static int alloc_and_copy (AVPacket *out, const uint8_t *sps_pps, uint32_t sps_pps_size, const uint8_t *in, uint32_t in_size, int ps)
 
static int h264_extradata_to_annexb (AVBSFContext *ctx, const int padding)
 
static int h264_mp4toannexb_init (AVBSFContext *ctx)
 
static int h264_mp4toannexb_filter (AVBSFContext *ctx, AVPacket *out)
 
static void h264_mp4toannexb_flush (AVBSFContext *ctx)
 

Variables

static enum AVCodecID codec_ids []
 
const AVBitStreamFilter ff_h264_mp4toannexb_bsf
 

Function Documentation

◆ alloc_and_copy()

static int alloc_and_copy ( AVPacket out,
const uint8_t sps_pps,
uint32_t  sps_pps_size,
const uint8_t in,
uint32_t  in_size,
int  ps 
)
static

Definition at line 41 of file h264_mp4toannexb_bsf.c.

Referenced by h264_mp4toannexb_filter().

◆ h264_extradata_to_annexb()

static int h264_extradata_to_annexb ( AVBSFContext ctx,
const int  padding 
)
static

Definition at line 67 of file h264_mp4toannexb_bsf.c.

Referenced by h264_mp4toannexb_init().

◆ h264_mp4toannexb_init()

static int h264_mp4toannexb_init ( AVBSFContext ctx)
static

Definition at line 141 of file h264_mp4toannexb_bsf.c.

◆ h264_mp4toannexb_filter()

static int h264_mp4toannexb_filter ( AVBSFContext ctx,
AVPacket out 
)
static

Definition at line 171 of file h264_mp4toannexb_bsf.c.

◆ h264_mp4toannexb_flush()

static void h264_mp4toannexb_flush ( AVBSFContext ctx)
static

Definition at line 283 of file h264_mp4toannexb_bsf.c.

Variable Documentation

◆ codec_ids

enum AVCodecID codec_ids[]
static
Initial value:

Definition at line 292 of file h264_mp4toannexb_bsf.c.

◆ ff_h264_mp4toannexb_bsf

const AVBitStreamFilter ff_h264_mp4toannexb_bsf
Initial value:
= {
.name = "h264_mp4toannexb",
.priv_data_size = sizeof(H264BSFContext),
}

Definition at line 296 of file h264_mp4toannexb_bsf.c.

init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
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
h264_mp4toannexb_flush
static void h264_mp4toannexb_flush(AVBSFContext *ctx)
Definition: h264_mp4toannexb_bsf.c:283
codec_ids
static enum AVCodecID codec_ids[]
Definition: h264_mp4toannexb_bsf.c:292
h264_mp4toannexb_filter
static int h264_mp4toannexb_filter(AVBSFContext *ctx, AVPacket *out)
Definition: h264_mp4toannexb_bsf.c:171
H264BSFContext
Definition: h264_mp4toannexb_bsf.c:31
AV_CODEC_ID_H264
@ AV_CODEC_ID_H264
Definition: avcodec.h:245
flush
static void flush(AVCodecContext *avctx)
Definition: aacdec_template.c:500
h264_mp4toannexb_init
static int h264_mp4toannexb_init(AVBSFContext *ctx)
Definition: h264_mp4toannexb_bsf.c:141
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: avcodec.h:216