FFmpeg
Loading...
Searching...
No Matches
codecstring.c File Reference
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/rational.h"
#include "av1.h"
#include "avc.h"
#include "avformat.h"
#include "internal.h"
#include "lcevc.h"
#include "nal.h"
#include "vpcc.h"

Go to the source code of this file.

Data Structures

struct  codec_string
 

Functions

static void set_vp9_codec_str (void *logctx, const AVCodecParameters *par, const AVRational *frame_rate, AVBPrint *out)
 
int ff_make_codec_str (void *logctx, const AVCodecParameters *par, const AVRational *frame_rate, struct AVBPrint *out)
 Make a RFC 4281/6381 like string describing a codec.
 
int av_mime_codec_str (const AVCodecParameters *par, AVRational frame_rate, struct AVBPrint *out)
 Make a RFC 4281/6381 like string describing a codec for MIME types.
 

Variables

static const struct codec_string codecs []
 

Function Documentation

◆ set_vp9_codec_str()

static void set_vp9_codec_str ( void * logctx,
const AVCodecParameters * par,
const AVRational * frame_rate,
AVBPrint * out )
static

Definition at line 48 of file codecstring.c.

Referenced by ff_make_codec_str().

◆ ff_make_codec_str()

int ff_make_codec_str ( void * logctx,
const AVCodecParameters * par,
const AVRational * frame_rate,
struct AVBPrint * out )

Make a RFC 4281/6381 like string describing a codec.

Parameters
logctxa context for potential log messages; if NULL, nothing is logged
parpointer to an AVCodecParameters struct describing the codec
frame_ratean optional pointer to AVRational for the frame rate, for deciding the right profile for video codecs
outthe AVBPrint to write the output to
Returns
<0 on error

Definition at line 64 of file codecstring.c.

Referenced by av_mime_codec_str(), dash_init(), update_stream_extradata(), and write_codec_attr().

Variable Documentation

◆ codecs

const struct codec_string codecs[]
static
Initial value:
= {
{ AV_CODEC_ID_VP8, "vp8" },
{ AV_CODEC_ID_VP9, "vp9" },
{ AV_CODEC_ID_VORBIS, "vorbis" },
{ AV_CODEC_ID_OPUS, "opus" },
{ AV_CODEC_ID_FLAC, "flac" },
}
@ AV_CODEC_ID_VORBIS
Definition codec_id.h:458
@ AV_CODEC_ID_NONE
Definition codec_id.h:48
@ AV_CODEC_ID_VP8
Definition codec_id.h:190
@ AV_CODEC_ID_FLAC
Definition codec_id.h:465
@ AV_CODEC_ID_VP9
Definition codec_id.h:217
@ AV_CODEC_ID_OPUS
Definition codec_id.h:513

Referenced by ff_hls_write_stream_info(), ff_make_codec_str(), get_codecs_sorted(), print_codecs(), and show_codecs().