GNOME Bugzilla – Bug 752758
validate: descriptor-writer: Print proper error message when discover fails
Last modified: 2015-08-16 13:39:37 UTC
When discovering the files, there will be different kind of errors. If we print the exact message, then it will be more helpful for user. Especially in the case of missing plugins, displaying which plugin is missing as error message
Created attachment 307963 [details] [review] print proper error message when discovering fails
Created attachment 307970 [details] [review] handle error when stream info is not present When stream info is not present in the discoverer, then it asserts as below gst_discoverer_stream_info_get_stream_id: assertion 'GST_IS_DISCOVERER_STREAM_INFO (info)' failed Added proper Error check for the same and added it to Validate report as warnings.
Review of attachment 307963 [details] [review]: ::: validate/gst/validate/media-descriptor-writer.c @@ -534,1 +531,2 @@ goto out; + } else { Why would the first condition not be met? @@ -535,0 +532,21 @@ + } else { + GstDiscovererResult result = gst_discoverer_info_get_result (info); + switch (result) { ... 18 more ... Than one is indeed pretty usefull :)
Review of attachment 307970 [details] [review]: How would that happen? If there is no stream info it means the discovering failed no?
In case of (In reply to Thibault Saunier from comment #4) > Review of attachment 307963 [details] [review] [review]: > > ::: validate/gst/validate/media-descriptor-writer.c > @@ -534,1 +531,2 @@ > goto out; > + } else { > > Why would the first condition not be met? > > @@ -535,0 +532,21 @@ > + } else { > + GstDiscovererResult result = gst_discoverer_info_get_result (info); > + switch (result) { > ... 18 more ... > > Than one is indeed pretty usefull :) For some files, i don't have plugins installed. So it will throw GST_DISCOVERER_MISSING_PLUGINS. But in this case, info is not NULL and gst_discoverer_discover_uri doesn't throw any error. Only on result = gst_discoverer_info_get_result (info), i get an error. So i checked how gst-discoverer is handling this and added the code here. (In reply to Thibault Saunier from comment #5) > Review of attachment 307970 [details] [review] [review]: > > How would that happen? If there is no stream info it means the discovering > failed no? It was able to get the discoverer info and was not failing with any error. But there was no stream info and since there was no check, it was throwing an assertion error.
(In reply to Thibault Saunier from comment #5) > Review of attachment 307970 [details] [review] [review]: > > How would that happen? If there is no stream info it means the discovering > failed no? It was basically some file named as .h264.. It was able to discover the file and its info including duration as 0. But not able to get the stream.. I guess the changes should be made such that even media_info is not created for this.. I think these changes are ok. But the check should be done even before creating the writer instance.. what do you think?
Review of attachment 307963 [details] [review]: OK
Review of attachment 307970 [details] [review]: OK then
Comment on attachment 307963 [details] [review] print proper error message when discovering fails commit 97e630efbaa0587fbd3343375718e6d89100e2b3 Author: Vineeth TM <vineeth.tm@samsung.com> Date: Thu Jul 23 15:08:55 2015 +0900 validate: descriptor-writer: Print proper error message when discover fails When discovering the files, there will be different kind of errors. If we print the exact message, then it will be more helpful for user. Especially in the case of missing plugins, displaying which plugin is missing as error message https://bugzilla.gnome.org/show_bug.cgi?id=752758
Comment on attachment 307970 [details] [review] handle error when stream info is not present commit 82ffd9c53e57a41deee5b9c220e7c1b216b7b34a Author: Vineeth TM <vineeth.tm@samsung.com> Date: Thu Jul 23 15:51:09 2015 +0900 validate: descriptor-writer: Handle error when stream info is not available There is no check to see if stream info is available. This leads to assertion error. Adding proper error messages for the same and reported the same as a validate warning message. https://bugzilla.gnome.org/show_bug.cgi?id=752758