oggparsevorbis.c File Reference
#include <stdlib.h>
#include "libavutil/avstring.h"
#include "libavutil/bswap.h"
#include "libavutil/dict.h"
#include "libavcodec/get_bits.h"
#include "libavcodec/bytestream.h"
#include "libavcodec/vorbis_parser.h"
#include "avformat.h"
#include "internal.h"
#include "oggdec.h"
#include "vorbiscomment.h"
Include dependency graph for oggparsevorbis.c:

Go to the source code of this file.

Data Structures

struct  oggvorbis_private
 Parse the vorbis header Vorbis Identification header from Vorbis_I_spec.html::vorbis-spec-codec [vorbis_version] = read 32 bits as unsigned integer | Not used [audio_channels] = read 8 bit integer as unsigned | Used [audio_sample_rate] = read 32 bits as unsigned integer | Used [bitrate_maximum] = read 32 bits as signed integer | Not used yet [bitrate_nominal] = read 32 bits as signed integer | Not used yet [bitrate_minimum] = read 32 bits as signed integer | Used as bitrate [blocksize_0] = read 4 bits as unsigned integer | Not Used [blocksize_1] = read 4 bits as unsigned integer | Not Used [framing_flag] = read one bit | Not Used. More...
 

Functions

static int ogm_chapter (AVFormatContext *as, uint8_t *key, uint8_t *val)
 Copyright (C) 2005 Michael Ahlberg, Måns Rullgård. More...
 
int ff_vorbis_comment (AVFormatContext *as, AVDictionary **m, const uint8_t *buf, int size)
 
static unsigned int fixup_vorbis_headers (AVFormatContext *as, struct oggvorbis_private *priv, uint8_t **buf)
 
static void vorbis_cleanup (AVFormatContext *s, int idx)
 
static int vorbis_header (AVFormatContext *s, int idx)
 
static int vorbis_packet (AVFormatContext *s, int idx)
 

Variables

const struct ogg_codec ff_vorbis_codec
 

Function Documentation

int ff_vorbis_comment ( AVFormatContext as,
AVDictionary **  m,
const uint8_t buf,
int  size 
)
static unsigned int fixup_vorbis_headers ( AVFormatContext as,
struct oggvorbis_private priv,
uint8_t **  buf 
)
static

Definition at line 173 of file oggparsevorbis.c.

Referenced by vorbis_header().

static int ogm_chapter ( AVFormatContext as,
uint8_t key,
uint8_t val 
)
static

Copyright (C) 2005 Michael Ahlberg, Måns Rullgård.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 37 of file oggparsevorbis.c.

Referenced by ff_vorbis_comment().

static void vorbis_cleanup ( AVFormatContext s,
int  idx 
)
static

Definition at line 199 of file oggparsevorbis.c.

static int vorbis_header ( AVFormatContext s,
int  idx 
)
static

Definition at line 211 of file oggparsevorbis.c.

static int vorbis_packet ( AVFormatContext s,
int  idx 
)
static

Definition at line 310 of file oggparsevorbis.c.

Variable Documentation

const struct ogg_codec ff_vorbis_codec
Initial value:
= {
.magic = "\001vorbis",
.magicsize = 7,
.header = vorbis_header,
.packet = vorbis_packet,
.cleanup= vorbis_cleanup,
.nb_header = 3,
}
static int vorbis_header(AVFormatContext *s, int idx)
static void vorbis_cleanup(AVFormatContext *s, int idx)
static int vorbis_packet(AVFormatContext *s, int idx)

Definition at line 385 of file oggparsevorbis.c.