FFmpeg
Functions | Variables
nut.c File Reference
#include "libavutil/mathematics.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 255 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 266 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 273 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 279 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 285 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 310 of file nut.c.

Referenced by ff_nut_free_sp().

◆ ff_nut_free_sp()

void ff_nut_free_sp ( NUTContext nut)

Definition at line 316 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 28 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 38 of file nut.c.

Referenced by decode_stream_header().

◆ ff_nut_video_tags

const AVCodecTag ff_nut_video_tags[]

Definition at line 43 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 211 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 221 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 324 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 334 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:314
AV_CODEC_ID_PCM_F32BE
@ AV_CODEC_ID_PCM_F32BE
Definition: codec_id.h:334
ff_nut_audio_extra_tags
const AVCodecTag ff_nut_audio_extra_tags[]
Definition: nut.c:211
ff_nut_data_tags
const AVCodecTag ff_nut_data_tags[]
Definition: nut.c:38
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:820
AV_CODEC_ID_PCM_S32LE_PLANAR
@ AV_CODEC_ID_PCM_S32LE_PLANAR
Definition: codec_id.h:343
AV_CODEC_ID_DVB_TELETEXT
@ AV_CODEC_ID_DVB_TELETEXT
Definition: codec_id.h:529
AV_CODEC_ID_PCM_S16BE_PLANAR
@ AV_CODEC_ID_PCM_S16BE_PLANAR
Definition: codec_id.h:344
AV_CODEC_ID_PCM_U24LE
@ AV_CODEC_ID_PCM_U24LE
Definition: codec_id.h:328
ff_codec_wav_tags
const AVCodecTag ff_codec_wav_tags[]
Definition: riff.c:509
AV_CODEC_ID_PCM_S16LE_PLANAR
@ AV_CODEC_ID_PCM_S16LE_PLANAR
Definition: codec_id.h:332
AV_CODEC_ID_PCM_S64LE
@ AV_CODEC_ID_PCM_S64LE
Definition: codec_id.h:345
AV_CODEC_ID_ASS
@ AV_CODEC_ID_ASS
Definition: codec_id.h:544
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:315
AV_CODEC_ID_MP3
@ AV_CODEC_ID_MP3
preferred ID for decoding MPEG audio layer 1, 2 or 3
Definition: codec_id.h:424
AV_CODEC_ID_DVB_SUBTITLE
@ AV_CODEC_ID_DVB_SUBTITLE
Definition: codec_id.h:523
AV_CODEC_ID_PCM_S8
@ AV_CODEC_ID_PCM_S8
Definition: codec_id.h:318
AV_CODEC_ID_PCM_MULAW
@ AV_CODEC_ID_PCM_MULAW
Definition: codec_id.h:320
AV_CODEC_ID_PCM_U16BE
@ AV_CODEC_ID_PCM_U16BE
Definition: codec_id.h:317
AV_CODEC_ID_PCM_ALAW
@ AV_CODEC_ID_PCM_ALAW
Definition: codec_id.h:321
AV_CODEC_ID_PCM_U24BE
@ AV_CODEC_ID_PCM_U24BE
Definition: codec_id.h:329
AV_CODEC_ID_PCM_U32BE
@ AV_CODEC_ID_PCM_U32BE
Definition: codec_id.h:325
AV_DISPOSITION_COMMENT
#define AV_DISPOSITION_COMMENT
The stream is a commentary track.
Definition: avformat.h:838
AV_CODEC_ID_DVD_SUBTITLE
@ AV_CODEC_ID_DVD_SUBTITLE
Definition: codec_id.h:522
AV_CODEC_ID_PCM_S64BE
@ AV_CODEC_ID_PCM_S64BE
Definition: codec_id.h:346
ff_nut_video_tags
const AVCodecTag ff_nut_video_tags[]
Definition: nut.c:43
AV_DISPOSITION_ORIGINAL
#define AV_DISPOSITION_ORIGINAL
The stream is in original language.
Definition: avformat.h:834
AV_CODEC_ID_PCM_S24LE_PLANAR
@ AV_CODEC_ID_PCM_S24LE_PLANAR
Definition: codec_id.h:342
AV_CODEC_ID_PCM_S24LE
@ AV_CODEC_ID_PCM_S24LE
Definition: codec_id.h:326
ff_nut_audio_tags
const AVCodecTag ff_nut_audio_tags[]
Definition: nut.c:221
AV_CODEC_ID_OPUS
@ AV_CODEC_ID_OPUS
Definition: codec_id.h:483
AV_DISPOSITION_DUB
#define AV_DISPOSITION_DUB
The stream is not in original language.
Definition: avformat.h:828
AV_CODEC_ID_COMFORT_NOISE
@ AV_CODEC_ID_COMFORT_NOISE
Definition: codec_id.h:484
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:48
AV_CODEC_ID_PCM_F64BE
@ AV_CODEC_ID_PCM_F64BE
Definition: codec_id.h:336
AV_DISPOSITION_KARAOKE
#define AV_DISPOSITION_KARAOKE
The stream contains karaoke audio.
Definition: avformat.h:846
AV_CODEC_ID_PCM_S32BE
@ AV_CODEC_ID_PCM_S32BE
Definition: codec_id.h:323
AV_CODEC_ID_TEXT
@ AV_CODEC_ID_TEXT
raw UTF-8 text
Definition: codec_id.h:524
ff_codec_bmp_tags
const AVCodecTag ff_codec_bmp_tags[]
Definition: riff.c:34
AV_CODEC_ID_PCM_U32LE
@ AV_CODEC_ID_PCM_U32LE
Definition: codec_id.h:324
AV_CODEC_ID_PCM_S32LE
@ AV_CODEC_ID_PCM_S32LE
Definition: codec_id.h:322
AV_CODEC_ID_PCM_U8
@ AV_CODEC_ID_PCM_U8
Definition: codec_id.h:319
ff_nut_subtitle_tags
const AVCodecTag ff_nut_subtitle_tags[]
Definition: nut.c:28
AV_CODEC_ID_PCM_F64LE
@ AV_CODEC_ID_PCM_F64LE
Definition: codec_id.h:337
AV_CODEC_ID_PCM_S8_PLANAR
@ AV_CODEC_ID_PCM_S8_PLANAR
Definition: codec_id.h:341
AV_CODEC_ID_PCM_U16LE
@ AV_CODEC_ID_PCM_U16LE
Definition: codec_id.h:316
AV_CODEC_ID_PCM_F32LE
@ AV_CODEC_ID_PCM_F32LE
Definition: codec_id.h:335
AV_CODEC_ID_WAVPACK
@ AV_CODEC_ID_WAVPACK
Definition: codec_id.h:448
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:327
AV_DISPOSITION_LYRICS
#define AV_DISPOSITION_LYRICS
The stream contains song lyrics.
Definition: avformat.h:842