live
MP3ADUTranscoder.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// Transcoder for ADUized MP3 frames
19// C++ header
20
21#ifndef _MP3_ADU_TRANSCODER_HH
22#define _MP3_ADU_TRANSCODER_HH
23
24#ifndef _FRAMED_FILTER_HH
25#include "FramedFilter.hh"
26#endif
27
29public:
31 unsigned outBitrate /* in kbps */,
33
34 unsigned outBitrate() const { return fOutBitrate; }
35protected:
37 unsigned outBitrate /* in kbps */,
39 // called only by createNew()
41
42private:
43 // redefined virtual functions:
44 virtual void doGetNextFrame();
45 virtual void getAttributes() const;
46
47private:
48 static void afterGettingFrame(void* clientData,
49 unsigned numBytesRead, unsigned numTruncatedBytes,
50 struct timeval presentationTime,
51 unsigned durationInMicroseconds);
52 void afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes,
53 struct timeval presentationTime,
54 unsigned durationInMicroseconds);
55
56private:
57 unsigned fOutBitrate; // in kbps
59
60 unsigned char* fOrigADU;
61 // used to store incoming ADU prior to transcoding
62};
63
64#endif
FramedSource * inputSource() const
Definition: FramedFilter.hh:30
virtual void getAttributes() const
MP3ADUTranscoder(UsageEnvironment &env, unsigned outBitrate, FramedSource *inputSource)
virtual void doGetNextFrame()
static void afterGettingFrame(void *clientData, unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
unsigned fAvailableBytesForBackpointer
unsigned outBitrate() const
void afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
unsigned char * fOrigADU
virtual ~MP3ADUTranscoder()
static MP3ADUTranscoder * createNew(UsageEnvironment &env, unsigned outBitrate, FramedSource *inputSource)