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