2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_SOUNDPOOL_INTERNAL_STREAMCBMANAGER_H__
18 #define __TIZEN_SOUNDPOOL_INTERNAL_STREAMCBMANAGER_H__
20 #include "internal/stream.h"
32 * @brief Stream Callback Manager type.
36 struct stream_cb_manager_s {
38 GAsyncQueue *isolator_callback_queue;
40 pthread_t isolator_thread;
41 pthread_mutex_t isolator_data_mutex;
42 pthread_cond_t isolator_data_cond;
43 gboolean isolator_state_changed;
44 gboolean isolator_loop_run;
47 typedef struct stream_cb_manager_event_data_s {
48 sound_stream_t *stream;
49 sound_pool_stream_state_e state;
50 sound_pool_stream_state_e state_previous;
51 } stream_cb_manager_event_data_t;
53 sound_pool_error_e _stream_cb_manager_create(sound_pool_t *pool, stream_cb_manager_t **cbmgr);
55 sound_pool_error_e _stream_cb_manager_destroy(stream_cb_manager_t *cbmgr);
57 sound_pool_error_e _stream_cb_manager_register_event(stream_cb_manager_t *cbmgr,
58 sound_stream_t *stream);
62 #endif /* __cplusplus */
64 #endif /* __TIZEN_SOUNDPOOL_INTERNAL_STREAMCBMANAGER_H__ */