FFmpeg
Macros | Functions | Variables
uncodedframecrcenc.c File Reference
#include "libavutil/adler32.h"
#include "libavutil/avassert.h"
#include "libavutil/bprint.h"
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixdesc.h"
#include "libavformat/mux.h"
#include "avformat.h"
#include "internal.h"

Go to the source code of this file.

Macros

#define DEFINE_CKSUM_LINE(name, type, conv)
 

Functions

static void video_frame_cksum (AVBPrint *bp, AVFrame *frame)
 
static void audio_frame_cksum (AVBPrint *bp, AVFrame *frame)
 
static int write_header (struct AVFormatContext *s)
 
static int write_frame (struct AVFormatContext *s, int stream_index, AVFrame **frame, unsigned flags)
 
static int write_packet (struct AVFormatContext *s, AVPacket *pkt)
 

Variables

const FFOutputFormat ff_uncodedframecrc_muxer
 

Macro Definition Documentation

◆ DEFINE_CKSUM_LINE

#define DEFINE_CKSUM_LINE (   name,
  type,
  conv 
)
Value:
static void cksum_line_ ## name(unsigned *cksum, void *data, unsigned size) \
{ \
type *p = data; \
unsigned a = *cksum & 0xFFFF, b = *cksum >> 16; \
for (; size > 0; size--, p++) { \
a = (a + (unsigned)(conv)) % 65521; \
b = (b + a) % 65521; \
} \
*cksum = a | (b << 16); \
}

Definition at line 32 of file uncodedframecrcenc.c.

Function Documentation

◆ video_frame_cksum()

static void video_frame_cksum ( AVBPrint *  bp,
AVFrame frame 
)
static

Definition at line 50 of file uncodedframecrcenc.c.

Referenced by write_frame().

◆ audio_frame_cksum()

static void audio_frame_cksum ( AVBPrint *  bp,
AVFrame frame 
)
static

Definition at line 79 of file uncodedframecrcenc.c.

Referenced by write_frame().

◆ write_header()

static int write_header ( struct AVFormatContext s)
static

Definition at line 124 of file uncodedframecrcenc.c.

◆ write_frame()

static int write_frame ( struct AVFormatContext s,
int  stream_index,
AVFrame **  frame,
unsigned  flags 
)
static

Definition at line 129 of file uncodedframecrcenc.c.

◆ write_packet()

static int write_packet ( struct AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 164 of file uncodedframecrcenc.c.

Variable Documentation

◆ ff_uncodedframecrc_muxer

const FFOutputFormat ff_uncodedframecrc_muxer
Initial value:
= {
.p.name = "uncodedframecrc",
.p.long_name = NULL_IF_CONFIG_SMALL("uncoded framecrc testing"),
.p.audio_codec = AV_CODEC_ID_PCM_S16LE,
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = write_header,
.write_packet = write_packet,
.write_uncoded_frame = write_frame,
}

Definition at line 169 of file uncodedframecrcenc.c.

AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:328
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
AVFMT_VARIABLE_FPS
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:482
AV_CODEC_ID_RAWVIDEO
@ AV_CODEC_ID_RAWVIDEO
Definition: codec_id.h:65
b
#define b
Definition: input.c:41
data
const char data[16]
Definition: mxf.c:148
conv
static int conv(int samples, float **pcm, char *buf, int channels)
Definition: libvorbisdec.c:134
write_frame
static int write_frame(struct AVFormatContext *s, int stream_index, AVFrame **frame, unsigned flags)
Definition: uncodedframecrcenc.c:129
write_packet
static int write_packet(struct AVFormatContext *s, AVPacket *pkt)
Definition: uncodedframecrcenc.c:164
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
size
int size
Definition: twinvq_data.h:10344
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
write_header
static int write_header(struct AVFormatContext *s)
Definition: uncodedframecrcenc.c:124
AVFMT_TS_NEGATIVE
#define AVFMT_TS_NEGATIVE
Format allows muxing negative timestamps.
Definition: avformat.h:494
AVFMT_TS_NONSTRICT
#define AVFMT_TS_NONSTRICT
Format does not require strictly increasing timestamps, but they must still be monotonic.
Definition: avformat.h:491