CAF state bug fix
[platform/framework/native/media.git] / src / FMedia_VideoFrameExtractorImpl.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_VideoFrameExtractorImpl.h
20  * @brief  This is the header file for the %_VideoFrameExtractorImpl Implementation class.
21  *
22  * This header file contains the declarations of the %_VideoFrameExtractorImpl implementation class.
23  */
24
25 #ifndef _FMEDIA_VIDEO_FRAME_EXTRACTOR_IMPL_H_
26 #define _FMEDIA_VIDEO_FRAME_EXTRACTOR_IMPL_H_
27
28 #include <FBaseObject.h>
29 #include <FMediaImageBuffer.h>
30 #include <FMediaVideoFrameExtractor.h>
31 #include <FMediaRecorderTypes.h>
32
33 namespace Tizen { namespace Media {
34
35 class _VideoFrameExtractorImpl
36         : public Tizen::Base::Object
37 {
38 public:
39         /**
40          * @see  VideoFrameExtractor::VideoFrameExtractor()
41          */
42
43         _VideoFrameExtractorImpl(void);
44
45         /**
46          * @see  VideoFrameExtractor::~VideoFrameExtractor()
47          */
48         virtual ~_VideoFrameExtractorImpl(void);
49
50         /**
51          * @see  VideoFrameExtractor::Construct()
52          */
53         result Construct(const Tizen::Base::String &filePath, MediaPixelFormat pixelFormat);
54
55         /**
56          * @see  VideoFrameExtractor::GetWidth()
57          */
58         int GetWidth(void) const;
59
60         /**
61          * @see  VideoFrameExtractor::GetHeight()
62          */
63         int GetHeight(void) const;
64
65         /**
66          * @see  VideoFrameExtractor::GetDuration()
67          */
68         long GetDuration(void) const;
69
70         /**
71          * @see  VideoFrameExtractor::GetRecordingRotation()
72          */
73         RecordingRotation GetRecordingRotation(void) const;
74
75         /**
76          * @see  VideoFrameExtractor::GetFrameN()
77          */
78         ImageBuffer* GetFrameN(long timestamp);
79
80         /**
81          * @see  VideoFrameExtractor::GetFrameN()
82          */
83         static ImageBuffer* GetFrameN(const Tizen::Base::String& path, MediaPixelFormat pixelFormat, long timestamp);
84
85         static _VideoFrameExtractorImpl* GetInstance(VideoFrameExtractor *pVideoFrameExtractor);
86         static const _VideoFrameExtractorImpl* GetInstance(const VideoFrameExtractor *pVideoFrameExtractor);
87
88         static  result ToResult(int ret);
89
90         static  result GetMetaDataValue(struct metadata_extractor_s*& extractor,int key, int &value);
91
92 private:
93
94         struct metadata_extractor_s* __extractor;
95         MediaPixelFormat __pixelFormat;
96         RecordingRotation __rotation;
97         int __width;
98         int __height;
99         long __duration;
100 };
101
102
103 }} // Tizen::Media
104
105 #endif //_FMEDIA_VIDEO_FRAME_EXTRACTOR_IMPL_H_
106