2003-02-24 13:12:27 +00:00
|
|
|
/*
|
|
|
|
mkvmerge -- utility for splicing together matroska files
|
|
|
|
from component media subtypes
|
|
|
|
|
|
|
|
p_pcm.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-05-25 15:35:39 +00:00
|
|
|
\version \$Id: p_pcm.h,v 1.18 2003/05/25 15:35:39 mosu Exp $
|
2003-02-24 13:12:27 +00:00
|
|
|
\brief class definition for the PCM output module
|
2003-05-18 20:57:08 +00:00
|
|
|
\author Moritz Bunkus <moritz@bunkus.org>
|
2003-02-24 13:12:27 +00:00
|
|
|
*/
|
2003-05-20 06:30:25 +00:00
|
|
|
|
2003-02-24 13:12:27 +00:00
|
|
|
#ifndef __P_PCM_H
|
|
|
|
#define __P_PCM_H
|
|
|
|
|
|
|
|
#include "common.h"
|
2003-04-18 10:28:14 +00:00
|
|
|
#include "pr_generic.h"
|
2003-02-24 13:12:27 +00:00
|
|
|
|
2003-04-18 10:28:14 +00:00
|
|
|
class pcm_packetizer_c: public generic_packetizer_c {
|
2003-02-27 09:52:37 +00:00
|
|
|
private:
|
2003-05-02 20:11:34 +00:00
|
|
|
int packetno, bps, channels, bits_per_sample, tempbuf_size;
|
|
|
|
int64_t bytes_output, remaining_sync;
|
|
|
|
unsigned long samples_per_sec;
|
2003-03-04 10:16:28 +00:00
|
|
|
unsigned char *tempbuf;
|
2003-05-20 06:30:25 +00:00
|
|
|
|
2003-02-27 09:52:37 +00:00
|
|
|
public:
|
2003-05-05 21:55:02 +00:00
|
|
|
pcm_packetizer_c(generic_reader_c *nreader, unsigned long nsamples_per_sec,
|
|
|
|
int nchannels, int nbits_per_sample, track_info_t *nti)
|
|
|
|
throw (error_c);
|
2003-02-26 19:20:26 +00:00
|
|
|
virtual ~pcm_packetizer_c();
|
2003-05-20 06:30:25 +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-05-25 15:35:39 +00:00
|
|
|
|
|
|
|
virtual void dump_debug_info();
|
2003-02-24 13:12:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const int pcm_interleave = 16;
|
|
|
|
|
2003-02-27 09:52:37 +00:00
|
|
|
#endif // __P_PCM_H
|