chromium/third_party/ffmpeg/libavformat/oggdec.c

/*
 * Ogg bitstream support
 * Luca Barbato <[email protected]>
 * Based on tcvp implementation
 */

/*
    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.
 */

#include <stdio.h>
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avio_internal.h"
#include "demux.h"
#include "oggdec.h"
#include "avformat.h"
#include "internal.h"

#define MAX_PAGE_SIZE
#define DECODER_BUFFER_SIZE

static const struct ogg_codec * const ogg_codecs[] =;

static int64_t ogg_calc_pts(AVFormatContext *s, int idx, int64_t *dts);
static int ogg_new_stream(AVFormatContext *s, uint32_t serial);
static int ogg_restore(AVFormatContext *s);

static void free_stream(AVFormatContext *s, int i)
{}

//FIXME We could avoid some structure duplication
static int ogg_save(AVFormatContext *s)
{}

static int ogg_restore(AVFormatContext *s)
{}

static int ogg_reset(AVFormatContext *s)
{}

static const struct ogg_codec *ogg_find_codec(uint8_t *buf, int size)
{}

/**
 * Replace the current stream with a new one. This is a typical webradio
 * situation where a new audio stream spawn (identified with a new serial) and
 * must replace the previous one (track switch).
 */
static int ogg_replace_stream(AVFormatContext *s, uint32_t serial, char *magic, int page_size,
                              int probing)
{}

static int ogg_new_stream(AVFormatContext *s, uint32_t serial)
{}

static int data_packets_seen(const struct ogg *ogg)
{}

static int buf_realloc(struct ogg_stream *os, int size)
{}

static int ogg_read_page(AVFormatContext *s, int *sid, int probing)
{}

/**
 * @brief find the next Ogg packet
 * @param *sid is set to the stream for the packet or -1 if there is
 *             no matching stream, in that case assume all other return
 *             values to be uninitialized.
 * @return negative value on error or EOF.
 */
static int ogg_packet(AVFormatContext *s, int *sid, int *dstart, int *dsize,
                      int64_t *fpos)
{}

static int ogg_get_length(AVFormatContext *s)
{}

static int ogg_read_close(AVFormatContext *s)
{}

static int ogg_read_header(AVFormatContext *s)
{}

static int64_t ogg_calc_pts(AVFormatContext *s, int idx, int64_t *dts)
{}

static void ogg_validate_keyframe(AVFormatContext *s, int idx, int pstart, int psize)
{}

static int ogg_read_packet(AVFormatContext *s, AVPacket *pkt)
{}

static int64_t ogg_read_timestamp(AVFormatContext *s, int stream_index,
                                  int64_t *pos_arg, int64_t pos_limit)
{}

static int ogg_read_seek(AVFormatContext *s, int stream_index,
                         int64_t timestamp, int flags)
{}

static int ogg_probe(const AVProbeData *p)
{}

const FFInputFormat ff_ogg_demuxer =;