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 This PVA_FF_DecoderSpecificInfo Class that holds the Mpeg4 VOL header for the 20 video stream 21 */ 22 23 #ifndef __H263DecoderSpecificInfo3GPP_H__ 24 #define __H263DecoderSpecificInfo3GPP_H__ 25 26 #include "atom.h" 27 #include "atomutils.h" 28 #include "a_atomdefs.h" 29 30 class PVA_FF_H263DecBitrateAtom : public PVA_FF_Atom 31 { 32 public: 33 PVA_FF_H263DecBitrateAtom(); 34 virtual ~PVA_FF_H263DecBitrateAtom() {}; 35 void setAvgBitrate(uint32 avg_bitrate) 36 { 37 _avg_bitrate = avg_bitrate; 38 } 39 void setMaxBitrate(uint32 max_bitrate) 40 { 41 _max_bitrate = max_bitrate; 42 } 43 44 virtual bool renderToFileStream(MP4_AUTHOR_FF_FILE_IO_WRAP *fp); 45 virtual void recomputeSize(); 46 47 private: 48 uint32 _avg_bitrate; 49 uint32 _max_bitrate; 50 }; 51 52 53 class PVA_FF_H263SpecficAtom : public PVA_FF_Atom 54 { 55 56 public: 57 PVA_FF_H263SpecficAtom(); // Default constructor 58 virtual ~PVA_FF_H263SpecficAtom() 59 { 60 if (_ph263_decbitrateatom != NULL) 61 { 62 PV_MP4_FF_DELETE(NULL, PVA_FF_H263DecBitrateAtom , _ph263_decbitrateatom); 63 } 64 }; // Destructor 65 66 void setVendorCode(int32 VendorCode = PACKETVIDEO_FOURCC) 67 { 68 _VendorCode = VendorCode; 69 } 70 void setEncoderVersion(uint8 encoder_version = 0) 71 { 72 _encoder_version = encoder_version; 73 } 74 void setCodecProfile(uint8 codec_profile = 0) 75 { 76 _codec_profile = codec_profile; 77 } 78 void setCodecLevel(uint8 codec_level = 10) 79 { 80 _codec_level = codec_level; 81 } 82 void setMaxWidth(uint16 max_width = 176) 83 { 84 _max_width = max_width; 85 } 86 void setMaxHeight(uint16 max_height = 144) 87 { 88 _max_height = max_height; 89 } 90 91 virtual bool renderToFileStream(MP4_AUTHOR_FF_FILE_IO_WRAP *fp); 92 virtual void recomputeSize(); 93 94 PVA_FF_H263DecBitrateAtom * _ph263_decbitrateatom; 95 private: 96 int32 _VendorCode; 97 uint8 _encoder_version; 98 uint8 _codec_profile; 99 uint8 _codec_level; 100 uint16 _max_width; 101 uint16 _max_height; 102 103 }; 104 105 #endif 106 107