Add a release note and format with google-java-format

This commit is contained in:
Ian Baker 2025-01-03 15:15:14 +00:00
parent 82bed39140
commit 618c2cf952
3 changed files with 9 additions and 3 deletions

View File

@ -24,6 +24,8 @@
`DefaultAudioSink` to stall.
* Video:
* Text:
* TTML: Add support for referencing `tts:origin` and `tts:extent` via
`style` ([#2953](https://github.com/google/ExoPlayer/issues/2953)).
* Metadata:
* Image:
* DataSource:

View File

@ -315,7 +315,8 @@ public final class TtmlParser implements SubtitleParser {
globalStyles.put(styleId, style);
}
} else if (XmlPullParserUtil.isStartTag(xmlParser, TtmlNode.TAG_REGION)) {
@Nullable TtmlRegion ttmlRegion = parseRegionAttributes(xmlParser, cellRows, ttsExtent, globalStyles);
@Nullable
TtmlRegion ttmlRegion = parseRegionAttributes(xmlParser, cellRows, ttsExtent, globalStyles);
if (ttmlRegion != null) {
globalRegions.put(ttmlRegion.id, ttmlRegion);
}
@ -350,7 +351,9 @@ public final class TtmlParser implements SubtitleParser {
*/
@Nullable
private static TtmlRegion parseRegionAttributes(
XmlPullParser xmlParser, int cellRows, @Nullable TtsExtent ttsExtent,
XmlPullParser xmlParser,
int cellRows,
@Nullable TtsExtent ttsExtent,
Map<String, TtmlStyle> globalStyles) {
@Nullable String regionId = XmlPullParserUtil.getAttributeValue(xmlParser, TtmlNode.ATTR_ID);
if (regionId == null) {

View File

@ -74,7 +74,8 @@ public final class TtmlParserTest {
private static final String RUBIES_FILE = "media/ttml/rubies.xml";
private static final String TEXT_EMPHASIS_FILE = "media/ttml/text_emphasis.xml";
private static final String SHEAR_FILE = "media/ttml/shear.xml";
private static final String REGION_ATTRS_FROM_STYLE_FILE = "media/ttml/inherit_region_attributes_from_style.xml";
private static final String REGION_ATTRS_FROM_STYLE_FILE =
"media/ttml/inherit_region_attributes_from_style.xml";
@Test
public void simple_allCues() throws Exception {