playback fixes

This commit is contained in:
Matthew Allum 2005-05-17 10:12:10 +00:00
parent 55fdb9bc79
commit 956008e6c3
3 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2005-05-17 mallum,,, <mallum@openedhand.com>
* clutter/cltr-video.c: (cltr_video_get_pixbuf):
* gst/cltrimagesink.c: (gst_cltrimagesink_change_state),
(gst_cltrimagesink_chain):
Fix thread related segv's on grabbing video image.
Also pop any unplayed data from sink on stop
2005-05-16 mallum,,, <mallum@openedhand.com> 2005-05-16 mallum,,, <mallum@openedhand.com>
* clutter/cltr-animator.c: (cltr_animator_zoom_new), * clutter/cltr-animator.c: (cltr_animator_zoom_new),

View File

@ -715,7 +715,7 @@ cltr_video_get_pixbuf (CltrVideo *video)
{ {
Pixbuf *pixb = NULL; Pixbuf *pixb = NULL;
if (video->frame_texture) /* if (video->frame_texture) */
{ {
cltr_texture_lock(video->frame_texture); cltr_texture_lock(video->frame_texture);

View File

@ -254,23 +254,33 @@ gst_cltrimagesink_change_state (GstElement * element)
return GST_STATE_FAILURE; return GST_STATE_FAILURE;
} }
*/ */
DBG("GST_STATE_NULL_TO_READY");
break; break;
case GST_STATE_READY_TO_PAUSED: case GST_STATE_READY_TO_PAUSED:
DBG("GST_STATE_READY_TO_PAUSED");
cltrimagesink->time = 0; cltrimagesink->time = 0;
break; break;
case GST_STATE_PAUSED_TO_PLAYING: case GST_STATE_PAUSED_TO_PLAYING:
DBG("GST_STATE_PAUSED_TO_PLAYING");
break; break;
case GST_STATE_PLAYING_TO_PAUSED: case GST_STATE_PLAYING_TO_PAUSED:
DBG("GST_STATE_PLAYING_TO_PAUSED");
break; break;
case GST_STATE_PAUSED_TO_READY: case GST_STATE_PAUSED_TO_READY:
DBG("GST_STATE_PAUSED_TO_READY");
while (g_async_queue_try_pop (cltrimagesink->queue)) ;
cltrimagesink->framerate = 0; cltrimagesink->framerate = 0;
GST_VIDEOSINK_WIDTH (cltrimagesink) = 0; GST_VIDEOSINK_WIDTH (cltrimagesink) = 0;
GST_VIDEOSINK_HEIGHT (cltrimagesink) = 0; GST_VIDEOSINK_HEIGHT (cltrimagesink) = 0;
break; break;
case GST_STATE_READY_TO_NULL: case GST_STATE_READY_TO_NULL:
DBG("GST_STATE_READY_TO_NULL");
/*
if (cltrimagesink->texture) if (cltrimagesink->texture)
cltr_texture_unref(cltrimagesink->texture); cltr_texture_unref(cltrimagesink->texture);
*/
break; break;
} }
@ -320,7 +330,9 @@ gst_cltrimagesink_chain (GstPad * pad, GstData * data)
/* if we have one... */ /* if we have one... */
if (cltrimagesink->texture) if (cltrimagesink->texture
&& GST_VIDEOSINK_WIDTH (cltrimagesink)
&& GST_VIDEOSINK_HEIGHT (cltrimagesink))
{ {
/* need to copy the data into out pixbuf here */ /* need to copy the data into out pixbuf here */
Pixbuf *pixb = NULL; Pixbuf *pixb = NULL;