live
ADTSAudioStreamDiscreteFramer.hh
Go to the documentation of this file.
1 /**********
2 This library is free software; you can redistribute it and/or modify it under
3 the terms of the GNU Lesser General Public License as published by the
4 Free Software Foundation; either version 3 of the License, or (at your
5 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
6 
7 This library is distributed in the hope that it will be useful, but WITHOUT
8 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 more details.
11 
12 You should have received a copy of the GNU Lesser General Public License
13 along with this library; if not, write to the Free Software Foundation, Inc.,
14 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 **********/
16 // "liveMedia"
17 // Copyright (c) 1996-2021 Live Networks, Inc. All rights reserved.
18 // A filter that reads (discrete) AAC audio frames, and outputs each frame with
19 // a preceding ADTS header.
20 // C++ header
21 
22 #ifndef _ADTS_AUDIO_STREAM_DISCRETE_FRAMER_HH
23 #define _ADTS_AUDIO_STREAM_DISCRETE_FRAMER_HH
24 
25 #ifndef _FRAMED_FILTER_HH
26 #include "FramedFilter.hh"
27 #endif
28 
29 #define ADTS_HEADER_SIZE 7 // we don't include a checksum
30 
32 public:
34  createNew(UsageEnvironment& env, FramedSource* inputSource, char const* configStr);
35  // "configStr" should be a 4-character hexadecimal string for a 2-byte value
36 
37 protected:
39  u_int8_t profile, u_int8_t samplingFrequencyIndex, u_int8_t channelConfiguration);
40  // called only by createNew()
42 
43 protected:
44  // redefined virtual functions:
45  virtual void doGetNextFrame();
46 
47 protected:
48  static void afterGettingFrame(void* clientData, unsigned frameSize,
49  unsigned numTruncatedBytes,
50  struct timeval presentationTime,
51  unsigned durationInMicroseconds);
52  void afterGettingFrame1(unsigned frameSize,
53  unsigned numTruncatedBytes,
54  struct timeval presentationTime,
55  unsigned durationInMicroseconds);
56 
57 private:
59 };
60 
61 #endif
#define ADTS_HEADER_SIZE
static void afterGettingFrame(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
ADTSAudioStreamDiscreteFramer(UsageEnvironment &env, FramedSource *inputSource, u_int8_t profile, u_int8_t samplingFrequencyIndex, u_int8_t channelConfiguration)
void afterGettingFrame1(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
static ADTSAudioStreamDiscreteFramer * createNew(UsageEnvironment &env, FramedSource *inputSource, char const *configStr)
FramedSource * inputSource() const
Definition: FramedFilter.hh:30