2003-02-16 17:04:39 +00:00
|
|
|
/*
|
|
|
|
mkvmerge -- utility for splicing together matroska files
|
|
|
|
from component media subtypes
|
|
|
|
|
|
|
|
p_mp3.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-06-15 14:03:28 +00:00
|
|
|
\version $Id$
|
2003-02-16 17:04:39 +00:00
|
|
|
\brief class definition for the MP3 output module
|
2003-05-18 20:57:08 +00:00
|
|
|
\author Moritz Bunkus <moritz@bunkus.org>
|
2003-02-16 17:04:39 +00:00
|
|
|
*/
|
2003-05-20 06:30:25 +00:00
|
|
|
|
2003-02-16 17:04:39 +00:00
|
|
|
#ifndef __P_MP3_H
|
|
|
|
#define __P_MP3_H
|
|
|
|
|
2003-06-20 19:29:26 +00:00
|
|
|
#include "os.h"
|
|
|
|
|
2003-02-16 17:04:39 +00:00
|
|
|
#include "common.h"
|
2003-04-18 10:28:14 +00:00
|
|
|
#include "pr_generic.h"
|
2003-02-16 17:04:39 +00:00
|
|
|
#include "mp3_common.h"
|
|
|
|
|
2003-04-18 10:28:14 +00:00
|
|
|
class mp3_packetizer_c: public generic_packetizer_c {
|
2003-02-27 09:52:37 +00:00
|
|
|
private:
|
2003-05-02 20:11:34 +00:00
|
|
|
int64_t bytes_output, packetno;
|
2003-02-26 19:20:26 +00:00
|
|
|
unsigned long samples_per_sec;
|
2003-05-02 20:11:34 +00:00
|
|
|
int channels, buffer_size;
|
2003-05-11 12:41:53 +00:00
|
|
|
unsigned char *packet_buffer;
|
2003-02-26 19:20:26 +00:00
|
|
|
|
2003-02-27 09:52:37 +00:00
|
|
|
public:
|
2003-05-05 21:55:02 +00:00
|
|
|
mp3_packetizer_c(generic_reader_c *nreader, unsigned long nsamples_per_sec,
|
|
|
|
int nchannels, track_info_t *nti) throw (error_c);
|
2003-02-26 19:20:26 +00:00
|
|
|
virtual ~mp3_packetizer_c();
|
2003-05-05 21:55:02 +00:00
|
|
|
|
2003-05-02 20:11:34 +00:00
|
|
|
virtual int process(unsigned char *buf, int size, int64_t timecode = -1,
|
|
|
|
int64_t length = -1, int64_t bref = -1,
|
|
|
|
int64_t fref = -1);
|
2003-05-02 21:49:42 +00:00
|
|
|
virtual void set_headers();
|
2003-02-27 09:52:37 +00:00
|
|
|
|
|
|
|
private:
|
2003-05-02 20:11:34 +00:00
|
|
|
virtual void add_to_buffer(unsigned char *buf, int size);
|
2003-03-04 10:16:28 +00:00
|
|
|
virtual unsigned char *get_mp3_packet(unsigned long *header,
|
|
|
|
mp3_header_t *mp3header);
|
2003-05-02 20:11:34 +00:00
|
|
|
virtual int mp3_packet_available();
|
|
|
|
virtual void remove_mp3_packet(int pos, int framesize);
|
2003-05-25 15:35:39 +00:00
|
|
|
|
|
|
|
virtual void dump_debug_info();
|
2003-02-16 17:04:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __P_MP3_H
|