FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
nuv.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/intfloat.h"
#include "avformat.h"
#include "avio_internal.h"
#include "demux.h"
#include "internal.h"
#include "riff.h"

Go to the source code of this file.

Data Structures

struct  NUVContext
 

Macros

#define PKTSIZE(s)   (s & 0xffffff)
 little macro to sanitize packet size More...
 
#define HDRSIZE   12
 

Enumerations

enum  nuv_frametype {
  NUV_VIDEO = 'V', NUV_EXTRADATA = 'D', NUV_AUDIO = 'A', NUV_SEEKP = 'R',
  NUV_MYTHEXT = 'X'
}
 

Functions

static int nuv_probe (const AVProbeData *p)
 
static int get_codec_data (AVFormatContext *s, AVIOContext *pb, AVStream *vst, AVStream *ast, int myth)
 read until we found all data needed for decoding More...
 
static int nuv_header (AVFormatContext *s)
 
static int nuv_packet (AVFormatContext *s, AVPacket *pkt)
 
static int nuv_resync (AVFormatContext *s, int64_t pos_limit)
 looks for the string RTjjjjjjjjjj in the stream too resync reading More...
 
static int64_t nuv_read_dts (AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit)
 attempts to read a timestamp from stream at the given stream position More...
 

Variables

static const AVCodecTag nuv_audio_tags []
 
const FFInputFormat ff_nuv_demuxer
 

Macro Definition Documentation

◆ PKTSIZE

#define PKTSIZE (   s)    (s & 0xffffff)

little macro to sanitize packet size

Definition at line 62 of file nuv.c.

◆ HDRSIZE

#define HDRSIZE   12

Definition at line 251 of file nuv.c.

Enumeration Type Documentation

◆ nuv_frametype

Enumerator
NUV_VIDEO 
NUV_EXTRADATA 
NUV_AUDIO 
NUV_SEEKP 
NUV_MYTHEXT 

Definition at line 44 of file nuv.c.

Function Documentation

◆ nuv_probe()

static int nuv_probe ( const AVProbeData p)
static

Definition at line 52 of file nuv.c.

◆ get_codec_data()

static int get_codec_data ( AVFormatContext s,
AVIOContext pb,
AVStream vst,
AVStream ast,
int  myth 
)
static

read until we found all data needed for decoding

Parameters
vstvideo stream of which to change parameters
astvideo stream of which to change parameters
mythset if this is a MythTVVideo format file
Returns
0 or AVERROR code

Definition at line 71 of file nuv.c.

Referenced by nuv_header().

◆ nuv_header()

static int nuv_header ( AVFormatContext s)
static

Definition at line 159 of file nuv.c.

◆ nuv_packet()

static int nuv_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 253 of file nuv.c.

◆ nuv_resync()

static int nuv_resync ( AVFormatContext s,
int64_t  pos_limit 
)
static

looks for the string RTjjjjjjjjjj in the stream too resync reading

Returns
1 if the syncword is found 0 otherwise.

Definition at line 330 of file nuv.c.

Referenced by nuv_read_dts().

◆ nuv_read_dts()

static int64_t nuv_read_dts ( AVFormatContext s,
int  stream_index,
int64_t ppos,
int64_t  pos_limit 
)
static

attempts to read a timestamp from stream at the given stream position

Returns
timestamp if successful and AV_NOPTS_VALUE if failure

Definition at line 347 of file nuv.c.

Variable Documentation

◆ nuv_audio_tags

const AVCodecTag nuv_audio_tags[]
static
Initial value:
= {
{ AV_CODEC_ID_PCM_S16LE, MKTAG('R', 'A', 'W', 'A') },
{ AV_CODEC_ID_MP3, MKTAG('L', 'A', 'M', 'E') },
}

Definition at line 32 of file nuv.c.

Referenced by get_codec_data().

◆ ff_nuv_demuxer

const FFInputFormat ff_nuv_demuxer
Initial value:
= {
.p.name = "nuv",
.p.long_name = NULL_IF_CONFIG_SMALL("NuppelVideo"),
.p.flags = AVFMT_GENERIC_INDEX,
.priv_data_size = sizeof(NUVContext),
}

Definition at line 401 of file nuv.c.

AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:334
nuv_read_dts
static int64_t nuv_read_dts(AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit)
attempts to read a timestamp from stream at the given stream position
Definition: nuv.c:347
NUVContext
Definition: nuv.c:38
AVFMT_GENERIC_INDEX
#define AVFMT_GENERIC_INDEX
Use generic index building code.
Definition: avformat.h:480
AV_CODEC_ID_MP3
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: codec_id.h:447
read_packet
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
Definition: avio_read_callback.c:42
nuv_packet
static int nuv_packet(AVFormatContext *s, AVPacket *pkt)
Definition: nuv.c:253
read_header
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:540
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:94
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
nuv_header
static int nuv_header(AVFormatContext *s)
Definition: nuv.c:159
read_probe
static int read_probe(const AVProbeData *p)
Definition: cdg.c:30
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
read_timestamp
static int64_t read_timestamp(AVFormatContext *s, int stream_index, int64_t *ppos, int64_t pos_limit, int64_t(*read_timestamp)(struct AVFormatContext *, int, int64_t *, int64_t))
Definition: seek.c:281
nuv_probe
static int nuv_probe(const AVProbeData *p)
Definition: nuv.c:52