Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annex B Example 7 dur on body isn't implemented #504

Open
nigelmegitt opened this issue Oct 4, 2019 · 1 comment
Open

Annex B Example 7 dur on body isn't implemented #504

nigelmegitt opened this issue Oct 4, 2019 · 1 comment
Assignees

Comments

@nigelmegitt
Copy link
Collaborator

nigelmegitt commented Oct 4, 2019

The spec Annex Example 7 specifies a dur on body but no begin or end, and a descendant content element (a p but it could be a div just the same) with a begin and end attribute.

<body dur="5s">
   <div>
      <p xml:id="ID005" begin="5s" end="12s">
         <span>Some example text...</span>
         <br/>
         <span>And another line</span>
      </p>
   </div>
</body>

Earliest Computed Begin Time: 5s

Latest Computed End Time: 12s

When I implement a test that duplicates this it fails because the code for calculating the computed end time of the body is not taking into account the document resolved begin time and applying the dur relative to that, but is instead applying it relative to the default begin time of the body, which is zero.

@nigelmegitt nigelmegitt self-assigned this Oct 4, 2019
@nigelmegitt
Copy link
Collaborator Author

Digging into this, there is code that is trying to make this work. ebu_tt_live/bindings/validation/timing.py line 373-375:

            elif self._begin_timedelta is None and self._end_timedelta is None:
                # In this case the document end at availability time + dur
                proposed_end = self._semantic_dataset['availability_time'] + self._dur_timedelta

The issue is that the availability_time is used as the basis rather than the resolved time. I'm not sure if resolved time is known at the time this calculation is done though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant