diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/backend/bacon-video-widget-gst-0.10.c | 12 |
2 files changed, 14 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2007-10-06 Tim-Philipp Müller <tim at centricular dot net> + + * src/backend/bacon-video-widget-gst-0.10.c: + Allow taking screenshots of the visualisation if there is one + (Closes: #476855). + 2007-10-04 Bastien Nocera <hadess@hadess.net> * src/totem-fullscreen.c: (totem_fullscreen_get_volume_popup), diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c index a3abeddbb..840fd9356 100644 --- a/src/backend/bacon-video-widget-gst-0.10.c +++ b/src/backend/bacon-video-widget-gst-0.10.c @@ -4425,12 +4425,13 @@ bacon_video_widget_can_get_frames (BaconVideoWidget * bvw, GError ** error) } /* check for video */ - if (!bvw->priv->media_has_video) { + if (!bvw->priv->media_has_video && !bvw->priv->show_vfx) { g_set_error (error, BVW_ERROR, BVW_ERROR_GENERIC, _("Media contains no supported video streams.")); + return FALSE; } - return bvw->priv->media_has_video; + return TRUE; } static void @@ -4487,8 +4488,6 @@ bacon_video_widget_get_current_frame (BaconVideoWidget * bvw) /* Note: we don't ask for a specific width/height here, so that * videoscale can adjust dimensions from a non-1/1 pixel aspect * ratio to a 1/1 pixel-aspect-ratio */ - "framerate", GST_TYPE_FRACTION, - bvw->priv->video_fps_n, bvw->priv->video_fps_d, "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, "endianness", G_TYPE_INT, G_BIG_ENDIAN, "red_mask", G_TYPE_INT, 0xff0000, @@ -4496,6 +4495,11 @@ bacon_video_widget_get_current_frame (BaconVideoWidget * bvw) "blue_mask", G_TYPE_INT, 0x0000ff, NULL); + if (bvw->priv->video_fps_n > 0 && bvw->priv->video_fps_d > 0) { + gst_caps_set_simple (to_caps, "framerate", GST_TYPE_FRACTION, + bvw->priv->video_fps_n, bvw->priv->video_fps_d, NULL); + } + GST_DEBUG ("frame caps: %" GST_PTR_FORMAT, GST_BUFFER_CAPS (buf)); GST_DEBUG ("pixbuf caps: %" GST_PTR_FORMAT, to_caps); |