public class SRTRenderer extends SubtitleController.Renderer
Constructor and Description |
---|
SRTRenderer(Context context) |
Modifier and Type | Method and Description |
---|---|
SubtitleTrack |
createTrack(MediaFormat format)
Called by
MediaPlayer 's SubtitleController for each
subtitle track that was detected and is supported by this object to
create a SubtitleTrack object. |
boolean |
supports(MediaFormat format)
Called by
MediaPlayer 's SubtitleController when a new
subtitle track is detected, to see if it should use this object to
parse and display this subtitle track. |
public SRTRenderer(Context context)
public boolean supports(MediaFormat format)
SubtitleController.Renderer
MediaPlayer
's SubtitleController
when a new
subtitle track is detected, to see if it should use this object to
parse and display this subtitle track.supports
in class SubtitleController.Renderer
format
- the format of the track that will include at least
the MIME type MediaFormat@KEY_MIME
.public SubtitleTrack createTrack(MediaFormat format)
SubtitleController.Renderer
MediaPlayer
's SubtitleController
for each
subtitle track that was detected and is supported by this object to
create a SubtitleTrack
object. This object will be created
for each track that was found. If the track is selected for display,
this object will be used to parse and display the track data.createTrack
in class SubtitleController.Renderer
format
- the format of the track that will include at least
the MIME type MediaFormat@KEY_MIME
.SubtitleTrack
object that will be used to parse
and render the subtitle track.