MoviePlayer

open class MoviePlayer

Plays the video track from a movie file to a Surface.

TODO: needs more advanced shuttle controls (pause/resume, skip)

Constructors

Link copied to clipboard
constructor(sourceFile: File, outputSurface: Surface, frameCallback: MoviePlayer.FrameCallback)
Constructs a MoviePlayer.

Types

Link copied to clipboard
interface FrameCallback
Callback invoked when rendering video frames.
Link copied to clipboard
interface PlayerFeedback
Interface to be implemented by class that manages playback UI.
Link copied to clipboard
open class PlayTask : Runnable
Thread helper for video playback.

Functions

Link copied to clipboard
open fun getVideoHeight(): Int
Returns the height, in pixels, of the video.
Link copied to clipboard
open fun getVideoWidth(): Int
Returns the width, in pixels, of the video.
Link copied to clipboard
open fun play()
Decodes the video stream, sending frames to the surface.
Link copied to clipboard
open fun requestStop()
Asks the player to stop.
Link copied to clipboard
open fun setLoopMode(loopMode: Boolean)
Sets the loop mode.