summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tpm@src.gnome.org>2007-10-06 14:57:27 +0000
committerTim-Philipp Müller <tpm@src.gnome.org>2007-10-06 14:57:27 +0000
commit28dfdfffb74dddc49d3c32c93f834f8a648c9c73 (patch)
treed54373235ca6f1c611088295c445579c08bdb121
parent7d455dc67b65510427f2767d41be3d1c6417b687 (diff)
downloadtotem-28dfdfffb74dddc49d3c32c93f834f8a648c9c73.tar.gz
Allow taking screenshots of the visualisation if there is one (Closes:
* src/backend/bacon-video-widget-gst-0.10.c: Allow taking screenshots of the visualisation if there is one (Closes: #476855). svn path=/branches/gnome-2-20/; revision=4754
-rw-r--r--ChangeLog6
-rw-r--r--src/backend/bacon-video-widget-gst-0.10.c12
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index c7175c611..18f5fa6a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);