gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog server/asobj/NetStreamGst.cpp


From: Bastiaan Jacques
Subject: [Gnash-commit] gnash ChangeLog server/asobj/NetStreamGst.cpp
Date: Sun, 03 Feb 2008 09:18:51 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Bastiaan Jacques <bjacques>     08/02/03 09:18:50

Modified files:
        .              : ChangeLog 
        server/asobj   : NetStreamGst.cpp 

Log message:
        Add some more error handling and verbosity.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5551&r2=1.5552
http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.76&r2=1.77

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5551
retrieving revision 1.5552
diff -u -b -r1.5551 -r1.5552
--- ChangeLog   2 Feb 2008 08:51:52 -0000       1.5551
+++ ChangeLog   3 Feb 2008 09:18:49 -0000       1.5552
@@ -1,3 +1,8 @@
+2008-02-03 Bastiaan Jacques <address@hidden>
+
+       * server/asobj/NetStreamGst.cpp: Add some more error handling and
+       verbosity.
+
 2008-02-02 Sandro Santilli <address@hidden>
 
        * testsuite/actionscript.all/TextField.as: success for the just-added

Index: server/asobj/NetStreamGst.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- server/asobj/NetStreamGst.cpp       30 Jan 2008 06:10:10 -0000      1.76
+++ server/asobj/NetStreamGst.cpp       3 Feb 2008 09:18:50 -0000       1.77
@@ -74,7 +74,21 @@
   g_signal_connect (decoder, "unknown-type", G_CALLBACK 
(NetStreamGst::decodebin_unknown_cb), this);   
 
   gst_bin_add_many (GST_BIN (_pipeline), _dataqueue, decoder, NULL);
-  gst_element_link(_dataqueue, decoder);
+
+  if (!_dataqueue || !decoder) {
+    log_error(_("Couldn't create the \"queue\" and/or \"decoder\" elements. "
+                "Please make sure Gstreamer and gstreamer-plugins-base are "
+                "correctly installed. NetStream playback halted."));
+    return;
+  }
+
+  bool rv = gst_element_link(_dataqueue, decoder);
+
+  if (!rv) {
+    log_error("Couldn't link \"queue\" and \"decoder\" elements. NetStream "
+              "playback halted.");
+    return;
+  }
 
   // Setup video conversion and sink
 
@@ -104,7 +118,18 @@
   // Create the video pipeline and link the elements. The pipeline will
   // dereference the elements when they are destroyed.
   gst_bin_add_many (GST_BIN (_videobin), colorspace, videoscale, videocaps, 
videosink, NULL);
-  gst_element_link_many(colorspace, videoscale, videocaps, videosink, NULL);   
+  
+  if (!colorspace || !videoscale || !videocaps || !videosink) {
+    log_error(_("Couldn't create the Gstreamer video conversion elements. "
+                "Please make sure Gstreamer and gstreamer-plugins-base are "
+                "correctly installed. Video playback will not be possible."));
+  }
+  
+  rv = gst_element_link_many(colorspace, videoscale, videocaps, videosink, 
NULL);
+  if (!rv) {
+    log_error(_("Failed to link video conversion elements. Video playback will"
+                " not be possible"));
+  }
 
   // Setup audio sink
   GstElement* audioconvert = gst_element_factory_make ("audioconvert", NULL);  
@@ -117,7 +142,15 @@
   }
 
   gst_bin_add_many(GST_BIN(_audiobin), audioconvert, audiosink, NULL);
-  gst_element_link(audioconvert, audiosink);
+
+  if (!audioconvert || !audiosink) {
+    log_error("Couldn't create Gstreamer audio elements. Audio playback will "
+              "not be possible");
+  }
+  rv = gst_element_link(audioconvert, audiosink);
+  if (!rv) {
+    log_error("Couldn't link audio elements. There will be no audio 
playback.");
+  }
 
   GstPad* target_audiopad = gst_element_get_static_pad (audioconvert, "sink");
   GstPad* target_videopad = gst_element_get_static_pad (colorspace, "sink");
@@ -127,6 +160,8 @@
   
   gst_object_unref(GST_OBJECT(target_videopad));
   gst_object_unref(GST_OBJECT(target_audiopad));
+
+
 }
 
 NetStreamGst::~NetStreamGst()
@@ -225,6 +260,13 @@
     return;  
   }
                                                          
+  GstElementFactory* urifactory = gst_element_get_factory(_downloader);
+  const gchar* urifactoryname = gst_element_factory_get_longname(urifactory);
+
+  log_debug(_("URI handler \"%s\" found for URI %s"), urifactoryname, 
+            valid_url.c_str());
+
+                                                         
   bool success = gst_bin_add(GST_BIN(_pipeline), _downloader);
   if (!success) {
     log_error(_("gst_bin_add failed. Aborting NetStream.play()."));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]