Tizen 2.1 base
[sdk/ide/native-sample.git] / samples / native / partner / cpp / Sample / Tizen C++ / MediaApp / MediaApp / project / inc / PixelFormatMapper.h
1 //
2 // Tizen C++ SDK
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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 #ifndef _PIXEL_FORMAT_MAPPER_H_
19 #define _PIXEL_FORMAT_MAPPER_H_
20
21 #include <FMedia.h>
22 #include <FUi.h>
23 #include <FGraphics.h>
24
25 using namespace Osp::Media;
26 using namespace Osp::Graphics;
27 using namespace Osp::Ui::Controls;
28
29 class PixelFormatMapper
30 {
31 public:
32         static MediaPixelFormat GetFormat(const Osp::Base::String& src, MediaPixelFormat defVal);
33         static BitmapPixelFormat GetFormat(MediaPixelFormat src, BitmapPixelFormat defVal);
34         static OverlayRegionBufferPixelFormat GetFormat(MediaPixelFormat src, OverlayRegionBufferPixelFormat defVal);
35         static float GetBytesPerPixel(MediaPixelFormat src);
36         static const char* GetFormatString(MediaPixelFormat src, const char* pDefVal);
37         static const char* GetImageFormatString(Osp::Media::ImageFormat fmt);
38
39 };
40
41 #endif // _PIXEL_FORMAT_MAPPER_H_