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-03-04 10:16:28 +00:00
|
|
|
\version \$Id: p_pcm.h,v 1.6 2003/03/04 10:16:28 mosu Exp $
|
2003-02-24 13:12:27 +00:00
|
|
|
\brief class definition for the PCM output module
|
|
|
|
\author Moritz Bunkus <moritz @ bunkus.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __P_PCM_H
|
|
|
|
#define __P_PCM_H
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
#include "queue.h"
|
|
|
|
|
|
|
|
class pcm_packetizer_c: public q_c {
|
2003-02-27 09:52:37 +00:00
|
|
|
private:
|
2003-02-26 19:20:26 +00:00
|
|
|
int packetno;
|
|
|
|
int bps;
|
2003-02-28 13:01:29 +00:00
|
|
|
u_int64_t bytes_output, remaining_sync;
|
2003-02-26 19:20:26 +00:00
|
|
|
unsigned long samples_per_sec;
|
|
|
|
int channels;
|
|
|
|
int bits_per_sample;
|
2003-03-04 10:16:28 +00:00
|
|
|
unsigned char *tempbuf;
|
2003-02-26 19:20:26 +00:00
|
|
|
audio_sync_t async;
|
|
|
|
|
2003-02-27 09:52:37 +00:00
|
|
|
public:
|
2003-03-04 10:16:28 +00:00
|
|
|
pcm_packetizer_c(unsigned char *nprivate_data, int nprivate_size,
|
2003-02-26 19:20:26 +00:00
|
|
|
unsigned long nsamples_per_sec, int nchannels,
|
2003-03-04 09:27:05 +00:00
|
|
|
int nbits_per_sample, audio_sync_t *nasync) throw (error_c);
|
2003-02-26 19:20:26 +00:00
|
|
|
virtual ~pcm_packetizer_c();
|
2003-02-24 13:12:27 +00:00
|
|
|
|
2003-03-04 10:16:28 +00:00
|
|
|
virtual int process(unsigned char *buf, int size, int last_frame);
|
2003-02-26 19:20:26 +00:00
|
|
|
virtual void set_header();
|
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
|