2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FMedia_Mpeg4Encoder.h
20 * @brief This is the header file for the _Mpeg4Encoder.
22 * This header file contains the declarations of the Tizen::Media::_Mpeg4Encoder.
24 #ifndef FMEDIA_INTERNAL_MPEG4ENCODER_H_
25 #define FMEDIA_INTERNAL_MPEG4ENCODER_H_
28 namespace Tizen { namespace Media
32 : public _IVideoEncoder
37 virtual ~_Mpeg4Encoder(void);
40 virtual result Construct(const Tizen::Base::Collection::HashMap* pOption = null);
42 virtual result Encode(const byte* srcBuf, int& srcBufLength, byte*& dstBuf, int& dstBufLength);
44 virtual result Reset(void);
46 virtual result SetValue(MediaPropertyType key, int value);
48 virtual result SetValue(MediaPropertyType key, bool value);
50 virtual Tizen::Base::Collection::IListT<MediaPropertyType>* GetSupportedPropertyListN(void) const;
52 virtual bool IsPropertySupported(MediaPropertyType type) const;
55 _Mpeg4Encoder(const _Mpeg4Encoder&);
57 _Mpeg4Encoder& operator =(const _Mpeg4Encoder&);
60 static const int HEIGHT = 144;
61 static const int WIDTH = 176;
62 static const int MAX_WIDTH = 800;
63 static const int MAX_HEIGHT = 600;
64 static const int MAX_FRAME_RATE = 30;
65 static const int QUANTISATION_PARAMETER = 30;
66 static const int GOP = 10;
67 // (bytes per second = bitrate * 1000 / 8) intermediate bit rate around 320 kbps
68 static const int BITRATE_IN_BITS = 64 * 1000;
69 static const int FRAME_RATE = 20;
70 static const int MIN_QP = 1;
71 static const int MAX_QP = 31;
72 static const int INTERNAL_BUFFER_COUNT = 0;
74 AVCodecContext* __pCodecCtx;
84 #endif // FMEDIA_INTERNAL_MPEG4ENCODER_H_