TizenRT Public API  v2.0 M2
MediaTypes.h
Go to the documentation of this file.
1 /* ****************************************************************
2  *
3  * Copyright 2018 Samsung Electronics All Rights Reserved.
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 
29 #ifndef __MEDIA_TYPES_H
30 #define __MEDIA_TYPES_H
31 
32 #include <tinyalsa/tinyalsa.h>
33 
34 #define AAC_HEADER_LENGTH 7
35 #define MP3_HEADER_LENGTH 4
36 #define WAVE_HEADER_LENGTH 44
37 
38 #define AUDIO_EXT_TYPE_AAC "aac"
39 #define AUDIO_EXT_TYPE_FLAC "flac"
40 #define AUDIO_EXT_TYPE_NULL ""
41 #define AUDIO_EXT_TYPE_MP3 "mp3"
42 #define AUDIO_EXT_TYPE_MP4 "mp4"
43 #define AUDIO_EXT_TYPE_OPUS "opus"
44 #define AUDIO_EXT_TYPE_PCM "pcm"
45 #define AUDIO_EXT_TYPE_RAW "raw"
46 #define AUDIO_EXT_TYPE_WAV "wav"
47 
48 namespace media {
49 
55 typedef enum audio_sample_rate_e {
82 
84 
90 typedef enum audio_type_e {
107 } audio_type_t;
108 
115 typedef enum audio_format_type_e {
116  /* Signed 8 bit */
117  AUDIO_FORMAT_TYPE_S8 = PCM_FORMAT_S8,
118  /* Signed 16 bit use this as a default */
119  AUDIO_FORMAT_TYPE_S16_LE = PCM_FORMAT_S16_LE,
120  /* Signed 32 bit */
121  AUDIO_FORMAT_TYPE_S32_LE = PCM_FORMAT_S32_LE
122 } audio_format_type_t;
123 
124 } // namespace media
125 
126 #endif
127  // end of MEDIA group
enum media::audio_sample_rate_e audio_sample_rate_t
Audio sample rate.
audio_sample_rate_e
Audio sample rate.
Definition: MediaTypes.h:55
All macros, structures and functions that make up the PCM interface.
enum media::audio_type_e audio_type_t
Audio type.
audio_type_e
Audio type.
Definition: MediaTypes.h:90