Enlightenment CVS committal Author : doursse Project : e17 Module : libs/emotion
Dir : e17/libs/emotion/src/modules Modified Files: emotion_gstreamer.c Log Message: add track count in the metadata and fix a bit the _close function. It needs more cara, though =================================================================== RCS file: /cvs/e/e17/libs/emotion/src/modules/emotion_gstreamer.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- emotion_gstreamer.c 6 May 2006 13:17:50 -0000 1.11 +++ emotion_gstreamer.c 14 May 2006 14:32:45 -0000 1.12 @@ -476,6 +476,7 @@ Emotion_Gstreamer_Video *ev; GstIterator *iter; gpointer data; + gboolean done; ev = (Emotion_Gstreamer_Video *)video; if (!ev) @@ -487,17 +488,42 @@ printf(" ... unpause\n"); _emotion_pipeline_pause (ev->pipeline); } + printf("EX stop\n"); - if (ev->pipeline) - gst_element_set_state (ev->pipeline, GST_STATE_READY); + gst_element_set_state (ev->pipeline, GST_STATE_READY); /* we remove all the elements in the pipeline */ iter = gst_bin_iterate_elements (GST_BIN (ev->pipeline)); - while (gst_iterator_next (iter, &data) == GST_ITERATOR_OK) { - GstElement *element; + done = FALSE; + while (!done) { + switch (gst_iterator_next (iter, &data)) { + case GST_ITERATOR_OK: { + GstElement *element; + + element = GST_ELEMENT (data); + if (element) { + gst_bin_remove (GST_BIN (ev->pipeline), element); + } + break; + } + case GST_ITERATOR_RESYNC: { + GstElement *element; - element = GST_ELEMENT (data); - gst_bin_remove (GST_BIN (ev->pipeline), element); + element = GST_ELEMENT (data); + if (element) { + gst_bin_remove (GST_BIN (ev->pipeline), element); + } + gst_iterator_resync (iter); + break; + } + case GST_ITERATOR_ERROR: + printf("error iter\n"); + done = TRUE; + break; + case GST_ITERATOR_DONE: + done = TRUE; + break; + } } gst_iterator_free (iter); @@ -1225,6 +1251,19 @@ #endif if (str) done = TRUE; break; + case META_TRACK_COUNT: { + int track_count; + + track_count = _cdda_track_count_get (video); + if (track_count > 0) { + char buf[64]; + + g_snprintf (buf, 64, "%d", track_count); + str = g_strdup (buf); + done = TRUE; + } + break; + } } break; } @@ -1681,12 +1720,6 @@ if (!_emotion_pipeline_pause (ev->pipeline)) goto failure_gstreamer_pause; - - { - gint tracks_count; - tracks_count = _cdda_track_count_get(ev); - g_print ("Tracks count : %d\n", tracks_count); - } { GstQuery *query; ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs