2003-03-03 18:00:30 +00:00
|
|
|
/*
|
|
|
|
mkvmerge -- utility for splicing together matroska files
|
|
|
|
from component media subtypes
|
|
|
|
|
|
|
|
p_vorbis.h
|
|
|
|
|
|
|
|
Written by Moritz Bunkus <moritz@bunkus.org>
|
|
|
|
|
|
|
|
Distributed under the GPL
|
|
|
|
see the file COPYING for details
|
|
|
|
or visit http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\file
|
2003-03-04 10:15:33 +00:00
|
|
|
\version \$Id: p_vorbis.h,v 1.4 2003/03/04 10:15:33 mosu Exp $
|
2003-03-03 18:00:30 +00:00
|
|
|
\brief class definition for the Vorbis packetizer
|
|
|
|
\author Moritz Bunkus <moritz @ bunkus.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#ifdef HAVE_OGGVORBIS
|
|
|
|
|
|
|
|
#ifndef __P_VORBIS_H
|
|
|
|
#define __P_VORBIS_H
|
|
|
|
|
|
|
|
#include <ogg/ogg.h>
|
|
|
|
#include <vorbis/codec.h>
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "pr_generic.h"
|
|
|
|
#include "queue.h"
|
|
|
|
|
|
|
|
class vorbis_packetizer_c: public q_c {
|
|
|
|
private:
|
2003-03-03 23:20:44 +00:00
|
|
|
u_int64_t last_bs, samples;
|
2003-03-03 18:00:30 +00:00
|
|
|
int packetno;
|
|
|
|
audio_sync_t async;
|
|
|
|
vorbis_info vi;
|
|
|
|
vorbis_comment vc;
|
|
|
|
ogg_packet headers[3];
|
|
|
|
public:
|
2003-03-04 10:15:33 +00:00
|
|
|
vorbis_packetizer_c(audio_sync_t *nasync, unsigned char *d_header,
|
|
|
|
int l_header, unsigned char *d_comments,
|
|
|
|
int l_comments, unsigned char *d_codecsetup,
|
|
|
|
int l_codecsetup)
|
2003-03-03 18:00:30 +00:00
|
|
|
throw (error_c);
|
|
|
|
virtual ~vorbis_packetizer_c();
|
|
|
|
|
2003-03-04 10:15:33 +00:00
|
|
|
virtual int process(unsigned char *data, int size, int64_t timecode);
|
|
|
|
virtual void set_header();
|
2003-03-03 18:00:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __P_VORBIS_H
|
|
|
|
|
|
|
|
#endif // HAVE_OGGVORBIS
|