1 /*
2   ogmmerge -- utility for splicing together ogg bitstreams
3       from component media subtypes
4 
5   r_mp3.h
6   class definitions for the MP3 demultiplexer module
7 
8   Written by Moritz Bunkus <moritz@bunkus.org>
9   Based on Xiph.org's 'oggmerge' found in their CVS repository
10   See http://www.xiph.org
11 
12   Distributed under the GPL
13   see the file COPYING for details
14   or visit http://www.gnu.org/copyleft/gpl.html
15 */
16 
17 #ifndef __R_MP3_H__
18 #define __R_MP3_H__
19 
20 #include <stdio.h>
21 
22 #include <ogg/ogg.h>
23 
24 extern "C" {
25 #include <avilib.h>
26 }
27 
28 #include "ogmmerge.h"
29 #include "queue.h"
30 
31 #include "p_mp3.h"
32 
33 class mp3_reader_c: public generic_reader_c {
34   private:
35     unsigned char          *chunk;
36     FILE                   *file;
37     class mp3_packetizer_c *mp3packetizer;
38     u_int64_t               bytes_processed;
39     off_t                   size;
40 
41   public:
42     mp3_reader_c(char *fname, audio_sync_t *nasync, range_t *nrange,
43                  char **ncomments) throw (error_c);
44     virtual ~mp3_reader_c();
45 
46     virtual int              read();
47     virtual int              serial_in_use(int);
48     virtual ogmmerge_page_t *get_page();
49     virtual ogmmerge_page_t *get_header_page(int header_type =
50                                              PACKET_TYPE_HEADER);
51     virtual void             reset();
52     virtual int              display_priority();
53     virtual void             display_progress();
54 
55     static int               probe_file(FILE *file, off_t size);
56 };
57 
58 #endif  /* __R_MP3_H__*/
59