FFmpeg
Loading...
Searching...
No Matches
flac.c File Reference
#include <stdlib.h>
#include "libavutil/mem.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/flac.h"
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "libavformat/ogg/mapping.h"
#include "libavformat/vorbis/comment.h"

Go to the source code of this file.

Macros

#define OGG_FLAC_METADATA_TYPE_STREAMINFO   0x7F
 
#define OGG_FLAC_MAGIC   "\177FLAC"
 
#define OGG_FLAC_MAGIC_SIZE   sizeof(OGG_FLAC_MAGIC)-1
 
#define OGG_FLAC_STREAMINFO_OFFSET   (OGG_FLAC_MAGIC_SIZE + 1 + 1 + 2 + 4 + 4)
 

Functions

static int flac_header (AVFormatContext *s, int idx)
 
static int flac_packet (AVFormatContext *s, int idx)
 
static int old_flac_header (AVFormatContext *s, int idx)
 

Variables

const struct ogg_codec ff_flac_codec
 
const struct ogg_codec ff_old_flac_codec
 

Macro Definition Documentation

◆ OGG_FLAC_METADATA_TYPE_STREAMINFO

#define OGG_FLAC_METADATA_TYPE_STREAMINFO   0x7F

Definition at line 31 of file flac.c.

Referenced by flac_header().

◆ OGG_FLAC_MAGIC

#define OGG_FLAC_MAGIC   "\177FLAC"

Definition at line 32 of file flac.c.

Referenced by flac_packet().

◆ OGG_FLAC_MAGIC_SIZE

#define OGG_FLAC_MAGIC_SIZE   sizeof(OGG_FLAC_MAGIC)-1

Definition at line 33 of file flac.c.

Referenced by flac_packet().

◆ OGG_FLAC_STREAMINFO_OFFSET

#define OGG_FLAC_STREAMINFO_OFFSET   (OGG_FLAC_MAGIC_SIZE + 1 + 1 + 2 + 4 + 4)

Definition at line 34 of file flac.c.

Referenced by flac_packet().

Function Documentation

◆ flac_header()

static int flac_header ( AVFormatContext * s,
int idx )
static

Definition at line 37 of file flac.c.

◆ flac_packet()

static int flac_packet ( AVFormatContext * s,
int idx )
static

Definition at line 87 of file flac.c.

◆ old_flac_header()

static int old_flac_header ( AVFormatContext * s,
int idx )
static

Definition at line 125 of file flac.c.

Variable Documentation

◆ ff_flac_codec

const struct ogg_codec ff_flac_codec
Initial value:
= {
.magic = OGG_FLAC_MAGIC,
.magicsize = OGG_FLAC_MAGIC_SIZE,
.header = flac_header,
.nb_header = 2,
.packet = flac_packet,
}
#define OGG_FLAC_MAGIC_SIZE
Definition flac.c:33
#define OGG_FLAC_MAGIC
Definition flac.c:32
static int flac_header(AVFormatContext *s, int idx)
Definition flac.c:37
static int flac_packet(AVFormatContext *s, int idx)
Definition flac.c:87

Definition at line 172 of file flac.c.

◆ ff_old_flac_codec

const struct ogg_codec ff_old_flac_codec
Initial value:
= {
.magic = "fLaC",
.magicsize = 4,
.header = old_flac_header,
.nb_header = 0,
}
static int old_flac_header(AVFormatContext *s, int idx)
Definition flac.c:125

Definition at line 180 of file flac.c.