Tizen 2.0 Release
[framework/osp/media.git] / src / FMedia_H263Encoder.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  *  @file   FMedia_H263EncoderFfmpeg.h
20  *  @brief  This is the header file for the Tizen::Media::FMediaIVideoEncoder.
21  *
22  *  This header file contains the declarations of the Tizen::Media::_H263EncoderFfmpeg.
23  */
24 #ifndef FMEDIA_INTERNAL_H263ENCODER_H_
25 #define FMEDIA_INTERNAL_H263ENCODER_H_
26
27 namespace Tizen { namespace Media
28 {
29
30 class _H263Encoder
31         : public _IVideoEncoder
32 {
33 public:
34         _H263Encoder(void);
35
36         virtual ~_H263Encoder(void);
37
38 public:
39         virtual result Construct(const Tizen::Base::Collection::HashMap* pOption = null);
40
41         virtual result Encode(const byte* srcBuf, int& srcBufLength, byte*& dstBuf, int& dstBufLength);
42
43         virtual result Reset(void);
44
45         virtual result SetValue(MediaPropertyType key, int value);
46
47         virtual result SetValue(MediaPropertyType key, bool value);
48
49         virtual Tizen::Base::Collection::IListT<MediaPropertyType>* GetSupportedPropertyListN(void) const;
50
51         virtual bool IsPropertySupported(MediaPropertyType type) const;
52
53 private:
54         _H263Encoder(const _H263Encoder&);
55
56         _H263Encoder& operator =(const _H263Encoder&);
57
58 private:
59         static const int INPUT_BUFFER_PADDING_SIZE = 8;
60         static const int HEIGHT = 288;
61         static const int WIDTH = 352;
62         static const int MAX_HEIGHT = 640;
63         static const int MAX_WIDTH = 480;
64         static const int MAX_FRAME_RATE = 30;
65         static const int Y_STRIDE = 640;
66         static const int UV_STRIDE = 320;
67         static const int QUANTISATION_PARAMETER = 30;
68         static const int GOP = 15;
69         static const int BITRATE_IN_BITS = 0;
70         static const int FRAME_RATE = 25;
71         static const int MIN_QP = 1;
72         static const int MAX_QP = 31;
73         static const int SET_PROPERTY_COUNT = 6;
74         static const int GET_PROPERTY_COUNT = 10;
75         static const int INTERNAL_BUFFER_COUNT = 0;
76
77         AVCodecContext* __pCodecCtx;
78         AVCodec* __pCodec;
79         AVFrame* __pFrame;
80         bool __firstFrame;
81 };
82
83 };
84 };
85 #endif // FMEDIA_INTERNAL_H263ENCODER_H_
86