[rygel] engine-gst: Print warning on missing profile



commit 4fa0abc099175b11379daa4393fb88b0beaf6cc4
Author: Jens Georg <jensg openismus com>
Date:   Tue Dec 18 22:15:57 2012 +0100

    engine-gst: Print warning on missing profile

 .../gstreamer/rygel-gst-transcoder.vala            |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/media-engines/gstreamer/rygel-gst-transcoder.vala b/src/media-engines/gstreamer/rygel-gst-transcoder.vala
index b884c72..a201580 100644
--- a/src/media-engines/gstreamer/rygel-gst-transcoder.vala
+++ b/src/media-engines/gstreamer/rygel-gst-transcoder.vala
@@ -27,6 +27,10 @@ using Gst;
 using Gst.PbUtils;
 using GUPnP;
 
+public errordomain Rygel.GstTranscoderError {
+    CANT_TRANSCODE
+}
+
 /**
  * The base Transcoder class. Each implementation derives from it and must
  * implement get_distance and get_encoding_profile methods.
@@ -75,6 +79,13 @@ internal abstract class Rygel.GstTranscoder : Rygel.Transcoder {
                                                 ENCODE_BIN);
 
         encoder.profile = this.get_encoding_profile ();
+        if (encoder.profile == null) {
+            var message = _("Could not create a transcoder configuration. " +
+                            "Your GStramer installation might be missing a plug-in");
+
+            throw new GstTranscoderError.CANT_TRANSCODE (message);
+        }
+
         debug ("%s using the following encoding profile:",
                this.get_class ().get_type ().name ());
         GstUtils.dump_encoding_profile (encoder.profile);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]