change file permission to 644
[platform/core/multimedia/libmm-player.git] / src / include / mm_player_tracks.h
1 /*
2  * libmm-player
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JongHyuk Choi <jhchoi.choi@samsung.com>, YeJin Cho <cho.yejin@samsung.com>,
7  * YoungHwan An <younghwan_.an@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22
23 #ifndef __MM_PLAYER_TRACKS_H__
24 #define __MM_PLAYER_TRACKS_H__
25
26 #include "mm_player_priv.h"
27
28 #ifdef __cplusplus
29         extern "C" {
30 #endif
31
32 #define DEFAULT_TRACK 0
33 #ifdef _MULTI_TRACK
34 typedef bool (*_mmplayer_track_selected_subtitle_language_cb)(int track_num, void *user_data);
35 #endif
36 void _mmplayer_track_initialize(mm_player_t *player);
37
38 void _mmplayer_track_destroy(mm_player_t *player);
39
40 void _mmplayer_track_update_info(mm_player_t *player, MMPlayerTrackType type, GstPad *sinkpad);
41
42 int _mmplayer_get_track_count(MMHandleType hplayer,  MMPlayerTrackType type, int *count);
43
44 int _mmplayer_select_track(MMHandleType hplayer, MMPlayerTrackType type, int index);
45 #ifdef _MULTI_TRACK
46 int _mmplayer_track_add_subtitle_language(MMHandleType hplayer, int index);
47
48 int _mmplayer_track_remove_subtitle_language(MMHandleType hplayer, int index);
49 #endif
50 int _mmplayer_get_track_language_code(MMHandleType hplayer, MMPlayerTrackType type, int index, char **code);
51
52 int _mmplayer_get_current_track(MMHandleType hplayer, MMPlayerTrackType type, int *index);
53 #ifdef _MULTI_TRACK
54 int _mmplayer_track_foreach_selected_subtitle_language(MMHandleType hplayer,_mmplayer_track_selected_subtitle_language_cb callback, void *user_data);
55 #endif
56 #ifdef __cplusplus
57         }
58 #endif
59
60 #endif /* __MM_PLAYER_TRACKS_H__ */