Commit 43e6e161 by Rik Heijdens

Implemented PAC and Midrow code handling for EIA-608 captions

parent f6fdcee9
...@@ -15,10 +15,9 @@ ...@@ -15,10 +15,9 @@
*/ */
package com.google.android.exoplayer2.text.eia608; package com.google.android.exoplayer2.text.eia608;
import android.text.TextUtils;
import com.google.android.exoplayer2.text.Cue; import com.google.android.exoplayer2.text.Cue;
import com.google.android.exoplayer2.text.Subtitle; import com.google.android.exoplayer2.text.Subtitle;
import java.util.Collections;
import java.util.List; import java.util.List;
/** /**
...@@ -26,13 +25,10 @@ import java.util.List; ...@@ -26,13 +25,10 @@ import java.util.List;
*/ */
/* package */ final class Eia608Subtitle implements Subtitle { /* package */ final class Eia608Subtitle implements Subtitle {
private final String text; private final List<Cue> cues;
/** public Eia608Subtitle(List<Cue> cues) {
* @param text The subtitle text. this.cues = cues;
*/
public Eia608Subtitle(String text) {
this.text = text;
} }
@Override @Override
...@@ -52,11 +48,7 @@ import java.util.List; ...@@ -52,11 +48,7 @@ import java.util.List;
@Override @Override
public List<Cue> getCues(long timeUs) { public List<Cue> getCues(long timeUs) {
if (TextUtils.isEmpty(text)) { return cues;
return Collections.emptyList();
} else {
return Collections.singletonList(new Cue(text));
}
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment