This file is indexed.

/usr/include/mjpegtools/mplex/audiostrm.hpp is in libmjpegtools-dev 1:2.1.0+debian-2.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
/*
 *  audiostrm.hpp:  Audio stream class sub-hierarchy for MPEG multiplexing
 *
 *  Copyright (C) 2001 Andrew Stevens <andrew.stevens@philips.com>
 *
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of version 2 of the GNU General Public License
 *  as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#ifndef __AUDIOSTRM_H__
#define __AUDIOSTRM_H__

#include "inputstrm.hpp"
#include "stream_params.hpp"

// TODO AudioStream is reall NonVideoStream as it is also a base for
// SUBPStream (sub)classes

class AudioStream : public ElementaryStream
{
public:   
    AudioStream(IBitStream &ibs, Multiplexor &into );
    virtual void Init(const int stream_num) = 0;
    virtual void Close() = 0;

    void OutputSector();
    bool RunOutComplete();
    virtual unsigned int NominalBitRate() = 0;

    unsigned int num_syncword;

protected:
	virtual void FillAUbuffer(unsigned int frames_to_buffer) = 0;
    
	/* State variables for scanning source bit-stream */
    AUnit access_unit;
    unsigned int header_skip;
}; 	

class MPAStream : public AudioStream
{
public:   
    MPAStream(IBitStream &ibs, Multiplexor &into );
    virtual void Init(const int stream_num);
    static bool Probe(IBitStream &bs);
    virtual void Close();
    virtual unsigned int NominalBitRate();


private:
	void OutputHdrInfo();
	unsigned int SizeFrame( int bit_rate, int padding_bit );
	virtual void FillAUbuffer(unsigned int frames_to_buffer);


    /* Stream information for logging and parsing purposes */
    unsigned int samples_per_second;
	unsigned int version_id ;
    unsigned int layer		;
    unsigned int protection	;
    unsigned int bit_rate_code;
    unsigned int frequency	;
    unsigned int mode		;
    unsigned int mode_extension ;
    unsigned int copyright      ;
    unsigned int original_copy  ;
    unsigned int emphasis	;

	/* State variables for scanning source bit-stream */
    unsigned int framesize;
    unsigned int num_frames [2];
    unsigned int size_frames[2];

}; 	



class AC3Stream : public AudioStream
{
public:   
    AC3Stream(IBitStream &ibs,Multiplexor &into );
    virtual void Init(const int stream_num);
    static bool Probe(IBitStream &bs);
    virtual void Close();
    virtual unsigned int NominalBitRate();

    virtual unsigned int ReadPacketPayload(uint8_t *dst, unsigned int to_read);
    virtual unsigned int StreamHeaderSize() { return 4; }
    

private:
	void OutputHdrInfo();
    void DisplayAc3HeaderInfo();
	virtual void FillAUbuffer(unsigned int frames_to_buffer);
    
    static const unsigned int default_buffer_size;
	/* State variables for scanning source bit-stream */
    unsigned int framesize;
    unsigned int frequency;
    unsigned int samples_per_second;
    unsigned int bit_rate;
    unsigned int stream_num;
    unsigned int num_frames;
}; 	

class DTSStream : public AudioStream
{
public:   
    DTSStream(IBitStream &ibs,Multiplexor &into );
    virtual void Init(const int stream_num);
    static bool Probe(IBitStream &bs);
    virtual void Close();
    virtual unsigned int NominalBitRate();

    virtual unsigned int ReadPacketPayload(uint8_t *dst, unsigned int to_read);
    virtual unsigned int StreamHeaderSize() { return 4; }
    

private:
	void OutputHdrInfo();
#ifdef DEBUG_DTS
    void DisplayDtsHeaderInfo();
#endif
	virtual void FillAUbuffer(unsigned int frames_to_buffer);
    
    static const unsigned int default_buffer_size;

	/* State variables for scanning source bit-stream */
    unsigned int framesize;
    unsigned int samples_per_second;
    unsigned int bit_rate;
    unsigned int stream_num;
    unsigned int frequency	;
    unsigned int num_frames;
}; 	

class LPCMStream : public AudioStream
{
public:   
    LPCMStream(IBitStream &ibs, LpcmParams *parms, Multiplexor &into );
    virtual void Init(const int stream_num);
    static bool Probe(IBitStream &bs);
    virtual void Close();
    virtual unsigned int NominalBitRate();

    virtual unsigned int ReadPacketPayload(uint8_t *dst, unsigned int to_read);
    virtual unsigned int StreamHeaderSize() { return 7; }
    

private:
	void OutputHdrInfo();
	virtual void FillAUbuffer(unsigned int frames_to_buffer);
    
    static const unsigned int default_buffer_size;
    static const unsigned int ticks_per_frame_90kHz;
    unsigned int num_frames;

	/* State variables for scanning source bit-stream */
    unsigned int stream_num;
    unsigned int samples_per_second;
    unsigned int channels;
    unsigned int bits_per_sample;
    unsigned int whole_unit;
    unsigned int bytes_per_frame;
    unsigned int frame_index;
    unsigned int dynamic_range_code;
    LpcmParams *parms;
}; 	

class SUBPStream : public AudioStream
{
public:   
    SUBPStream(IBitStream &ibs,SubtitleStreamParams* params,Multiplexor &into );
    virtual void Init(const int stream_num);
    virtual void Close();
    static bool Probe(IBitStream &bs );
    // TODO: rough and ready measure...
    virtual unsigned int NominalBitRate() {return 50*1024;}
    virtual unsigned int ReadPacketPayload(uint8_t *dst, unsigned int to_read);
    virtual unsigned int StreamHeaderSize() { return 1; }
    

private:
	virtual void FillAUbuffer(unsigned int frames_to_buffer);
    bool ParseAUBitwise();
    static const unsigned int default_buffer_size;

	/* State variables for scanning source bit-stream */
    unsigned int framesize;
    unsigned int samples_per_second;
    unsigned int bit_rate;
    unsigned int stream_num;
    unsigned int num_frames;
    int64_t     initial_offset;  // DTS of first Subp.
    SubtitleStreamParams* parms;
    int8_t sub_stream_id; // substream_id
}; 	


#endif // __AUDIOSTRM_H__


/* 
 * Local variables:
 *  c-file-style: "stroustrup"
 *  tab-width: 4
 *  indent-tabs-mode: nil
 * End:
 */