1 // Copyright (c) 2017 Intel Corporation
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to deal
5 // in the Software without restriction, including without limitation the rights
6 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 // copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in all
11 // copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 // SOFTWARE.
20 
21 #ifndef __UMC_VIDEO_ENCODER_H__
22 #define __UMC_VIDEO_ENCODER_H__
23 
24 #include "umc_base_codec.h"
25 
26 namespace UMC
27 {
28 
29 class VideoEncoderParams : public BaseCodecParams
30 {
DYNAMIC_CAST_DECL(VideoEncoderParams,BaseCodecParams)31     DYNAMIC_CAST_DECL(VideoEncoderParams, BaseCodecParams)
32 public:
33     // Constructor
34     VideoEncoderParams() :
35         numEncodedFrames(0),
36         qualityMeasure(51)
37     {
38       info.clip_info.width     = 0;
39       info.clip_info.height    = 0;
40       info.color_format        = YUV420;
41       info.bitrate             = 0;
42       info.aspect_ratio_width  = 1;
43       info.aspect_ratio_height = 1;
44       info.framerate           = 30;
45       info.duration            = 0;
46       info.interlace_type      = PROGRESSIVE;
47       info.stream_type         = UNDEF_VIDEO;
48       info.stream_subtype      = UNDEF_VIDEO_SUBTYPE;
49       info.streamPID           = 0;
50     }
51     // Destructor
~VideoEncoderParams(void)52     virtual ~VideoEncoderParams(void){}
53     // Read parameter from file
ReadParamFile(const vm_char *)54     virtual Status ReadParamFile(const vm_char * /*ParFileName*/)
55     {
56       return UMC_ERR_NOT_IMPLEMENTED;
57     }
58 
59     VideoStreamInfo info;               // (VideoStreamInfo) compressed video info
60     int32_t          numEncodedFrames;   // (int32_t) number of encoded frames
61 
62     // additional controls
63     int32_t qualityMeasure;      // per cent, represent quantization precision
64 };
65 
66 /******************************************************************************/
67 
68 class VideoEncoder : public BaseCodec
69 {
DYNAMIC_CAST_DECL(VideoEncoder,BaseCodec)70     DYNAMIC_CAST_DECL(VideoEncoder, BaseCodec)
71 public:
72     // Destructor
73     virtual ~VideoEncoder() {};
74 };
75 
76 /******************************************************************************/
77 
78 } // end namespace UMC
79 
80 #endif /* __UMC_VIDEO_ENCODER_H__ */
81