mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
validate:launcher: Do not use unset sent_eos variable
And rename class member to sent_eos_time as it is more accurate
This commit is contained in:
parent
9c9fe14293
commit
e376da4c17
1 changed files with 5 additions and 5 deletions
|
@ -541,7 +541,7 @@ class GstValidateTest(Test):
|
||||||
|
|
||||||
# defines how much the process can be outside of the configured
|
# defines how much the process can be outside of the configured
|
||||||
# segment / seek
|
# segment / seek
|
||||||
self._sent_eos_pos = None
|
self._sent_eos_time = None
|
||||||
|
|
||||||
self.validatelogs = None
|
self.validatelogs = None
|
||||||
if scenario is None or scenario.name.lower() == "none":
|
if scenario is None or scenario.name.lower() == "none":
|
||||||
|
@ -571,7 +571,7 @@ class GstValidateTest(Test):
|
||||||
|
|
||||||
def add_action_execution(self, action_infos):
|
def add_action_execution(self, action_infos):
|
||||||
if action_infos['action-type'] == 'eos':
|
if action_infos['action-type'] == 'eos':
|
||||||
self._sent_eos_pos = time.time()
|
self._sent_eos_time = time.time()
|
||||||
self.actions_infos.append(action_infos)
|
self.actions_infos.append(action_infos)
|
||||||
|
|
||||||
def server_wrapper(self, ready):
|
def server_wrapper(self, ready):
|
||||||
|
@ -615,9 +615,9 @@ class GstValidateTest(Test):
|
||||||
|
|
||||||
def get_current_value(self):
|
def get_current_value(self):
|
||||||
if self.scenario:
|
if self.scenario:
|
||||||
if self._sent_eos_pos is not None:
|
if self._sent_eos_time is not None:
|
||||||
t = time.time()
|
t = time.time()
|
||||||
if ((t - sent_eos)) > 30:
|
if ((t - self._sent_eos_time)) > 30:
|
||||||
if self.media_descriptor.get_protocol() == Protocols.HLS:
|
if self.media_descriptor.get_protocol() == Protocols.HLS:
|
||||||
self.set_result(Result.PASSED,
|
self.set_result(Result.PASSED,
|
||||||
"""Got no EOS 30 seconds after sending EOS,
|
"""Got no EOS 30 seconds after sending EOS,
|
||||||
|
@ -678,7 +678,7 @@ class GstValidateTest(Test):
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
Test.clean(self)
|
Test.clean(self)
|
||||||
self._sent_eos_pos = None
|
self._sent_eos_time = None
|
||||||
self.reports = []
|
self.reports = []
|
||||||
self.position = -1
|
self.position = -1
|
||||||
self.media_duration = -1
|
self.media_duration = -1
|
||||||
|
|
Loading…
Reference in a new issue