2003-11-16 12:42:02 +00:00
|
|
|
/*
|
|
|
|
mkvmerge -- utility for splicing together matroska files
|
|
|
|
from component media subtypes
|
|
|
|
|
|
|
|
p_flac.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
|
|
|
|
\version $Id$
|
|
|
|
\brief class definition for the Flac packetizer
|
|
|
|
\author Moritz Bunkus <moritz@bunkus.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#ifndef __P_FLAC_H
|
|
|
|
#define __P_FLAC_H
|
|
|
|
|
|
|
|
#include "os.h"
|
|
|
|
|
|
|
|
#if defined(HAVE_FLAC_FORMAT_H)
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "pr_generic.h"
|
|
|
|
|
|
|
|
class flac_packetizer_c: public generic_packetizer_c {
|
|
|
|
private:
|
|
|
|
unsigned char *header;
|
|
|
|
int l_header, sample_rate, channels, bits_per_sample;
|
|
|
|
int64_t last_timecode;
|
2004-03-23 09:04:47 +00:00
|
|
|
memory_c *last_mem;
|
|
|
|
int64_t num_packets, avg_duration;
|
2003-11-16 12:42:02 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
flac_packetizer_c(generic_reader_c *nreader,
|
|
|
|
int nsample_rate, int nchannels, int nbits_per_sample,
|
|
|
|
unsigned char *nheader, int nl_header,
|
2003-12-04 14:36:24 +00:00
|
|
|
track_info_c *nti) throw (error_c);
|
2003-11-16 12:42:02 +00:00
|
|
|
virtual ~flac_packetizer_c();
|
|
|
|
|
2004-03-22 15:48:08 +00:00
|
|
|
virtual int process(memory_c &mem, int64_t timecode = -1,
|
2003-11-16 12:42:02 +00:00
|
|
|
int64_t length = -1, int64_t bref = -1,
|
|
|
|
int64_t fref = -1);
|
|
|
|
virtual void set_headers();
|
2004-03-23 09:04:47 +00:00
|
|
|
virtual void flush();
|
2003-11-16 12:42:02 +00:00
|
|
|
|
|
|
|
virtual void dump_debug_info();
|
2004-04-09 17:37:25 +00:00
|
|
|
|
|
|
|
virtual const char *get_format_name() {
|
|
|
|
return "Flac";
|
|
|
|
}
|
|
|
|
virtual int can_connect_to(generic_packetizer_c *src);
|
2003-11-16 12:42:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // HAVE_FLAC_STREAM_DECODER_H
|
|
|
|
#endif // __P_FLAC_H
|