/*
* This file is part of MPlayer.
*
* MPlayer is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* MPlayer is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <inttypes.h>
#include "options.h"
#include "mp_msg.h"
#include "stream/stream.h"
#include "demuxer.h"
#include "stheader.h"
#include "ffmpeg_files/intreadwrite.h"
#include "aviprint.h"
#include "demux_mov.h"
#include "demux_ogg.h"
#define FOURCC_VORBIS mmioFOURCC('v', 'r', 'b', 's')
#define FOURCC_SPEEX mmioFOURCC('s', 'p', 'x', ' ')
#define FOURCC_THEORA mmioFOURCC('t', 'h', 'e', 'o')
#ifdef CONFIG_TREMOR
#include <tremor/ogg.h>
#include <tremor/ivorbiscodec.h>
#else
#include <ogg/ogg.h>
#include <vorbis/codec.h>
#endif
#ifdef CONFIG_OGGTHEORA
#include <theora/theora.h>
int _ilog (unsigned int); /* defined in many places in theora/lib/ */
#endif
#define BLOCK_SIZE 4096
/* Theora decoder context : we won't be able to interpret granule positions
* without using theora_granule_time with the theora_state of the stream.
* This is duplicated in `vd_theora.c'; put this in a common header?
*/
#ifdef CONFIG_OGGTHEORA
typedef struct theora_struct_st {
theora_state st;
theora_comment cc;
theora_info inf;
} theora_struct_t;
#endif
//// OggDS headers
// Header for the new header format
typedef struct stream_header_video {
ogg_int32_t width;
ogg_int32_t height;
} stream_header_video;
typedef struct stream_header_audio {
ogg_int16_t channels;
ogg_int16_t blockalign;
ogg_
|