Add state change timeout on emulator 76/122076/1 accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_wearable accepted/tizen/common/20170404.142409 accepted/tizen/ivi/20170403.130040 accepted/tizen/mobile/20170403.125706 accepted/tizen/unified/20170403.130130 accepted/tizen/wearable/20170403.125924 submit/tizen/20170403.050513
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 30 Mar 2017 06:13:48 +0000 (15:13 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 30 Mar 2017 06:13:48 +0000 (15:13 +0900)
[Version] 0.2.23
[Profile] Mobile, Wearable

Change-Id: I734104878cad379cece98606c46fb61be9d3a430

packaging/libmm-radio.spec
src/mm_radio_priv_emulator.c

index e0a44fddf79ffdaeafc2bb9f035f3a41ea189fcb..615747fd1b21e97618ff4ce70f668529409d326d 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       libmm-radio
 Summary:    Multimedia Framework Radio Library
-Version:    0.2.22
+Version:    0.2.23
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 19d5c6b22324a422d82c515fbdfe5995d0262962..9debc9ae3353c19115e208fe014aabce001273bb 100644 (file)
@@ -76,7 +76,7 @@
 #define EMULATOR_FREQ_MAX              5
 #define RADIO_MIN_VOLUME               0.0
 #define RADIO_MAX_VOLUME               1.0
-
+#define RADIO_GST_STATE_CHANGE_TIMEOUT (10 * GST_SECOND)
 /*---------------------------------------------------------------------------
     LOCAL CONSTANT DEFINITIONS:
 ---------------------------------------------------------------------------*/
@@ -705,7 +705,7 @@ int _mmradio_start_pipeline(mm_radio_t * radio)
                return MM_ERROR_RADIO_INVALID_STATE;
        }
 
-       ret_state = gst_element_get_state(radio->pGstreamer_s->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+       ret_state = gst_element_get_state(radio->pGstreamer_s->pipeline, NULL, NULL, RADIO_GST_STATE_CHANGE_TIMEOUT);
        if (ret_state == GST_STATE_CHANGE_FAILURE) {
                MMRADIO_LOG_ERROR("GST_STATE_CHANGE_FAILURE");
                gst_object_unref(radio->pGstreamer_s->pipeline);
@@ -732,7 +732,7 @@ int _mmradio_stop_pipeline(mm_radio_t * radio)
                return MM_ERROR_RADIO_INVALID_STATE;
        }
 
-       ret_state = gst_element_get_state(radio->pGstreamer_s->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+       ret_state = gst_element_get_state(radio->pGstreamer_s->pipeline, NULL, NULL, RADIO_GST_STATE_CHANGE_TIMEOUT);
        if (ret_state == GST_STATE_CHANGE_FAILURE) {
                MMRADIO_LOG_DEBUG("GST_STATE_CHANGE_FAILURE");
                gst_object_unref(radio->pGstreamer_s->pipeline);
@@ -758,7 +758,7 @@ int _mmradio_destroy_pipeline(mm_radio_t * radio)
                return MM_ERROR_RADIO_INVALID_STATE;
        }
 
-       ret_state = gst_element_get_state(radio->pGstreamer_s->pipeline, NULL, NULL, GST_CLOCK_TIME_NONE);
+       ret_state = gst_element_get_state(radio->pGstreamer_s->pipeline, NULL, NULL, RADIO_GST_STATE_CHANGE_TIMEOUT);
        if (ret_state == GST_STATE_CHANGE_FAILURE) {
                MMRADIO_LOG_DEBUG("GST_STATE_CHANGE_FAILURE");
                gst_object_unref(radio->pGstreamer_s->pipeline);