After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 753079 - validate: Should not store stream-id in media-info for local files
validate: Should not store stream-id in media-info for local files
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Linux
: Normal normal
: 1.5.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-30 21:04 UTC by Nicolas Dufresne (ndufresne)
Modified: 2015-08-16 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
stream IDs should not be compared. (3.83 KB, patch)
2015-07-31 01:05 UTC, Vineeth
rejected Details | Review
validate: media-descriptor: Workaround file:// stream-id changing (3.33 KB, patch)
2015-07-31 22:38 UTC, Nicolas Dufresne (ndufresne)
committed Details | Review

Description Nicolas Dufresne (ndufresne) 2015-07-30 21:04:05 UTC
At least for local files, we should not store (or at least ignore) stream-id in the media-info. As validate install path will vary, the stream ID (generated using the media URI) will vary from what is recorded unless your username is "thiblahute" or who last update the media info file.
Comment 1 Vineeth 2015-07-31 01:05:34 UTC
Created attachment 308503 [details] [review]
stream IDs should not be compared.

The changes made are
First compare stream IDs
If different
   Check if it is local file and continue
   else return -1

If same
   Compare caps
      If same continue
      Else return 0 and continue checking for the next stream.

Compare tags
return 1



Previously it was written such that, if stream IDs are equal, then we are expecting the caps also to be equal, and hence throwing error if not.
But now that is not needed. Hence continuing to the next stream.


please review
Comment 2 Nicolas Dufresne (ndufresne) 2015-07-31 13:21:59 UTC
Review of attachment 308503 [details] [review]:

This is incorrect solution.

::: validate/gst/validate/media-descriptor.c
@@ +297,3 @@
+    else
+      return -1;
+  }

This changes the test completly. What it was doing is checking that for the same stream ID we have the same caps, which, for any URI is valid.

@@ +301,2 @@
+  if (!gst_caps_is_equal (rstream->caps, cstream->caps))
+    return 0;

And now you check it but don't set the error/warning message anymore.
Comment 3 Nicolas Dufresne (ndufresne) 2015-07-31 13:25:01 UTC
I've been thinking a bit about that. A special case in stream ID comparison could be made. If we look at the structure of a filesrc base ID we get:

<file-path-hash>/<stream-specific-id>

What we could do is that if we have a file:// URI, we could skip to / (if it exist), in order to make the comparision. This way we can still check and warn if for two matching stream ID we don't have the expected caps.
Comment 4 Nicolas Dufresne (ndufresne) 2015-07-31 22:38:13 UTC
Created attachment 308586 [details] [review]
validate: media-descriptor: Workaround file:// stream-id changing

file:// base stream-id will vary depending on the file path. As we
don't expect everyone to use the same absolute path to place the
validate testsuite, the resulting stream-id changes. Because of that,
we can't match the stream-id in the recorded file, hence cannot do
further check. We work around this by doing what filesink would do,
which is compute a SHA256 of the URI which we can use to first
validate the ID is prefixed like expected, and decide if we should
consider the stream IDs the same or not.
Comment 5 Nicolas Dufresne (ndufresne) 2015-07-31 22:39:30 UTC
Attachment 308586 [details] pushed as 6993666 - validate: media-descriptor: Workaround file:// stream-id changing