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.
20 * @brief This is the header file for the media types.
22 * This header file contains the declarations of the media types.
24 #ifndef _FMEDIA_MEDIA_TYPES_H_
25 #define _FMEDIA_MEDIA_TYPES_H_
27 #include <FMediaImageTypes.h>
29 namespace Tizen { namespace Media
33 * Defines a macro that is added to declare the four-character code.
37 * @param[in] ch1 The first character
38 * @param[in] ch2 The second character
39 * @param[in] ch3 The third character
40 * @param[in] ch4 The fourth character
42 #define FourCharCode(ch1, ch2, ch3, ch4) ((unsigned int) (unsigned char) (ch1)) | \
43 ((unsigned int) (unsigned char) (ch2) << 8) | \
44 ((unsigned int) (unsigned char) (ch3) << 16) | \
45 ((unsigned int) (unsigned char) (ch4) << 24)
50 * Defines the types of codec.
54 * @see FourCharCode(ch1, ch2, ch3, ch4)
58 CODEC_NONE = 0x00000000, /**< No codec */
60 CODEC_LPCM = FourCharCode('L', 'P', 'C', 'M'), /**< The Linear PCM codec */
61 CODEC_ALAW = FourCharCode('A', 'L', 'A', 'W'), /**< The G.711 A-Law codec */
62 CODEC_ULAW = FourCharCode('u', 'L', 'A', 'W'), /**< The G.711 u-Law codec */
63 CODEC_IMA_ADPCM = FourCharCode('I', 'M', 'A', 'D'), /**< The IMA ADPCM codec */
64 CODEC_MS_ADPCM = FourCharCode('M', 'S', 'A', 'D'), /**< The MS ADPCM codec */
65 CODEC_AMR_NB = FourCharCode('A', 'M', 'R', ' '), /**< The AMR-NB codec */
66 CODEC_FLAC = FourCharCode('F', 'L', 'A', 'C'), /**< The FLAC codec */
67 CODEC_MP3 = FourCharCode('M', 'P', '3', ' '), /**< The MP3 codec */
68 CODEC_AAC = FourCharCode('A', 'A', 'C', ' '), /**< The AAC codec */
69 CODEC_HEAAC = FourCharCode('A', 'A', 'C', 'H'), /**< The Enhanced AAC codec */
70 CODEC_HEAAC_V2 = FourCharCode('A', 'A', 'C', 'P'), /**< The Enhanced AAC V2 codec */
71 CODEC_AC3 = FourCharCode('A', 'C', '-', '3'), /**< The AC-3 codec */
72 CODEC_VORBIS = FourCharCode('V', 'O', 'R', 'B'), /**< The VORBIS codec */
73 CODEC_WMA = FourCharCode('W', 'M', 'A', ' '), /**< The WMA codec */
74 CODEC_MIDI = FourCharCode('M', 'I', 'D', 'I'), /**< The MIDI codec */
76 CODEC_H263 = FourCharCode('H', '2', '6', '3'), /**< The H.263 codec */
77 CODEC_MPEG4 = FourCharCode('M', 'P', 'G', '4'), /**< The MPEG4 codec */
78 CODEC_H264 = FourCharCode('H', '2', '6', '4'), /**< The H.264 codec */
79 CODEC_THEORA = FourCharCode('T', 'H', 'R', 'A'), /**< The THEORA codec */
80 CODEC_WMV = FourCharCode('W', 'M', 'V', ' '), /**< The WMV codec */
82 CODEC_JPEG = FourCharCode('J', 'P', 'E', 'G'), /**< The JPEG codec */
83 CODEC_PNG = FourCharCode('P', 'N', 'G', ' '), /**< The PNG codec */
84 CODEC_GIF = FourCharCode('G', 'I', 'F', ' '), /**< The GIF codec */
86 CODEC_UNKNOWN = 0xFFFFFFFE, /**< The unknown codec */
87 CODEC_MAX = 0xFFFFFFFF // Max
91 * @enum MediaContainerType
93 * Defines the various container types of the media.
97 * @see FourCharCode(ch1, ch2, ch3, ch4)
99 enum MediaContainerType
101 MEDIA_CONTAINER_NONE = 0x00000000, /**< No container */
102 MEDIA_CONTAINER_WAV = FourCharCode('W', 'A', 'V', ' '), /**< The WAVE container */
103 MEDIA_CONTAINER_AMR = FourCharCode('A', 'M', 'R', ' '), /**< The AMR container */
104 MEDIA_CONTAINER_AAC = FourCharCode('A', 'A', 'C', ' '), /**< The AAC container */
105 MEDIA_CONTAINER_MP3 = FourCharCode('M', 'P', '3', ' '), /**< The MP3 container */
106 MEDIA_CONTAINER_FLAC = FourCharCode('F', 'L', 'A', 'C'), /**< The FLAC container */
107 MEDIA_CONTAINER_3GP = FourCharCode('3', 'G', 'P', ' '), /**< The 3GP container */
108 MEDIA_CONTAINER_MP4 = FourCharCode('M', 'P', '4', ' '), /**< The MP4 container */
109 MEDIA_CONTAINER_AVI = FourCharCode('A', 'V', 'I', ' '), /**< The AVI container */
110 MEDIA_CONTAINER_ASF = FourCharCode('A', 'S', 'F', ' '), /**< The ASF container */
111 MEDIA_CONTAINER_MKV = FourCharCode('M', 'K', 'V', ' '), /**< The MKV container */
112 MEDIA_CONTAINER_MOV = FourCharCode('M', 'O', 'V', ' '), /**< The MOV container */
113 MEDIA_CONTAINER_OGG = FourCharCode('O', 'G', 'G', ' '), /**< The OGG container */
114 MEDIA_CONTAINER_UNKNOWN = 0xFFFFFFFE, /**< The unknown container */
115 MEDIA_CONTAINER_MAX = 0xFFFFFFFF // Max
119 * @enum MediaPropertyType
121 * Defines the various property types of the media.
125 enum MediaPropertyType
127 MEDIA_PROPERTY_VIDEO_WIDTH = 0x0001, /**< The video width (int) */
128 MEDIA_PROPERTY_VIDEO_HEIGHT, /**< The video height (int) */
129 MEDIA_PROPERTY_VIDEO_FRAME_RATE, /**< The video frame rate (float or int) */
130 MEDIA_PROPERTY_VIDEO_PIXEL_FORMAT, /**< The video pixel format (::MediaPixelFormat) */
131 MEDIA_PROPERTY_VIDEO_BIT_RATE, /**< The video bit rate (int) */
133 MEDIA_PROPERTY_VIDEO_QUANTIZATION_PARAMETER = 0x0100, /**< The video quantization level (int) */
134 MEDIA_PROPERTY_VIDEO_QUANTIZATION_MIN, /**< The minimum quantization level (int) */
135 MEDIA_PROPERTY_VIDEO_QUANTIZATION_MAX, /**< The maximum quantization level (int) */
136 MEDIA_PROPERTY_VIDEO_GOP_SIZE, /**< The video Group of Picture (GOP) size (int) */
137 MEDIA_PROPERTY_VIDEO_PROFILE, /**< The video profile (int) */
138 MEDIA_PROPERTY_VIDEO_GOB_SIZE, /**< The video Group of Block (GOB) size (int) */
139 MEDIA_PROPERTY_VIDEO_PACKET_SIZE, /**< The video packet size in byte (int) */
140 MEDIA_PROPERTY_VIDEO_SLICE_SIZE_MODE, /**< The slice mode (::VideoSliceMode) */
141 MEDIA_PROPERTY_VIDEO_SLICE_SIZE_IN_BYTE, /**< The size of a video slice in bytes (int) */
142 MEDIA_PROPERTY_VIDEO_SLICE_SIZE_IN_MACROBLOCK, /**< The number of macroblocks in a slice (int) */
143 MEDIA_PROPERTY_VIDEO_REFERENCE_PICTURE_COUNT, /**< The count of reference picture (int) */
145 MEDIA_PROPERTY_VIDEO_USE_FRAME_SKIP = 0x0200, /**< The media property type that uses the frame skip algorithm (int) */
146 MEDIA_PROPERTY_VIDEO_USE_DEBLOCKING_FILTER, /**< The media property type that uses the deblocking filter (int) @n
147 It enables or disables the deblocking filter. */
148 MEDIA_PROPERTY_VIDEO_USE_AC_PREDICTION, /**< The media property type that uses the AC prediction mode (int) */
149 MEDIA_PROPERTY_VIDEO_USE_HEADER_EXTENSION_CODE, /**< The media property type that uses the header extension code mode (int) */
151 MEDIA_PROPERTY_VIDEO_FORCE_SKIP_FRAME = 0x0300, /**< The media property type that skips the encoding or decoding of the current frame (int) by force */
152 MEDIA_PROPERTY_VIDEO_FORCE_INTRA_CODING, /**< The media property type that uses the intra coding for the current frame (int) by force */
154 MEDIA_PROPERTY_VIDEO_H264_USE_ANNEX_B = 0x0400, /**< The media property type that uses H.264 Annex B for output bitstream format (int) */
157 MEDIA_PROPERTY_AUDIO_SAMPLE_RATE = 0x1000, /**< The audio sample rate (int) */
158 MEDIA_PROPERTY_AUDIO_BIT_RATE, /**< The audio bit rate (int) */
159 MEDIA_PROPERTY_AUDIO_CHANNEL_TYPE, /**< The audio channel type (::AudioChannelType) */
160 MEDIA_PROPERTY_AUDIO_SAMPLE_TYPE, /**< The audio sample type (::AudioSampleType) */
165 * @enum VideoSliceMode
167 * Defines the slice mode of the video data.
173 VIDEO_SLICE_MODE_NONE = 0x00, /**< The no slicing mode */
174 VIDEO_SLICE_MODE_FIXED_MACROBLOCK, /**< The slicing of a video by a fixed number of macroblocks */
175 VIDEO_SLICE_MODE_FIXED_BYTE, /**< The slicing of a video by a fixed number of bytes */
179 * @enum H263ProfileType
181 * Defines the profile types of the H.263 video codec.
187 H263_PROFILE_BASELINE = 0x00, /**< The baseline profile */
188 H263_PROFILE_VERSION_2 = 0x03, /**< The version 2 interactive and streaming wireless profile */
192 * @enum VideoPlaneType
194 * Defines the types of the video plane.
200 VIDEO_PLANE_TYPE_NONE = 0, /**< The no video plane */
201 VIDEO_PLANE_TYPE_Y, /**< The Y video plane */
202 VIDEO_PLANE_TYPE_U, /**< The U video plane */
203 VIDEO_PLANE_TYPE_V, /**< The V video plane */
204 VIDEO_PLANE_TYPE_UV, /**< The UV video plane */
205 VIDEO_PLANE_TYPE_YUV, /**< The YUV video plane */