Extended the general process function to include both a backward and a forward reference.

This commit is contained in:
Moritz Bunkus 2003-04-18 13:21:11 +00:00
parent 249b568189
commit de66f03964
13 changed files with 35 additions and 27 deletions

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_ac3.cpp,v 1.12 2003/04/18 12:00:46 mosu Exp $
\version \$Id: p_ac3.cpp,v 1.13 2003/04/18 13:21:11 mosu Exp $
\brief AC3 output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -165,7 +165,7 @@ void ac3_packetizer_c::set_header() {
}
int ac3_packetizer_c::process(unsigned char *buf, int size,
int64_t timecode, int64_t) {
int64_t timecode, int64_t, int64_t, int64_t) {
unsigned char *packet;
unsigned long header;
ac3_header_t ac3header;

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_ac3.h,v 1.10 2003/04/18 10:28:14 mosu Exp $
\version \$Id: p_ac3.h,v 1.11 2003/04/18 13:21:11 mosu Exp $
\brief class definition for the AC3 output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -39,7 +39,8 @@ public:
virtual ~ac3_packetizer_c();
virtual int process(unsigned char *buf, int size,
int64_t timescode = -1, int64_t length = -1);
int64_t timecode = -1, int64_t length = -1,
int64_t bref = -1, int64_t fref = -1);
virtual void set_header();
private:

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_mp3.cpp,v 1.14 2003/04/18 12:00:46 mosu Exp $
\version \$Id: p_mp3.cpp,v 1.15 2003/04/18 13:21:11 mosu Exp $
\brief MP3 output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -165,7 +165,7 @@ void mp3_packetizer_c::set_header() {
}
int mp3_packetizer_c::process(unsigned char *buf, int size,
int64_t timecode, int64_t) {
int64_t timecode, int64_t, int64_t, int64_t) {
unsigned char *packet;
unsigned long header;
mp3_header_t mp3header;

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_mp3.h,v 1.10 2003/04/18 10:28:14 mosu Exp $
\version \$Id: p_mp3.h,v 1.11 2003/04/18 13:21:11 mosu Exp $
\brief class definition for the MP3 output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -39,7 +39,8 @@ public:
virtual ~mp3_packetizer_c();
virtual int process(unsigned char *buf, int size,
int64_t timecode = -1, int64_t length = -1);
int64_t timecode = -1, int64_t length = -1,
int64_t bref = -1, int64_t fref = -1);
virtual void set_header();
private:

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_pcm.cpp,v 1.13 2003/04/18 12:00:46 mosu Exp $
\version \$Id: p_pcm.cpp,v 1.14 2003/04/18 13:21:11 mosu Exp $
\brief PCM output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -74,7 +74,7 @@ void pcm_packetizer_c::set_header() {
}
int pcm_packetizer_c::process(unsigned char *buf, int size,
int64_t, int64_t) {
int64_t, int64_t, int64_t, int64_t) {
int i, bytes_per_packet, remaining_bytes, complete_packets;
unsigned char *new_buf;

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_pcm.h,v 1.11 2003/04/18 10:28:14 mosu Exp $
\version \$Id: p_pcm.h,v 1.12 2003/04/18 13:21:11 mosu Exp $
\brief class definition for the PCM output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -39,7 +39,8 @@ public:
virtual ~pcm_packetizer_c();
virtual int process(unsigned char *buf, int size, int64_t timecode = -1,
int64_t length = -1);
int64_t length = -1, int64_t bref = -1,
int64_t fref = -1);
virtual void set_header();
};

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_textsubs.cpp,v 1.5 2003/04/18 12:00:46 mosu Exp $
\version \$Id: p_textsubs.cpp,v 1.6 2003/04/18 13:21:11 mosu Exp $
\brief Subripper subtitle reader
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -52,7 +52,7 @@ void textsubs_packetizer_c::set_header() {
}
int textsubs_packetizer_c::process(unsigned char *_subs, int, int64_t start,
int64_t length) {
int64_t length, int64_t, int64_t) {
int num_newlines;
char *subs, *idx1, *idx2, *tempbuf;
int64_t end, duration, dlen, tmp;

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_textsubs.h,v 1.3 2003/04/18 10:28:14 mosu Exp $
\version \$Id: p_textsubs.h,v 1.4 2003/04/18 13:21:11 mosu Exp $
\brief class definition for the simple text subtitle packetizer
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -33,8 +33,9 @@ public:
textsubs_packetizer_c(track_info_t *nti) throw (error_c);
virtual ~textsubs_packetizer_c();
virtual int process(unsigned char *_subs, int size, int64_t start,
int64_t length);
virtual int process(unsigned char *_subs, int size, int64_t start = -1,
int64_t length = -1, int64_t bref = -1,
int64_t fref = -1);
virtual void set_header();
};

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_video.cpp,v 1.22 2003/04/18 13:08:04 mosu Exp $
\version \$Id: p_video.cpp,v 1.23 2003/04/18 13:21:11 mosu Exp $
\brief video output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -71,7 +71,8 @@ void video_packetizer_c::set_header() {
}
int video_packetizer_c::process(unsigned char *buf, int size,
int64_t old_timecode, int64_t flags) {
int64_t old_timecode, int64_t flags, int64_t,
int64_t) {
int64_t timecode;
int num_frames;

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_video.h,v 1.19 2003/04/18 13:08:04 mosu Exp $
\version \$Id: p_video.h,v 1.20 2003/04/18 13:21:11 mosu Exp $
\brief class definition for the video output module
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -42,7 +42,8 @@ public:
virtual ~video_packetizer_c();
virtual int process(unsigned char *buf, int size, int64_t old_timecode = -1,
int64_t flags = VFT_IFRAME);
int64_t flags = VFT_IFRAME, int64_t bref = -1,
int64_t fref = -1);
virtual void set_header();
};

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_vorbis.cpp,v 1.11 2003/04/18 12:00:46 mosu Exp $
\version \$Id: p_vorbis.cpp,v 1.12 2003/04/18 13:21:11 mosu Exp $
\brief Vorbis packetizer
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -144,7 +144,7 @@ void vorbis_packetizer_c::set_header() {
* has to generate silence packets and put them into the Matroska file first.
*/
int vorbis_packetizer_c::process(unsigned char *data, int size,
int64_t timecode, int64_t) {
int64_t timecode, int64_t, int64_t, int64_t) {
unsigned char zero[2];
ogg_packet op;
int64_t this_bs, samples_here, samples_needed;

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: p_vorbis.h,v 1.8 2003/04/18 10:28:14 mosu Exp $
\version \$Id: p_vorbis.h,v 1.9 2003/04/18 13:21:11 mosu Exp $
\brief class definition for the Vorbis packetizer
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -48,7 +48,8 @@ public:
virtual ~vorbis_packetizer_c();
virtual int process(unsigned char *data, int size, int64_t timecode = -1,
int64_t length = -1);
int64_t length = -1, int64_t bref = -1,
int64_t fref = -1);
virtual void set_header();
};

View File

@ -13,7 +13,7 @@
/*!
\file
\version \$Id: pr_generic.h,v 1.22 2003/04/18 12:00:46 mosu Exp $
\version \$Id: pr_generic.h,v 1.23 2003/04/18 13:21:11 mosu Exp $
\brief class definition for the generic reader and packetizer
\author Moritz Bunkus <moritz @ bunkus.org>
*/
@ -78,7 +78,8 @@ public:
virtual int64_t get_free_refs();
virtual void set_header();
virtual int process(unsigned char *data, int size,
int64_t timecode = -1,int64_t length = -1) = 0;
int64_t timecode = -1, int64_t length = -1,
int64_t bref = -1, int64_t fref = -1) = 0;
virtual KaxTrackEntry *get_track_entry();