CVSROOT: /sources/gnash Module name: gnash Changes by: Bastiaan Jacques <bjacques> 08/01/22 20:03:28
Modified files: . : ChangeLog server/asobj : NetStreamGst.cpp Log message: Better error handling for play(). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5469&r2=1.5470 http://cvs.savannah.gnu.org/viewcvs/gnash/server/asobj/NetStreamGst.cpp?cvsroot=gnash&r1=1.72&r2=1.73 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.5469 retrieving revision 1.5470 diff -u -b -r1.5469 -r1.5470 --- ChangeLog 22 Jan 2008 17:05:10 -0000 1.5469 +++ ChangeLog 22 Jan 2008 20:03:28 -0000 1.5470 @@ -1,3 +1,7 @@ +2008-01-22 Bastiaan Jacques <[EMAIL PROTECTED]> + + * server/asobj/NetStreamGst.cpp: Better error handling for play(). + 2008-01-22 Sandro Santilli <[EMAIL PROTECTED]> * testsuite/samples/Makefile.am: drop extraneous block of code, most Index: server/asobj/NetStreamGst.cpp =================================================================== RCS file: /sources/gnash/gnash/server/asobj/NetStreamGst.cpp,v retrieving revision 1.72 retrieving revision 1.73 diff -u -b -r1.72 -r1.73 --- server/asobj/NetStreamGst.cpp 22 Jan 2008 16:45:04 -0000 1.72 +++ server/asobj/NetStreamGst.cpp 22 Jan 2008 20:03:28 -0000 1.73 @@ -198,7 +198,8 @@ log_msg("%s: connecting to %s\n", __FUNCTION__, valid_url); #endif if (valid_url.empty()) { - // error; TODO: nofiy user + log_error(_("%s: The provided URL could not be resolved (url: %s)"), + __FUNCTION__, valid_url.c_str()); return; } @@ -213,11 +214,31 @@ _downloader = gst_element_make_from_uri(GST_URI_SRC, valid_url.c_str(), "gnash_uridownloader"); + if (!_downloader) { + log_error(_("%s: No URI handler was found for the provided URL. NetStream " + "playback will not be possible! (url: %s). Please make sure you " + " have a URL handling gstreamer plugin, such as gnomevfssrc, " + "neonhttpsrc or souphttpsrc."), __FUNCTION__, + valid_url.c_str()); + return; + } bool success = gst_bin_add(GST_BIN(_pipeline), _downloader); - assert(success); + if (!success) { + log_error(_("gst_bin_add failed. Aborting NetStream.play().")); + gst_object_unref(GST_OBJECT(_downloader)); + _downloader = NULL; + return; + } + + success = gst_element_link(_downloader, _dataqueue); + if (!success) { + log_error(_("gst_element_link failed. Aborting NetStream.play().")); + gst_object_unref(GST_OBJECT(_downloader)); + _downloader = NULL; + return; + } - gst_element_link(_downloader, _dataqueue); // Pause the pipeline. This will give decodebin a chance to detect streams. @@ -589,7 +610,7 @@ return; } - log_msg("%s: linking %s stream.", structure_name, __FUNCTION__); + log_msg("%s: linking %s stream.", __FUNCTION__, structure_name); gst_caps_unref (caps); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit