netwerk/protocol/rtsp/rtsp/AMPEG4AudioAssembler.h

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

michael@0 1 /*
michael@0 2 * Copyright (C) 2010 The Android Open Source Project
michael@0 3 *
michael@0 4 * Licensed under the Apache License, Version 2.0 (the "License");
michael@0 5 * you may not use this file except in compliance with the License.
michael@0 6 * You may obtain a copy of the License at
michael@0 7 *
michael@0 8 * http://www.apache.org/licenses/LICENSE-2.0
michael@0 9 *
michael@0 10 * Unless required by applicable law or agreed to in writing, software
michael@0 11 * distributed under the License is distributed on an "AS IS" BASIS,
michael@0 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
michael@0 13 * See the License for the specific language governing permissions and
michael@0 14 * limitations under the License.
michael@0 15 */
michael@0 16
michael@0 17 #ifndef A_MPEG4_AUDIO_ASSEMBLER_H_
michael@0 18
michael@0 19 #define A_MPEG4_AUDIO_ASSEMBLER_H_
michael@0 20
michael@0 21 #include "ARTPAssembler.h"
michael@0 22
michael@0 23 #include <utils/List.h>
michael@0 24
michael@0 25 #include <stdint.h>
michael@0 26
michael@0 27 namespace android {
michael@0 28
michael@0 29 struct AMessage;
michael@0 30 struct AString;
michael@0 31
michael@0 32 struct AMPEG4AudioAssembler : public ARTPAssembler {
michael@0 33 AMPEG4AudioAssembler(
michael@0 34 const sp<AMessage> &notify, const AString &params);
michael@0 35
michael@0 36 protected:
michael@0 37 virtual ~AMPEG4AudioAssembler();
michael@0 38
michael@0 39 virtual AssemblyStatus assembleMore(const sp<ARTPSource> &source);
michael@0 40 virtual void onByeReceived();
michael@0 41 virtual void packetLost();
michael@0 42
michael@0 43 private:
michael@0 44 sp<AMessage> mNotifyMsg;
michael@0 45
michael@0 46 bool mMuxConfigPresent;
michael@0 47 unsigned mNumSubFrames;
michael@0 48 unsigned mFrameLengthType;
michael@0 49 ssize_t mFixedFrameLength;
michael@0 50 bool mOtherDataPresent;
michael@0 51 unsigned mOtherDataLenBits;
michael@0 52
michael@0 53 uint32_t mAccessUnitRTPTime;
michael@0 54 bool mNextExpectedSeqNoValid;
michael@0 55 uint32_t mNextExpectedSeqNo;
michael@0 56 bool mAccessUnitDamaged;
michael@0 57 List<sp<ABuffer> > mPackets;
michael@0 58
michael@0 59 AssemblyStatus addPacket(const sp<ARTPSource> &source);
michael@0 60 void submitAccessUnit();
michael@0 61
michael@0 62 sp<ABuffer> removeLATMFraming(const sp<ABuffer> &buffer);
michael@0 63
michael@0 64 DISALLOW_EVIL_CONSTRUCTORS(AMPEG4AudioAssembler);
michael@0 65 };
michael@0 66
michael@0 67 } // namespace android
michael@0 68
michael@0 69 #endif // A_MPEG4_AUDIO_ASSEMBLER_H_

mercurial