C# Class MediaPortal.Player.Subtitles.SubtitleRenderer

Afficher le fichier Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

Adds the subtitle filter to the graph.
public AddSubtitleFilter ( IGraphBuilder _graphBuilder ) : IBaseFilter
_graphBuilder IGraphBuilder
Résultat IBaseFilter

Clear() public méthode

Cleans up resources
public Clear ( ) : void
Résultat void

GetInstance() public static méthode

public static GetInstance ( ) : SubtitleRenderer
Résultat SubtitleRenderer

OnSeek() public méthode

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
Résultat int

OnSubtitle() public méthode

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
Résultat int

OnTextSubtitle() public méthode

public OnTextSubtitle ( TEXT_SUBTITLE &sub ) : void
sub TEXT_SUBTITLE
Résultat void

Render() public méthode

public Render ( ) : void
Résultat void

RenderText() public static méthode

public static RenderText ( MediaPortal.Player.Subtitles.LineContent lc ) : Bitmap
lc MediaPortal.Player.Subtitles.LineContent
Résultat System.Drawing.Bitmap

Reset() public méthode

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

SetPlayer() public méthode

public SetPlayer ( IPlayer p ) : void
p IPlayer
Résultat void

SetSubtitleOption() public méthode

public SetSubtitleOption ( SubtitleOption option ) : void
option SubtitleOption
Résultat void

UpdateTimeout() public méthode

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