[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10568: Add video codec information
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10568: Add video codec information to gst when codec construction fails. Include |
Date: |
Wed, 11 Feb 2009 14:09:14 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10568
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-02-11 14:09:14 +0100
message:
Add video codec information to gst when codec construction fails. Include
warning about gstreamer-ffmpeg when the codec is FLV or h264.
modified:
libmedia/gst/VideoDecoderGst.cpp
=== modified file 'libmedia/gst/VideoDecoderGst.cpp'
--- a/libmedia/gst/VideoDecoderGst.cpp 2008-11-28 08:23:30 +0000
+++ b/libmedia/gst/VideoDecoderGst.cpp 2009-02-11 13:09:14 +0000
@@ -118,22 +118,36 @@
VideoDecoderGst::setup(GstCaps* srccaps)
{
if (!srccaps) {
- throw MediaException(_("VideoDecoderGst: internal error (caps creation
failed)"));
+ throw MediaException(_("VideoDecoderGst: internal error "
+ "(caps creation failed)"));
}
bool success = GstUtil::check_missing_plugins(srccaps);
if (!success) {
- throw MediaException(_("Couldn't find a plugin for video type ..."));
+ std::string type(gst_caps_to_string(srccaps));
+ type = type.substr(0, type.find(','));
+ std::string msg = (boost::format(_("Couldn't find a plugin for "
+ "video type %s!")) % type).str();
+
+ if (type == "video/x-flash-video" || type == "video/x-h264") {
+ msg += _(" Please make sure you have gstreamer-ffmpeg installed.");
+ }
+
+ throw MediaException(msg);
}
- GstCaps* sinkcaps = gst_caps_new_simple ("video/x-raw-rgb", "bpp",
G_TYPE_INT, 24,
- "depth", G_TYPE_INT, 24,
- NULL);
+ GstCaps* sinkcaps = gst_caps_new_simple("video/x-raw-rgb", "bpp",
+ G_TYPE_INT, 24,
+ "depth", G_TYPE_INT, 24,
+ NULL);
+
if (!sinkcaps) {
- throw MediaException(_("VideoDecoderGst: internal error (caps creation
failed)"));
+ throw MediaException(_("VideoDecoderGst: internal error "
+ "(caps creation failed)"));
}
- bool rv = swfdec_gst_decoder_init (&_decoder, srccaps, sinkcaps,
"ffmpegcolorspace", NULL);
+ bool rv = swfdec_gst_decoder_init (&_decoder, srccaps, sinkcaps,
+ "ffmpegcolorspace", NULL);
if (!rv) {
throw MediaException(_("VideoDecoderGst: initialisation failed."));
}
- [Gnash-commit] /srv/bzr/gnash/trunk r10568: Add video codec information to gst when codec construction fails. Include,
Benjamin Wolsey <=