Home
last modified time | relevance | path

Searched refs:TtmlNode (Results 1 – 5 of 5) sorted by relevance

/external/exoplayer/tree/library/core/src/main/java/com/google/android/exoplayer2/text/ttml/
DTtmlDecoder.java117 regionMap.put(TtmlNode.ANONYMOUS_REGION_ID, new TtmlRegion(TtmlNode.ANONYMOUS_REGION_ID)); in decode()
121 ArrayDeque<TtmlNode> nodeStack = new ArrayDeque<>(); in decode()
128 @Nullable TtmlNode parent = nodeStack.peek(); in decode()
132 if (TtmlNode.TAG_TT.equals(name)) { in decode()
140 } else if (TtmlNode.TAG_HEAD.equals(name)) { in decode()
144 TtmlNode node = parseNode(xmlParser, parent, regionMap, frameAndTickRate); in decode()
156 Assertions.checkNotNull(parent).addChild(TtmlNode.buildTextNode(xmlParser.getText())); in decode()
158 if (xmlParser.getName().equals(TtmlNode.TAG_TT)) { in decode()
249 String ttsExtent = XmlPullParserUtil.getAttributeValue(xmlParser, TtmlNode.ATTR_TTS_EXTENT); in parseTtsExtent()
279 if (XmlPullParserUtil.isStartTag(xmlParser, TtmlNode.TAG_STYLE)) { in parseHeader()
[all …]
DTtmlRenderUtil.java83 Spannable builder, int start, int end, TtmlStyle style, @Nullable TtmlNode parent) { in applyStylesToSpan()
122 @Nullable TtmlNode containerNode = findRubyContainerNode(parent); in applyStylesToSpan()
127 @Nullable TtmlNode textNode = findRubyTextNode(containerNode); in applyStylesToSpan()
215 private static TtmlNode findRubyTextNode(TtmlNode rubyContainerNode) { in findRubyTextNode()
216 Deque<TtmlNode> childNodesStack = new ArrayDeque<>(); in findRubyTextNode()
219 TtmlNode childNode = childNodesStack.pop(); in findRubyTextNode()
232 private static TtmlNode findRubyContainerNode(@Nullable TtmlNode node) { in findRubyContainerNode()
DTtmlNode.java38 /* package */ final class TtmlNode { class
118 @Nullable public final TtmlNode parent;
123 private @MonotonicNonNull List<TtmlNode> children;
125 public static TtmlNode buildTextNode(String text) { in buildTextNode()
126 return new TtmlNode( in buildTextNode()
138 public static TtmlNode buildNode( in buildNode()
146 @Nullable TtmlNode parent) { in buildNode()
147 return new TtmlNode( in buildNode()
151 private TtmlNode( in TtmlNode() method in TtmlNode
160 @Nullable TtmlNode parent) { in TtmlNode()
[all …]
DTtmlSubtitle.java32 private final TtmlNode root;
39 TtmlNode root, in TtmlSubtitle()
68 /* package */ TtmlNode getRoot() { in getRoot()
/external/exoplayer/tree/library/core/src/test/java/com/google/android/exoplayer2/text/ttml/
DTtmlDecoderTest.java332 TtmlNode root = subtitle.getRoot(); in emptyStyleAttribute()
333 TtmlNode body = queryChildrenForTag(root, TtmlNode.TAG_BODY, 0); in emptyStyleAttribute()
334 TtmlNode fourthDiv = queryChildrenForTag(body, TtmlNode.TAG_DIV, 3); in emptyStyleAttribute()
336 assertThat(queryChildrenForTag(fourthDiv, TtmlNode.TAG_P, 0).getStyleIds()).isNull(); in emptyStyleAttribute()
345 TtmlNode root = subtitle.getRoot(); in nonexistingStyleId()
346 TtmlNode body = queryChildrenForTag(root, TtmlNode.TAG_BODY, 0); in nonexistingStyleId()
347 TtmlNode fifthDiv = queryChildrenForTag(body, TtmlNode.TAG_DIV, 4); in nonexistingStyleId()
349 assertThat(queryChildrenForTag(fifthDiv, TtmlNode.TAG_P, 0).getStyleIds()).hasLength(1); in nonexistingStyleId()
359 TtmlNode root = subtitle.getRoot(); in nonExistingAndExistingStyleIdWithRedundantSpaces()
360 TtmlNode body = queryChildrenForTag(root, TtmlNode.TAG_BODY, 0); in nonExistingAndExistingStyleIdWithRedundantSpaces()
[all …]