Skip to content

Commit

Permalink
CEA-608: Don't assume roll-up captions are at the bottom of the screen
Browse files Browse the repository at this point in the history
ANSI/CTA-608-E R-2014 Annex B.5 says:
"The concept of a movable base row for a roll-up caption is new."

It means "new" compared to TC1 and TC2 (released in or before 1985).

Issue: #7475
PiperOrigin-RevId: 315258859
  • Loading branch information
icbaker committed Jun 8, 2020
1 parent b7486f4 commit 770df86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
* Ignore excess characters in CEA-608 lines (max length is 32)
([#7341](https://github.com/google/ExoPlayer/issues/7341)).
* Add support for WebVTT's `ruby-position` CSS property.
* Don't assume CEA-608 captions are in the bottom half of the
screen([#7475](https://github.com/google/ExoPlayer/issues/7475)).
* DRM:
* Add support for attaching DRM sessions to clear content in the demo app.
* Remove `DrmSessionManager` references from all renderers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ public Cue build(@Cue.AnchorType int forcedPositionAnchor) {
int lineAnchor;
int line;
// Note: Row indices are in the range [1-15].
if (captionMode == CC_MODE_ROLL_UP || row > (BASE_ROW / 2)) {
if (row > (BASE_ROW / 2)) {
lineAnchor = Cue.ANCHOR_TYPE_END;
line = row - BASE_ROW;
// Two line adjustments. The first is because line indices from the bottom of the window
Expand Down

3 comments on commit 770df86

@zsmatyas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will the location on the screen change if we receive a mode change from 2 Rows rolling to 4 rows rolling, but no other changes? I would expect that roll-up captions must have Cue.ANCHOR_TYPE_END, otherwise the mode changes might break the alignment.

@icbaker
Copy link
Collaborator Author

@icbaker icbaker commented on 770df86 Jun 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the cue text content doesn't change (only the roll-up count) then the current code should display the cues in the same place.

I've sent a follow-up change which considers the roll-up count - will link it here once it's pushed.

@icbaker
Copy link
Collaborator Author

@icbaker icbaker commented on 770df86 Jun 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit updates my change: 947485e

Please sign in to comment.