FFmpeg
Functions | Variables
nut.c File Reference
#include "libavutil/mathematics.h"
#include "libavutil/mem.h"
#include "libavutil/tree.h"
#include "nut.h"
#include "riff.h"
#include "internal.h"

Go to the source code of this file.

Functions

void ff_nut_reset_ts (NUTContext *nut, AVRational time_base, int64_t val)
 
int64_t ff_lsb2full (StreamContext *stream, int64_t lsb)
 
int ff_nut_sp_pos_cmp (const void *a, const void *b)
 
int ff_nut_sp_pts_cmp (const void *a, const void *b)
 
int ff_nut_add_sp (NUTContext *nut, int64_t pos, int64_t back_ptr, int64_t ts)
 
static int enu_free (void *opaque, void *elem)
 
void ff_nut_free_sp (NUTContext *nut)
 

Variables

const AVCodecTag ff_nut_subtitle_tags []
 
const AVCodecTag ff_nut_data_tags []
 
const AVCodecTag ff_nut_video_tags []
 
const AVCodecTag ff_nut_audio_extra_tags []
 
const AVCodecTag ff_nut_audio_tags []
 
const AVCodecTag *const ff_nut_codec_tags []
 
const Dispositions ff_nut_dispositions []
 
const AVMetadataConv ff_nut_metadata_conv []
 

Function Documentation

◆ ff_nut_reset_ts()

void ff_nut_reset_ts ( NUTContext nut,
AVRational  time_base,
int64_t  val 
)

Definition at line 258 of file nut.c.

Referenced by decode_syncpoint(), and nut_write_packet().

◆ ff_lsb2full()

int64_t ff_lsb2full ( StreamContext stream,
int64_t  lsb 
)

Definition at line 269 of file nut.c.

Referenced by decode_frame_header(), and nut_write_packet().

◆ ff_nut_sp_pos_cmp()

int ff_nut_sp_pos_cmp ( const void *  a,
const void *  b 
)

Definition at line 276 of file nut.c.

Referenced by ff_nut_add_sp(), read_seek(), and write_index().

◆ ff_nut_sp_pts_cmp()

int ff_nut_sp_pts_cmp ( const void *  a,
const void *  b 
)

Definition at line 282 of file nut.c.

Referenced by read_seek().

◆ ff_nut_add_sp()

int ff_nut_add_sp ( NUTContext nut,
int64_t  pos,
int64_t  back_ptr,
int64_t  ts 
)

Definition at line 288 of file nut.c.

Referenced by decode_syncpoint(), and nut_write_packet().

◆ enu_free()

static int enu_free ( void *  opaque,
void *  elem 
)
static

Definition at line 313 of file nut.c.

Referenced by ff_nut_free_sp().

◆ ff_nut_free_sp()

void ff_nut_free_sp ( NUTContext nut)

Definition at line 319 of file nut.c.

Referenced by nut_read_close(), and nut_write_deinit().

Variable Documentation

◆ ff_nut_subtitle_tags

const AVCodecTag ff_nut_subtitle_tags[]
Initial value:
= {
{ AV_CODEC_ID_TEXT, MKTAG('U', 'T', 'F', '8') },
{ AV_CODEC_ID_ASS, MKTAG('S', 'S', 'A', 0 ) },
{ AV_CODEC_ID_ASS, MKTAG('A', 'S', 'S', 0 ) },
{ AV_CODEC_ID_DVD_SUBTITLE, MKTAG('D', 'V', 'D', 'S') },
{ AV_CODEC_ID_DVB_SUBTITLE, MKTAG('D', 'V', 'B', 'S') },
{ AV_CODEC_ID_DVB_TELETEXT, MKTAG('D', 'V', 'B', 'T') },
}

Definition at line 29 of file nut.c.

Referenced by decode_stream_header().

◆ ff_nut_data_tags

const AVCodecTag ff_nut_data_tags[]
Initial value:
= {
{ AV_CODEC_ID_TEXT, MKTAG('U', 'T', 'F', '8') },
}

Definition at line 39 of file nut.c.

Referenced by decode_stream_header().

◆ ff_nut_video_tags

const AVCodecTag ff_nut_video_tags[]

Definition at line 44 of file nut.c.

Referenced by decode_stream_header().

◆ ff_nut_audio_extra_tags

const AVCodecTag ff_nut_audio_extra_tags[]
Initial value:
= {
{ AV_CODEC_ID_COMFORT_NOISE, MKTAG('3', '3', '8', '9') },
{ AV_CODEC_ID_PCM_ALAW, MKTAG('A', 'L', 'A', 'W') },
{ AV_CODEC_ID_PCM_MULAW, MKTAG('U', 'L', 'A', 'W') },
{ AV_CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
{ AV_CODEC_ID_OPUS, MKTAG('O', 'p', 'u', 's') },
{ AV_CODEC_ID_WAVPACK, MKTAG('w', 'v', 'p', 'k') },
}

Definition at line 214 of file nut.c.

Referenced by decode_stream_header().

◆ ff_nut_audio_tags

const AVCodecTag ff_nut_audio_tags[]
Initial value:
= {
{ AV_CODEC_ID_PCM_F32BE, MKTAG(32 , 'D', 'F', 'P') },
{ AV_CODEC_ID_PCM_F32LE, MKTAG('P', 'F', 'D', 32 ) },
{ AV_CODEC_ID_PCM_F64BE, MKTAG(64 , 'D', 'F', 'P') },
{ AV_CODEC_ID_PCM_F64LE, MKTAG('P', 'F', 'D', 64 ) },
{ AV_CODEC_ID_PCM_S16BE, MKTAG(16 , 'D', 'S', 'P') },
{ AV_CODEC_ID_PCM_S16LE, MKTAG('P', 'S', 'D', 16 ) },
{ AV_CODEC_ID_PCM_S24BE, MKTAG(24 , 'D', 'S', 'P') },
{ AV_CODEC_ID_PCM_S24LE, MKTAG('P', 'S', 'D', 24 ) },
{ AV_CODEC_ID_PCM_S32BE, MKTAG(32 , 'D', 'S', 'P') },
{ AV_CODEC_ID_PCM_S32LE, MKTAG('P', 'S', 'D', 32 ) },
{ AV_CODEC_ID_PCM_S64BE, MKTAG(64 , 'D', 'S', 'P') },
{ AV_CODEC_ID_PCM_S64LE, MKTAG('P', 'S', 'D', 64 ) },
{ AV_CODEC_ID_PCM_S8, MKTAG('P', 'S', 'D', 8 ) },
{ AV_CODEC_ID_PCM_U16BE, MKTAG(16 , 'D', 'U', 'P') },
{ AV_CODEC_ID_PCM_U16LE, MKTAG('P', 'U', 'D', 16 ) },
{ AV_CODEC_ID_PCM_U24BE, MKTAG(24 , 'D', 'U', 'P') },
{ AV_CODEC_ID_PCM_U24LE, MKTAG('P', 'U', 'D', 24 ) },
{ AV_CODEC_ID_PCM_U32BE, MKTAG(32 , 'D', 'U', 'P') },
{ AV_CODEC_ID_PCM_U32LE, MKTAG('P', 'U', 'D', 32 ) },
{ AV_CODEC_ID_PCM_U8, MKTAG('P', 'U', 'D', 8 ) },
{ AV_CODEC_ID_PCM_S8_PLANAR, MKTAG('P', 'S', 'P', 8 ) },
{ AV_CODEC_ID_PCM_S16BE_PLANAR, MKTAG(16 , 'P', 'S', 'P') },
{ AV_CODEC_ID_PCM_S16LE_PLANAR, MKTAG('P', 'S', 'P', 16 ) },
{ AV_CODEC_ID_PCM_S24LE_PLANAR, MKTAG('P', 'S', 'P', 24 ) },
{ AV_CODEC_ID_PCM_S32LE_PLANAR, MKTAG('P', 'S', 'P', 32 ) },
}

Definition at line 224 of file nut.c.

Referenced by decode_stream_header().

◆ ff_nut_codec_tags

const AVCodecTag* const ff_nut_codec_tags[]

◆ ff_nut_dispositions

const Dispositions ff_nut_dispositions[]
Initial value:
= {
{ "default", AV_DISPOSITION_DEFAULT },
{ "dub", AV_DISPOSITION_DUB },
{ "original", AV_DISPOSITION_ORIGINAL },
{ "comment", AV_DISPOSITION_COMMENT },
{ "lyrics", AV_DISPOSITION_LYRICS },
{ "karaoke", AV_DISPOSITION_KARAOKE },
{ "", 0 }
}

Definition at line 327 of file nut.c.

Referenced by set_disposition_bits(), and write_streaminfo().

◆ ff_nut_metadata_conv

const AVMetadataConv ff_nut_metadata_conv[]
Initial value:
= {
{ "Author", "artist" },
{ "X-CreationTime", "date" },
{ "CreationTime", "date" },
{ "SourceFilename", "filename" },
{ "X-Language", "language" },
{ "X-Disposition", "disposition" },
{ "X-Replaces", "replaces" },
{ "X-Depends", "depends" },
{ "X-Uses", "uses" },
{ "X-UsesFont", "usesfont" },
{ 0 },
}

Definition at line 337 of file nut.c.

Referenced by nut_read_header(), and write_headers().

AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:334
AV_CODEC_ID_PCM_F32BE
@ AV_CODEC_ID_PCM_F32BE
Definition: codec_id.h:354
ff_nut_audio_extra_tags
const AVCodecTag ff_nut_audio_extra_tags[]
Definition: nut.c:214
ff_nut_data_tags
const AVCodecTag ff_nut_data_tags[]
Definition: nut.c:39
AV_DISPOSITION_DEFAULT
#define AV_DISPOSITION_DEFAULT
The stream should be chosen by default among other streams of the same type, unless the user has expl...
Definition: avformat.h:621
AV_CODEC_ID_PCM_S32LE_PLANAR
@ AV_CODEC_ID_PCM_S32LE_PLANAR
Definition: codec_id.h:363
AV_CODEC_ID_DVB_TELETEXT
@ AV_CODEC_ID_DVB_TELETEXT
Definition: codec_id.h:563
AV_CODEC_ID_PCM_S16BE_PLANAR
@ AV_CODEC_ID_PCM_S16BE_PLANAR
Definition: codec_id.h:364
AV_CODEC_ID_PCM_U24LE
@ AV_CODEC_ID_PCM_U24LE
Definition: codec_id.h:348
ff_codec_wav_tags
const AVCodecTag ff_codec_wav_tags[]
Definition: riff.c:530
AV_CODEC_ID_PCM_S16LE_PLANAR
@ AV_CODEC_ID_PCM_S16LE_PLANAR
Definition: codec_id.h:352
AV_CODEC_ID_PCM_S64LE
@ AV_CODEC_ID_PCM_S64LE
Definition: codec_id.h:365
AV_CODEC_ID_ASS
@ AV_CODEC_ID_ASS
Definition: codec_id.h:578
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:335
AV_CODEC_ID_MP3
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: codec_id.h:447
AV_CODEC_ID_DVB_SUBTITLE
@ AV_CODEC_ID_DVB_SUBTITLE
Definition: codec_id.h:557
AV_CODEC_ID_PCM_S8
@ AV_CODEC_ID_PCM_S8
Definition: codec_id.h:338
AV_CODEC_ID_PCM_MULAW
@ AV_CODEC_ID_PCM_MULAW
Definition: codec_id.h:340
AV_CODEC_ID_PCM_U16BE
@ AV_CODEC_ID_PCM_U16BE
Definition: codec_id.h:337
AV_CODEC_ID_PCM_ALAW
@ AV_CODEC_ID_PCM_ALAW
Definition: codec_id.h:341
AV_CODEC_ID_PCM_U24BE
@ AV_CODEC_ID_PCM_U24BE
Definition: codec_id.h:349
AV_CODEC_ID_PCM_U32BE
@ AV_CODEC_ID_PCM_U32BE
Definition: codec_id.h:345
AV_DISPOSITION_COMMENT
#define AV_DISPOSITION_COMMENT
The stream is a commentary track.
Definition: avformat.h:639
AV_CODEC_ID_DVD_SUBTITLE
@ AV_CODEC_ID_DVD_SUBTITLE
Definition: codec_id.h:556
AV_CODEC_ID_PCM_S64BE
@ AV_CODEC_ID_PCM_S64BE
Definition: codec_id.h:366
ff_nut_video_tags
const AVCodecTag ff_nut_video_tags[]
Definition: nut.c:44
AV_DISPOSITION_ORIGINAL
#define AV_DISPOSITION_ORIGINAL
The stream is in original language.
Definition: avformat.h:635
AV_CODEC_ID_PCM_S24LE_PLANAR
@ AV_CODEC_ID_PCM_S24LE_PLANAR
Definition: codec_id.h:362
AV_CODEC_ID_PCM_S24LE
@ AV_CODEC_ID_PCM_S24LE
Definition: codec_id.h:346
ff_nut_audio_tags
const AVCodecTag ff_nut_audio_tags[]
Definition: nut.c:224
AV_CODEC_ID_OPUS
@ AV_CODEC_ID_OPUS
Definition: codec_id.h:506
AV_DISPOSITION_DUB
#define AV_DISPOSITION_DUB
The stream is not in original language.
Definition: avformat.h:629
AV_CODEC_ID_COMFORT_NOISE
@ AV_CODEC_ID_COMFORT_NOISE
Definition: codec_id.h:507
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
AV_CODEC_ID_PCM_F64BE
@ AV_CODEC_ID_PCM_F64BE
Definition: codec_id.h:356
AV_DISPOSITION_KARAOKE
#define AV_DISPOSITION_KARAOKE
The stream contains karaoke audio.
Definition: avformat.h:647
AV_CODEC_ID_PCM_S32BE
@ AV_CODEC_ID_PCM_S32BE
Definition: codec_id.h:343
AV_CODEC_ID_TEXT
@ AV_CODEC_ID_TEXT
raw UTF-8 text
Definition: codec_id.h:558
ff_codec_bmp_tags
const AVCodecTag ff_codec_bmp_tags[]
Definition: riff.c:36
AV_CODEC_ID_PCM_U32LE
@ AV_CODEC_ID_PCM_U32LE
Definition: codec_id.h:344
AV_CODEC_ID_PCM_S32LE
@ AV_CODEC_ID_PCM_S32LE
Definition: codec_id.h:342
AV_CODEC_ID_PCM_U8
@ AV_CODEC_ID_PCM_U8
Definition: codec_id.h:339
ff_nut_subtitle_tags
const AVCodecTag ff_nut_subtitle_tags[]
Definition: nut.c:29
AV_CODEC_ID_PCM_F64LE
@ AV_CODEC_ID_PCM_F64LE
Definition: codec_id.h:357
AV_CODEC_ID_PCM_S8_PLANAR
@ AV_CODEC_ID_PCM_S8_PLANAR
Definition: codec_id.h:361
AV_CODEC_ID_PCM_U16LE
@ AV_CODEC_ID_PCM_U16LE
Definition: codec_id.h:336
AV_CODEC_ID_PCM_F32LE
@ AV_CODEC_ID_PCM_F32LE
Definition: codec_id.h:355
AV_CODEC_ID_WAVPACK
@ AV_CODEC_ID_WAVPACK
Definition: codec_id.h:471
MKTAG
#define MKTAG(a, b, c, d)
Definition: macros.h:55
AV_CODEC_ID_PCM_S24BE
@ AV_CODEC_ID_PCM_S24BE
Definition: codec_id.h:347
AV_DISPOSITION_LYRICS
#define AV_DISPOSITION_LYRICS
The stream contains song lyrics.
Definition: avformat.h:643