mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add a release note and format with google-java-format
This commit is contained in:
parent
82bed39140
commit
618c2cf952
@ -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:
|
||||
|
@ -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) {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user