From: Jens Georg Date: Tue, 18 Dec 2012 21:15:57 +0000 (+0100) Subject: engine-gst: Print warning on missing profile X-Git-Tag: RYGEL_0_17_6~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fa0abc099175b11379daa4393fb88b0beaf6cc4;p=profile%2Fivi%2Frygel.git engine-gst: Print warning on missing profile --- 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);