nutenc.c File Reference
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/tree.h"
#include "libavutil/dict.h"
#include "libavutil/avassert.h"
#include "libavcodec/mpegaudiodata.h"
#include "nut.h"
#include "internal.h"
#include "avio_internal.h"
#include "riff.h"
Include dependency graph for nutenc.c:

Go to the source code of this file.

Functions

static int find_expected_header (AVCodecContext *c, int size, int key_frame, uint8_t out[64])
 
static int find_header_idx (AVFormatContext *s, AVCodecContext *c, int size, int frame_type)
 
static void build_elision_headers (AVFormatContext *s)
 
static void build_frame_code (AVFormatContext *s)
 
static void put_tt (NUTContext *nut, AVRational *time_base, AVIOContext *bc, uint64_t val)
 
static void put_str (AVIOContext *bc, const char *string)
 Store a string as vb. More...
 
static void put_s (AVIOContext *bc, int64_t val)
 
static void put_packet (NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc, int calculate_checksum, uint64_t startcode)
 
static void write_mainheader (NUTContext *nut, AVIOContext *bc)
 
static int write_streamheader (AVFormatContext *avctx, AVIOContext *bc, AVStream *st, int i)
 
static int add_info (AVIOContext *bc, const char *type, const char *value)
 
static int write_globalinfo (NUTContext *nut, AVIOContext *bc)
 
static int write_streaminfo (NUTContext *nut, AVIOContext *bc, int stream_id)
 
static int write_chapter (NUTContext *nut, AVIOContext *bc, int id)
 
static int write_index (NUTContext *nut, AVIOContext *bc)
 
static int write_headers (AVFormatContext *avctx, AVIOContext *bc)
 
static int nut_write_header (AVFormatContext *s)
 
static int get_needed_flags (NUTContext *nut, StreamContext *nus, FrameCode *fc, AVPacket *pkt)
 
static int find_best_header_idx (NUTContext *nut, AVPacket *pkt)
 
static int nut_write_packet (AVFormatContext *s, AVPacket *pkt)
 
static int nut_write_trailer (AVFormatContext *s)
 

Variables

AVOutputFormat ff_nut_muxer
 

Function Documentation

static int add_info ( AVIOContext bc,
const char *  type,
const char *  value 
)
static

Definition at line 463 of file nutenc.c.

Referenced by write_chapter(), write_globalinfo(), and write_streaminfo().

static void build_elision_headers ( AVFormatContext s)
static

Definition at line 116 of file nutenc.c.

Referenced by nut_write_header().

static void build_frame_code ( AVFormatContext s)
static

Definition at line 138 of file nutenc.c.

Referenced by nut_write_header().

static int find_best_header_idx ( NUTContext nut,
AVPacket pkt 
)
static

Definition at line 783 of file nutenc.c.

Referenced by nut_write_packet().

static int find_expected_header ( AVCodecContext c,
int  size,
int  key_frame,
uint8_t  out[64] 
)
static

Definition at line 33 of file nutenc.c.

Referenced by find_header_idx().

static int find_header_idx ( AVFormatContext s,
AVCodecContext c,
int  size,
int  frame_type 
)
static

Definition at line 100 of file nutenc.c.

Referenced by build_frame_code().

static int get_needed_flags ( NUTContext nut,
StreamContext nus,
FrameCode fc,
AVPacket pkt 
)
static

Definition at line 757 of file nutenc.c.

Referenced by nut_write_packet().

static int nut_write_header ( AVFormatContext s)
static

Definition at line 675 of file nutenc.c.

static int nut_write_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 802 of file nutenc.c.

static int nut_write_trailer ( AVFormatContext s)
static

Definition at line 983 of file nutenc.c.

static void put_packet ( NUTContext nut,
AVIOContext bc,
AVIOContext dyn_bc,
int  calculate_checksum,
uint64_t  startcode 
)
static

Definition at line 309 of file nutenc.c.

Referenced by nut_write_packet(), nut_write_trailer(), and write_headers().

static void put_s ( AVIOContext bc,
int64_t  val 
)
static

Definition at line 284 of file nutenc.c.

Referenced by add_info(), write_chapter(), and write_mainheader().

static void put_str ( AVIOContext bc,
const char *  string 
)
static

Store a string as vb.

Definition at line 276 of file nutenc.c.

Referenced by add_info().

static void put_tt ( NUTContext nut,
AVRational time_base,
AVIOContext bc,
uint64_t  val 
)
static

Definition at line 267 of file nutenc.c.

Referenced by nut_write_packet(), write_chapter(), and write_index().

static int write_chapter ( NUTContext nut,
AVIOContext bc,
int  id 
)
static

Definition at line 537 of file nutenc.c.

Referenced by write_headers().

static int write_globalinfo ( NUTContext nut,
AVIOContext bc 
)
static

Definition at line 471 of file nutenc.c.

Referenced by write_headers().

static int write_headers ( AVFormatContext avctx,
AVIOContext bc 
)
static

Definition at line 610 of file nutenc.c.

Referenced by nut_write_header(), nut_write_packet(), and nut_write_trailer().

static int write_index ( NUTContext nut,
AVIOContext bc 
)
static

Definition at line 565 of file nutenc.c.

Referenced by ffm_is_avail_data(), and nut_write_trailer().

static void write_mainheader ( NUTContext nut,
AVIOContext bc 
)
static

Definition at line 332 of file nutenc.c.

Referenced by write_headers().

static int write_streamheader ( AVFormatContext avctx,
AVIOContext bc,
AVStream st,
int  i 
)
static

Definition at line 407 of file nutenc.c.

Referenced by write_headers().

static int write_streaminfo ( NUTContext nut,
AVIOContext bc,
int  stream_id 
)
static

Definition at line 498 of file nutenc.c.

Referenced by write_headers().

Variable Documentation

AVOutputFormat ff_nut_muxer
Initial value:
= {
.name = "nut",
.long_name = NULL_IF_CONFIG_SMALL("NUT"),
.mime_type = "video/x-nut",
.extensions = "nut",
.priv_data_size = sizeof(NUTContext),
.video_codec = AV_CODEC_ID_MPEG4,
.codec_tag = ff_nut_codec_tags,
}
#define CONFIG_LIBMP3LAME
Definition: config.h:321
static int write_packet(AVFormatContext *s, AVPacket *pkt)
static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
Definition: nutenc.c:802
static int write_trailer(AVFormatContext *s)
struct NUTContext NUTContext
static int nut_write_header(AVFormatContext *s)
Definition: nutenc.c:675
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
preferred ID for decoding MPEG audio layer 1, 2 or 3
#define AVFMT_GLOBALHEADER
Format wants global header.
Definition: avformat.h:351
static int nut_write_trailer(AVFormatContext *s)
Definition: nutenc.c:983
static int flags
Definition: cpu.c:23
#define CONFIG_LIBVORBIS
Definition: config.h:342
#define AVFMT_VARIABLE_FPS
Format allows variable fps.
Definition: avformat.h:355
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:470
const AVCodecTag *const ff_nut_codec_tags[]
Definition: nut.c:184

Definition at line 1009 of file nutenc.c.