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.
|
`DefaultAudioSink` to stall.
|
||||||
* Video:
|
* Video:
|
||||||
* Text:
|
* Text:
|
||||||
|
* TTML: Add support for referencing `tts:origin` and `tts:extent` via
|
||||||
|
`style` ([#2953](https://github.com/google/ExoPlayer/issues/2953)).
|
||||||
* Metadata:
|
* Metadata:
|
||||||
* Image:
|
* Image:
|
||||||
* DataSource:
|
* DataSource:
|
||||||
|
@ -315,7 +315,8 @@ public final class TtmlParser implements SubtitleParser {
|
|||||||
globalStyles.put(styleId, style);
|
globalStyles.put(styleId, style);
|
||||||
}
|
}
|
||||||
} else if (XmlPullParserUtil.isStartTag(xmlParser, TtmlNode.TAG_REGION)) {
|
} 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) {
|
if (ttmlRegion != null) {
|
||||||
globalRegions.put(ttmlRegion.id, ttmlRegion);
|
globalRegions.put(ttmlRegion.id, ttmlRegion);
|
||||||
}
|
}
|
||||||
@ -350,7 +351,9 @@ public final class TtmlParser implements SubtitleParser {
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
private static TtmlRegion parseRegionAttributes(
|
private static TtmlRegion parseRegionAttributes(
|
||||||
XmlPullParser xmlParser, int cellRows, @Nullable TtsExtent ttsExtent,
|
XmlPullParser xmlParser,
|
||||||
|
int cellRows,
|
||||||
|
@Nullable TtsExtent ttsExtent,
|
||||||
Map<String, TtmlStyle> globalStyles) {
|
Map<String, TtmlStyle> globalStyles) {
|
||||||
@Nullable String regionId = XmlPullParserUtil.getAttributeValue(xmlParser, TtmlNode.ATTR_ID);
|
@Nullable String regionId = XmlPullParserUtil.getAttributeValue(xmlParser, TtmlNode.ATTR_ID);
|
||||||
if (regionId == null) {
|
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 RUBIES_FILE = "media/ttml/rubies.xml";
|
||||||
private static final String TEXT_EMPHASIS_FILE = "media/ttml/text_emphasis.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 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
|
@Test
|
||||||
public void simple_allCues() throws Exception {
|
public void simple_allCues() throws Exception {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user