live
MP3ADU.hh
Go to the documentation of this file.
1/**********
2This library is free software; you can redistribute it and/or modify it under
3the terms of the GNU Lesser General Public License as published by the
4Free Software Foundation; either version 3 of the License, or (at your
5option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6
7This library is distributed in the hope that it will be useful, but WITHOUT
8ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10more details.
11
12You should have received a copy of the GNU Lesser General Public License
13along with this library; if not, write to the Free Software Foundation, Inc.,
1451 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15**********/
16// "liveMedia"
17// Copyright (c) 1996-2024 Live Networks, Inc. All rights reserved.
18// 'ADU' MP3 streams (for improved loss-tolerance)
19// C++ header
20
21#ifndef _MP3_ADU_HH
22#define _MP3_ADU_HH
23
24#ifndef _FRAMED_FILTER_HH
25#include "FramedFilter.hh"
26#endif
27
29public:
32 Boolean includeADUdescriptors = True);
33
34 void resetInput();
35 // This is called whenever there's a discontinuity in the input MP3 source
36 // (e.g., due to seeking within the source). It causes any still-unprocessed
37 // MP3 frame data within our queue to be discarded, so that it does not
38 // erroneously get used by backpointers from the new MP3 frames.
39
41
42protected:
45 Boolean includeADUdescriptors);
46 // called only by createNew()
48
49private:
50 // Redefined virtual functions:
51 virtual void doGetNextFrame();
52 virtual char const* MIMEtype() const;
53
54private:
56
57private:
59 class SegmentQueue* fSegments;
62 int fScale;
63 unsigned fFrameCounter;
64};
65
67public:
70 Boolean includeADUdescriptors = True);
71
72protected:
75 Boolean includeADUdescriptors);
76 // called only by createNew()
78
79private:
80 // Redefined virtual functions:
81 virtual void doGetNextFrame();
82 virtual char const* MIMEtype() const;
83
84private:
88
89private:
91 class SegmentQueue* fSegments;
92};
93
94#endif
const Boolean True
Definition: Boolean.hh:31
unsigned char Boolean
Definition: Boolean.hh:25
ADUFromMP3Source(UsageEnvironment &env, FramedSource *inputSource, Boolean includeADUdescriptors)
static ADUFromMP3Source * createNew(UsageEnvironment &env, FramedSource *inputSource, Boolean includeADUdescriptors=True)
class SegmentQueue * fSegments
Definition: MP3ADU.hh:59
Boolean fAreEnqueueingMP3Frame
Definition: MP3ADU.hh:58
Boolean setScaleFactor(int scale)
virtual ~ADUFromMP3Source()
Boolean fIncludeADUdescriptors
Definition: MP3ADU.hh:60
unsigned fTotalDataSizeBeforePreviousRead
Definition: MP3ADU.hh:61
unsigned fFrameCounter
Definition: MP3ADU.hh:63
virtual char const * MIMEtype() const
virtual void doGetNextFrame()
Boolean doGetNextFrame1()
FramedSource * inputSource() const
Definition: FramedFilter.hh:30
virtual char const * MIMEtype() const
Boolean generateFrameFromHeadADU()
class SegmentQueue * fSegments
Definition: MP3ADU.hh:91
MP3FromADUSource(UsageEnvironment &env, FramedSource *inputSource, Boolean includeADUdescriptors)
Boolean fAreEnqueueingADU
Definition: MP3ADU.hh:90
static MP3FromADUSource * createNew(UsageEnvironment &env, FramedSource *inputSource, Boolean includeADUdescriptors=True)
virtual ~MP3FromADUSource()
void insertDummyADUsIfNecessary()
Boolean needToGetAnADU()
virtual void doGetNextFrame()