4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Seungbae Shin <seungbae.shin@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 #ifndef __MM_SOUND_PLUGIN_CODEC_H__
23 #define __MM_SOUND_PLUGIN_CODEC_H__
25 #include "mm_sound_plugin.h"
26 #include <mm_source.h>
29 enum MMSoundSupportedCodec {
30 MM_SOUND_SUPPORTED_CODEC_INVALID = -1, /**< Invalid codec type */
31 MM_SOUND_SUPPORTED_CODEC_WAVE, /**< WAVE codec */
32 MM_SOUND_SUPPORTED_CODEC_DTMF, /**< DTMF codec */
33 MM_SOUND_SUPPORTED_CODEC_MP3, /**< MP3 codec */
34 MM_SOUND_SUPPORTED_CODEC_NUM, /**< Number of audio codec type */
44 } mmsound_codec_info_t;
58 } mmsound_codec_param_t;
61 int* (*GetSupportTypes)(void);
62 int (*SetThreadPool) (int (*)(void*, void (*)(void*)));
63 int (*Parse)(MMSourceType*, mmsound_codec_info_t*);
64 int (*Create)(mmsound_codec_param_t*, mmsound_codec_info_t*, MMHandleType*);
65 int (*Play_wav)(mmsound_codec_param_t *, mmsound_codec_info_t *, MMHandleType );
66 int (*Play)(MMHandleType);
67 int (*Stop)(MMHandleType);
68 int (*Destroy)(MMHandleType);
69 } mmsound_codec_interface_t;
71 /* Utility Functions */
72 #define CODEC_GET_INTERFACE_FUNC_NAME "MMSoundPlugCodecGetInterface"
73 #define MMSoundPlugCodecCastGetInterface(func) ((int (*)(mmsound_codec_interface_t*))(func))
75 int MMSoundPlugCodecGetInterface(mmsound_codec_interface_t *intf);
77 #endif /* __MM_SOUND_PLUGIN_CODEC_H__ */