summaryrefslogtreecommitdiff
path: root/src/modules/emotion/gstreamer/emotion_gstreamer.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-18 19:59:41 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-07-18 20:00:22 +0900
commitf9f0b717e641b651c18109d56968ae97dd37e73a (patch)
treeef3d7435d3b926902af32f2b0491ed207f288d1d /src/modules/emotion/gstreamer/emotion_gstreamer.c
parent525c4cbecebb25f7b939c3a7e47957042862c4ee (diff)
emotion - fix shutdown to ensure all pending async calls are gone too.
Diffstat (limited to 'src/modules/emotion/gstreamer/emotion_gstreamer.c')
-rw-r--r--src/modules/emotion/gstreamer/emotion_gstreamer.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/modules/emotion/gstreamer/emotion_gstreamer.c b/src/modules/emotion/gstreamer/emotion_gstreamer.c
index 9fe654311b..f678bf06f9 100644
--- a/src/modules/emotion/gstreamer/emotion_gstreamer.c
+++ b/src/modules/emotion/gstreamer/emotion_gstreamer.c
@@ -1220,7 +1220,7 @@ gstreamer_module_init(void)
1220 1220
1221 if (_emotion_init_count > 0) 1221 if (_emotion_init_count > 0)
1222 { 1222 {
1223 _emotion_init_count++; 1223 _emotion_pending_ecore_begin();
1224 return EINA_TRUE; 1224 return EINA_TRUE;
1225 } 1225 }
1226 1226
@@ -1525,6 +1525,7 @@ _main_frame_resize(void *data)
1525 1525
1526 ratio = (double)ev->src_width / (double)ev->src_height; 1526 ratio = (double)ev->src_width / (double)ev->src_height;
1527 _emotion_frame_resize(ev->obj, ev->src_width, ev->src_height, ratio); 1527 _emotion_frame_resize(ev->obj, ev->src_width, ev->src_height, ratio);
1528 _emotion_pending_ecore_end();
1528} 1529}
1529 1530
1530static void 1531static void
@@ -1539,6 +1540,7 @@ _no_more_pads(GstElement *decodebin, gpointer data)
1539 { 1540 {
1540 if(_video_size_get(GST_ELEMENT(elem), &ev->src_width, &ev->src_height)) 1541 if(_video_size_get(GST_ELEMENT(elem), &ev->src_width, &ev->src_height))
1541 { 1542 {
1543 _emotion_pending_ecore_begin();
1542 ecore_main_loop_thread_safe_call_async(_main_frame_resize, ev); 1544 ecore_main_loop_thread_safe_call_async(_main_frame_resize, ev);
1543 gst_object_unref(elem); 1545 gst_object_unref(elem);
1544 break; 1546 break;
@@ -1622,6 +1624,7 @@ _eos_main_fct(void *data)
1622 } 1624 }
1623 1625
1624 emotion_gstreamer_message_free(send); 1626 emotion_gstreamer_message_free(send);
1627 _emotion_pending_ecore_end();
1625} 1628}
1626 1629
1627static GstBusSyncReply 1630static GstBusSyncReply
@@ -1642,7 +1645,11 @@ _eos_sync_fct(GstBus *bus EINA_UNUSED, GstMessage *msg, gpointer data)
1642 GST_MESSAGE_TYPE_NAME(msg)); 1645 GST_MESSAGE_TYPE_NAME(msg));
1643 send = emotion_gstreamer_message_alloc(ev, msg); 1646 send = emotion_gstreamer_message_alloc(ev, msg);
1644 1647
1645 if (send) ecore_main_loop_thread_safe_call_async(_eos_main_fct, send); 1648 if (send)
1649 {
1650 _emotion_pending_ecore_begin();
1651 ecore_main_loop_thread_safe_call_async(_eos_main_fct, send);
1652 }
1646 1653
1647 break; 1654 break;
1648 1655
@@ -1660,7 +1667,11 @@ _eos_sync_fct(GstBus *bus EINA_UNUSED, GstMessage *msg, gpointer data)
1660 { 1667 {
1661 send = emotion_gstreamer_message_alloc(ev, msg); 1668 send = emotion_gstreamer_message_alloc(ev, msg);
1662 1669
1663 if (send) ecore_main_loop_thread_safe_call_async(_eos_main_fct, send); 1670 if (send)
1671 {
1672 _emotion_pending_ecore_begin();
1673 ecore_main_loop_thread_safe_call_async(_eos_main_fct, send);
1674 }
1664 } 1675 }
1665 break; 1676 break;
1666 } 1677 }
@@ -1679,7 +1690,11 @@ _eos_sync_fct(GstBus *bus EINA_UNUSED, GstMessage *msg, gpointer data)
1679 { 1690 {
1680 send = emotion_gstreamer_message_alloc(ev, msg); 1691 send = emotion_gstreamer_message_alloc(ev, msg);
1681 1692
1682 if (send) ecore_main_loop_thread_safe_call_async(_eos_main_fct, send); 1693 if (send)
1694 {
1695 _emotion_pending_ecore_begin();
1696 ecore_main_loop_thread_safe_call_async(_eos_main_fct, send);
1697 }
1683 } 1698 }
1684 break; 1699 break;
1685 } 1700 }