FFmpeg
Loading...
Searching...
No Matches
libmpeghdec.c File Reference
#include <string.h>
#include <mpeghdec/mpeghdecoder.h>
#include "libavutil/channel_layout.h"
#include "libavutil/frame.h"
#include "libavutil/mem.h"
#include "codec_internal.h"
#include "decode.h"
#include "mpegaudiodata.h"
#include "profiles.h"

Go to the source code of this file.

Data Structures

struct  MPEGH3DADecContext
 

Macros

#define MAX_LOST_FRAMES   2
 
#define PER_CHANNEL_OUTBUF_SIZE   (3072 * (MAX_LOST_FRAMES + 1))
 

Functions

static av_cold int mpegh3dadec_close (AVCodecContext *avctx)
 
static av_cold int channel_layout_to_cicp (const AVChannelLayout *layout)
 
static av_cold int mpegh3dadec_init (AVCodecContext *avctx)
 
static int mpegh3dadec_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold void mpegh3dadec_flush (AVCodecContext *avctx)
 

Variables

const FFCodec ff_libmpeghdec_decoder
 

Macro Definition Documentation

◆ MAX_LOST_FRAMES

#define MAX_LOST_FRAMES   2

Definition at line 44 of file libmpeghdec.c.

◆ PER_CHANNEL_OUTBUF_SIZE

#define PER_CHANNEL_OUTBUF_SIZE   (3072 * (MAX_LOST_FRAMES + 1))

Definition at line 46 of file libmpeghdec.c.

Referenced by mpegh3dadec_init().

Function Documentation

◆ mpegh3dadec_close()

static av_cold int mpegh3dadec_close ( AVCodecContext * avctx)
static

Definition at line 57 of file libmpeghdec.c.

◆ channel_layout_to_cicp()

static av_cold int channel_layout_to_cicp ( const AVChannelLayout * layout)
static

Definition at line 71 of file libmpeghdec.c.

Referenced by mpegh3dadec_init().

◆ mpegh3dadec_init()

static av_cold int mpegh3dadec_init ( AVCodecContext * avctx)
static

Definition at line 85 of file libmpeghdec.c.

◆ mpegh3dadec_decode_frame()

static int mpegh3dadec_decode_frame ( AVCodecContext * avctx,
AVFrame * frame,
int * got_frame_ptr,
AVPacket * avpkt )
static

Definition at line 128 of file libmpeghdec.c.

◆ mpegh3dadec_flush()

static av_cold void mpegh3dadec_flush ( AVCodecContext * avctx)
static

Definition at line 187 of file libmpeghdec.c.

Variable Documentation

◆ ff_libmpeghdec_decoder

const FFCodec ff_libmpeghdec_decoder
Initial value:
= {
.p.name = "libmpeghdec",
CODEC_LONG_NAME("libmpeghdec (MPEG-H 3D Audio)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.priv_data_size = sizeof(MPEGH3DADecContext),
.p.wrapper_name = "libmpeghdec",
}
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition codec.h:79
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_MPEGH_3D_AUDIO
Definition codec_id.h:546
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:97
static av_cold int mpegh3dadec_init(AVCodecContext *avctx)
Definition libmpeghdec.c:85
static int mpegh3dadec_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt)
static av_cold void mpegh3dadec_flush(AVCodecContext *avctx)
static av_cold int mpegh3dadec_close(AVCodecContext *avctx)
Definition libmpeghdec.c:57
const AVProfile ff_mpegh_3da_profiles[]
Definition profiles.c:62

Definition at line 198 of file libmpeghdec.c.