C# Class MediaPortal.Player.Subtitles.SubtitleRenderer

Show file Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Public Methods

Method Description
AddSubtitleFilter ( IGraphBuilder _graphBuilder ) : IBaseFilter

Adds the subtitle filter to the graph.

Clear ( ) : void

Cleans up resources

GetInstance ( ) : SubtitleRenderer
OnSeek ( double startPos ) : int

Alerts the subtitle render that a seek has just been performed. Stops displaying the current subtitle and removes any cached subtitles. Furthermore updates the time that playback starts after the seek.

OnSubtitle ( NATIVE_SUBTITLE &sub ) : int

Callback from subtitle filter, alerting us that a new subtitle is available It receives the new subtitle as the argument sub, which data is only valid for the duration of OnSubtitle.

OnTextSubtitle ( TEXT_SUBTITLE &sub ) : void
Render ( ) : void
RenderText ( MediaPortal.Player.Subtitles.LineContent lc ) : Bitmap
Reset ( ) : int

Alerts the subtitle render that a reset has just been performed. Stops displaying the current subtitle and removes any cached subtitles.

SetPlayer ( IPlayer p ) : void
SetSubtitleOption ( SubtitleOption option ) : void
UpdateTimeout ( System.Int64 &timeOut ) : int

Callback from subtitle filter Updates the latest subtitle timeout

Private Methods

Method Description
AddSubtitle ( Subtitle sub ) : void
ClearSubtitles ( ) : void
CreateVertexBuffer ( int wx, int wy, int wwidth, int wheight ) : void

Creates a vertex buffer for a transformed textured quad matching the given rectangle and stores it in vertexBuffer

SetSubtitle ( Subtitle subtitle ) : void
SubtitleRenderer ( ) : System

Method Details

AddSubtitleFilter() public method

Adds the subtitle filter to the graph.
public AddSubtitleFilter ( IGraphBuilder _graphBuilder ) : IBaseFilter
_graphBuilder IGraphBuilder
return IBaseFilter

Clear() public method

Cleans up resources
public Clear ( ) : void
return void

GetInstance() public static method

public static GetInstance ( ) : SubtitleRenderer
return SubtitleRenderer

OnSeek() public method

Alerts the subtitle render that a seek has just been performed. Stops displaying the current subtitle and removes any cached subtitles. Furthermore updates the time that playback starts after the seek.
public OnSeek ( double startPos ) : int
startPos double
return int

OnSubtitle() public method

Callback from subtitle filter, alerting us that a new subtitle is available It receives the new subtitle as the argument sub, which data is only valid for the duration of OnSubtitle.
public OnSubtitle ( NATIVE_SUBTITLE &sub ) : int
sub NATIVE_SUBTITLE
return int

OnTextSubtitle() public method

public OnTextSubtitle ( TEXT_SUBTITLE &sub ) : void
sub TEXT_SUBTITLE
return void

Render() public method

public Render ( ) : void
return void

RenderText() public static method

public static RenderText ( MediaPortal.Player.Subtitles.LineContent lc ) : Bitmap
lc MediaPortal.Player.Subtitles.LineContent
return System.Drawing.Bitmap

Reset() public method

Alerts the subtitle render that a reset has just been performed. Stops displaying the current subtitle and removes any cached subtitles.
public Reset ( ) : int
return int

SetPlayer() public method

public SetPlayer ( IPlayer p ) : void
p IPlayer
return void

SetSubtitleOption() public method

public SetSubtitleOption ( SubtitleOption option ) : void
option SubtitleOption
return void

UpdateTimeout() public method

Callback from subtitle filter Updates the latest subtitle timeout
public UpdateTimeout ( System.Int64 &timeOut ) : int
timeOut System.Int64
return int