1 /* ------------------------------------------------------------------ 2 * Copyright (C) 1998-2009 PacketVideo 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 13 * express or implied. 14 * See the License for the specific language governing permissions 15 * and limitations under the License. 16 * ------------------------------------------------------------------- 17 */ 18 /** 19 * @file pvmfamrencnode_extension.h 20 */ 21 22 #ifndef PVMFAMRENCNODE_EXTENSION_H_INCLUDED 23 #define PVMFAMRENCNODE_EXTENSION_H_INCLUDED 24 25 #ifndef OSCL_BASE_H_INCLUDED 26 #include "oscl_base.h" 27 #endif 28 #ifndef OSCL_STRING_H_INCLUDED 29 #include "oscl_string.h" 30 #endif 31 #ifndef PV_UUID_H_INCLUDED 32 #include "pv_uuid.h" 33 #endif 34 #ifndef PV_INTERFACE_H_INCLUDED 35 #include "pv_interface.h" 36 #endif 37 38 #define PVAMREncExtensionUUID PVUuid(0xd282cc91,0x54a6,0x4f36,0xbc,0x5b,0x2d,0xab,0xb4,0x40,0x69,0x26) 39 40 /** 41 * Enumerated list of output bitrate 42 */ 43 44 typedef enum 45 { 46 GSM_AMR_4_75 = 0, 47 GSM_AMR_5_15, 48 GSM_AMR_5_90, 49 GSM_AMR_6_70, 50 GSM_AMR_7_40, 51 GSM_AMR_7_95, 52 GSM_AMR_10_2, 53 GSM_AMR_12_2, 54 GSM_AMR_DTX, 55 GSM_AMR_N_MODES /* number of (SPC) modes */ 56 } PVMF_GSMAMR_Rate; 57 58 59 //////////////////////////////////////////////////////////////////////////// 60 class PVAMREncExtensionInterface : public PVInterface 61 { 62 public: 63 /** Increment reference counter for this interface. */ 64 virtual void addRef() = 0; 65 66 /** Decrement reference counter for this interface. */ 67 virtual void removeRef() = 0; 68 69 /** 70 * Query for a pointer to an instance of the interface specified by the UUID. 71 * 72 * @param uuid UUID of the interface to be queried. 73 * @param iface Output parameter where a pointer to an instance of the requested 74 * interface is stored if the interface is supported. 75 * @return true if successful, else false. 76 */ 77 virtual bool queryInterface(const PVUuid& uuid, PVInterface*& iface) = 0; 78 79 /** 80 * Sets the bitrate of encoded output. 81 * @param aBitRate Bitrate in bits per second. 82 * @return PVMFSuccess if successful, else see PVMF return code. 83 */ 84 virtual PVMFStatus SetOutputBitRate(PVMF_GSMAMR_Rate aBitRate) = 0; 85 86 /** 87 * Sets the maximum number of output frames per media buffer 88 * @param aNumOutputFrames, maximum number of output frames 89 * @return PVMFSuccess if successful, else see PVMF return code. 90 */ 91 virtual PVMFStatus SetMaxNumOutputFramesPerBuffer(uint32 aNumOutputFrames) = 0; 92 }; 93 94 #endif // PVMFAMRENCNODE_EXTENSION_H_INCLUDED 95 96 97 98 99 100