{"action":"created","issue":{"url":"https://api.github.com/repos/drothlis/stb-tester/issues/247","labels_url":"https://api.github.com/repos/drothlis/stb-tester/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/drothlis/stb-tester/issues/247/comments","events_url":"https://api.github.com/repos/drothlis/stb-tester/issues/247/events","html_url":"https://github.com/drothlis/stb-tester/issues/247","id":53517878,"number":247,"title":"Unpredictable timeout if source pipeline restarts during wait_for_match","user":{"login":"szemate","id":3908828,"avatar_url":"https://avatars.githubusercontent.com/u/3908828?v=3","gravatar_id":"","url":"https://api.github.com/users/szemate","html_url":"https://github.com/szemate","followers_url":"https://api.github.com/users/szemate/followers","following_url":"https://api.github.com/users/szemate/following{/other_user}","gists_url":"https://api.github.com/users/szemate/gists{/gist_id}","starred_url":"https://api.github.com/users/szemate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szemate/subscriptions","organizations_url":"https://api.github.com/users/szemate/orgs","repos_url":"https://api.github.com/users/szemate/repos","events_url":"https://api.github.com/users/szemate/events{/privacy}","received_events_url":"https://api.github.com/users/szemate/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-06T14:09:32Z","updated_at":"2015-01-06T14:41:09Z","closed_at":null,"body":"Every time the source pipeline is rebuilt, timestamps of the video buffers restart counting from zero.\r\n\r\nIf the source pipeline restarts while `gst_samples` is running, the actual timeout value is getting unpredictable, as `gst_samples` times out if `timestamp - self.start_timestamp > timeout_secs`, and both `timestamp` and `self.start_timestamp` are reset to 0 while `timeout_secs` stays the same. (https://github.com/drothlis/stb-tester/blob/master/stbt/__init__.py#L1749)\r\n\r\nE.g. if we are running `wait_for_match('something.png', timeout_secs=20)` and the source pipeline restarts after 10 seconds, it raises `MatchTimeout` after ~30 seconds."},"comment":{"url":"https://api.github.com/repos/drothlis/stb-tester/issues/comments/68872904","html_url":"https://github.com/drothlis/stb-tester/issues/247#issuecomment-68872904","issue_url":"https://api.github.com/repos/drothlis/stb-tester/issues/247","id":68872904,"user":{"login":"wmanley","id":494659,"avatar_url":"https://avatars.githubusercontent.com/u/494659?v=3","gravatar_id":"","url":"https://api.github.com/users/wmanley","html_url":"https://github.com/wmanley","followers_url":"https://api.github.com/users/wmanley/followers","following_url":"https://api.github.com/users/wmanley/following{/other_user}","gists_url":"https://api.github.com/users/wmanley/gists{/gist_id}","starred_url":"https://api.github.com/users/wmanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmanley/subscriptions","organizations_url":"https://api.github.com/users/wmanley/orgs","repos_url":"https://api.github.com/users/wmanley/repos","events_url":"https://api.github.com/users/wmanley/events{/privacy}","received_events_url":"https://api.github.com/users/wmanley/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T14:41:09Z","updated_at":"2015-01-06T14:41:09Z","body":"We really shouldn't be using buffer timestamps directly in stbt.  Technically-speaking they're meaningless without a `GstSegment` to interpret them into running-time or stream-time.\r\n\r\nPerhaps we can start dealing with stream-time and manipulate GStreamer to set stream-time to wall-clock time when we create the pipeline in the first-place.  That way stream time would start being more meaningful than \"time since we started capturing video\".  I don't know what effect that would have on the sink-pipeline.  It would probably be fine."}}