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_VideoSourceAdapter.h
20 * @brief This is the header file for the %_VideoSourceAdapter class.
22 #ifndef _FMEDIA_INTERNAL_VIDEO_SOURCE_ADAPTER_H_
23 #define _FMEDIA_INTERNAL_VIDEO_SOURCE_ADAPTER_H_
26 #include <FBaseObject.h>
27 #include <FBaseColIList.h>
28 #include <FBaseColIListT.h>
29 #include <FGrpDimension.h>
30 #include "FMedia_CameraTypes.h"
32 namespace Tizen { namespace Media
43 * @class _VideoSourceAdapter
45 class _VideoSourceAdapter
46 : public Tizen::Base::Object
50 * This is the constructor for this class.
52 * @param[in] cameraImpl _CameraImpl instance
54 _VideoSourceAdapter(const Tizen::Media::_CameraImpl &cameraImpl);
57 * This is the destructor for this class.
58 * All allocated resources are deallocated by this method.
60 virtual ~_VideoSourceAdapter(void);
63 * Gets a list of the supported camcorder resolutions. @n
64 * Each list item is a Tizen::Graphics::Dimension value.
66 * @return A list of dimension representing the supported video recorder resolutions, @n
67 * else an empty list if no recording resolution is supported or if an exception occurs
68 * @exception E_SUCCESS The method is successful.
69 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
70 * @exception E_SYSTEM A system error has occurred.
71 * @remarks The specific error code can be accessed using the GetLastResult() method. @n
72 * The return value must be released by the calling method. @n
73 * All items in the list must be released by the calling method. @n
75 Tizen::Base::Collection::IList* GetSupportedRecordingResolutionListN(void) const;
78 * Gets the supported source format list for the video recording. @n
79 * Each list item has camera_pixel_format_e value.
81 * @return A list of the formats supported by the recorder, @n
82 * else @c null if no source format is supported or an exception occurs
83 * @exception E_SUCCESS The method is successful.
84 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
85 * @exception E_SYSTEM A system error has occurred.
86 * @exception E_OUT_OF_MEMORY The memory is insufficient.
87 * @remark The specific error code can be accessed using the GetLastResult() method. @n
88 * The return value must be deleted. @n
90 Tizen::Base::Collection::IListT<camera_pixel_format_e>* GetSupportedRecordingFormatListN(void) const;
93 * Gets the supported frame rate list of the input resolution.@n
94 * Each item of the list has an integer value.
96 * @return A list of the frame rate of the input resolution, @n
97 * else @c null if no frame rate is supported or an exception occurs
98 * @param[in] dim The preview resolution of the camera
99 * @exception E_SUCCESS The method is successful.
100 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
101 * @exception E_SYSTEM A system error has occurred.
103 Tizen::Base::Collection::IListT<int>* GetSupportedFrameRateListN(const Tizen::Graphics::Dimension& dim) const;
106 * Gets the source's resolution.
108 * @return A dimension representing the source's resolution.
109 * @exception E_SUCCESS The method is successful.
110 * @exception E_INVALID_STATE This instance is in an invalid state for this method.
111 * @exception E_SYSTEM A system error has occurred.
112 * @remarks The specific error code can be accessed using the GetLastResult() method.
114 Tizen::Graphics::Dimension GetSourceResolution(void) const;
117 * Check if the source has the restriction of recording resolution.
119 * @return @c true if the recording resolution is restricted, @n
122 bool HasRecordingResolutionRestriction(void) const;
124 * Set the recommended preview format for videorecord.
126 * @return An error code
127 * @param[in] mode _CameraHandle
128 * @exception E_SUCCESS The method is successful.
129 * @exception E_SYSTEM A system error has occurred.
130 * @remarks The specific error code can be accessed using the GetLastResult() method.
132 result SetRecommendPreviewFormat(_CameraHandle cameraHandle);
135 Tizen::Base::Object* __pSource;
136 _VideoSourceType __sourceType;
137 camera_pixel_format_e __recommendPreviewFormat;