C# Class LibMPlayerCommon.MPlayer

Afficher le fichier Open project: majorsilence/MPlayerControl Class Usage Examples

Private Properties

Свойство Type Description
HandleMediaPlayerErrorDataReceived void
HandleMediaPlayerOutputDataReceived void
InitializeMplayer void
LoadCurrentPlayingFileLength void
MPlayer System
MplayerBackend string
PrepareFilePath string
_currentPostionTimer_Elapsed void

Méthodes publiques

Méthode Description
CurrentPlayingFileLength ( ) : int

Retrieves the number of seconds of the current playing video.

GetArtist ( ) : string
GetAudioBitrate ( ) : string
GetAudioCodec ( ) : string
GetAudioSamples ( ) : string
GetComment ( ) : string
GetCurrentPosition ( ) : int

Get the current postion in the file being played.

It is highly recommended to use the CurrentPostion event instead.

GetGenre ( ) : string
GetPercentPos ( ) : string

get percent positiob

GetTitle ( ) : string
GetTrack ( ) : string
GetVideoBitrate ( ) : string
GetVideoResolution ( ) : string
GetYear ( ) : string
GetfileName ( ) : string
InsertSubtitles ( string filepath ) : void
LoadFile ( string filePath ) : void

Starts a new video/audio file immediatly. Requires that Play has been called.

MPlayer ( int wid, MplayerBackends backend ) : System
MPlayer ( int wid, MplayerBackends backend, string mplayerPath ) : System
MPlayer ( int wid, MplayerBackends backend, string mplayerPath, bool loadMplayer ) : System

Create a new instance of mplayer class.

MovePosition ( int timePosition ) : void

Move to a new position in the video.

Mute ( ) : void

Toggle Mute.

Pause ( ) : void

Pause the current video. If paused it will unpause.

Play ( string filePath ) : void

Load and start playing a video.

Quit ( ) : void

Close MPlayer instance.

RemoveSubtitle ( ) : void
Seek ( int value, Seek type ) : void

Seek a new postion. Seek to some place in the movie. Seek.Relative is a relative seek of +/- value seconds (default). Seek.Percentage is a seek to value % in the movie. Seek.Absolute is a seek to an absolute position of value seconds.

SetPercent ( int v ) : void

set percent position of mplayer

SetSize ( int width, int height ) : void
Stop ( ) : void

Stop the current video.

SubDelay ( int v ) : void
SubPos ( int v ) : void
SubScale ( int v ) : void
SwitchAudioTrack ( int track ) : void
SwitchRatio ( string ratio ) : void

Change aspect ratio at runtime. [value] is the new aspect ratio expressed as a float (e.g. 1.77778 for 16/9), or special value -1 to reset to original aspect ratio (ditto if [value] is missing), or special value 0 to disable automatic movie aspect ratio compensation. There might be problems with some video filters.

SwitchSubtitle ( int sub ) : void
ToggleFullScreen ( ) : void

Toggle Fullscreen.

VisibilitySubtitle ( int v ) : void
Volume ( int volume ) : void

Accepts a volume value of 0 - 100.

getalbum ( ) : string

Private Methods

Méthode Description
HandleMediaPlayerErrorDataReceived ( object sender, System e ) : void

All mplayer error output is read through this function.

HandleMediaPlayerOutputDataReceived ( object sender, System e ) : void

All mplayer standard output is read through this function.

InitializeMplayer ( ) : void
LoadCurrentPlayingFileLength ( ) : void
MPlayer ( ) : System
MplayerBackend ( ) : string
PrepareFilePath ( string filePath ) : string

Prepare filepaths to be used witht the loadfile command.

For some reason it strips the DirectorySeperatorChar so we double it up here.

_currentPostionTimer_Elapsed ( object sender, ElapsedEventArgs e ) : void

Method Details

CurrentPlayingFileLength() public méthode

Retrieves the number of seconds of the current playing video.
public CurrentPlayingFileLength ( ) : int
Résultat int

GetArtist() public méthode

public GetArtist ( ) : string
Résultat string

GetAudioBitrate() public méthode

public GetAudioBitrate ( ) : string
Résultat string

GetAudioCodec() public méthode

public GetAudioCodec ( ) : string
Résultat string

GetAudioSamples() public méthode

public GetAudioSamples ( ) : string
Résultat string

GetComment() public méthode

public GetComment ( ) : string
Résultat string

GetCurrentPosition() public méthode

Get the current postion in the file being played.
It is highly recommended to use the CurrentPostion event instead.
public GetCurrentPosition ( ) : int
Résultat int

GetGenre() public méthode

public GetGenre ( ) : string
Résultat string

GetPercentPos() public méthode

get percent positiob
public GetPercentPos ( ) : string
Résultat string

GetTitle() public méthode

public GetTitle ( ) : string
Résultat string

GetTrack() public méthode

public GetTrack ( ) : string
Résultat string

GetVideoBitrate() public méthode

public GetVideoBitrate ( ) : string
Résultat string

GetVideoResolution() public méthode

public GetVideoResolution ( ) : string
Résultat string

GetYear() public méthode

public GetYear ( ) : string
Résultat string

GetfileName() public méthode

public GetfileName ( ) : string
Résultat string

InsertSubtitles() public méthode

public InsertSubtitles ( string filepath ) : void
filepath string
Résultat void

LoadFile() public méthode

Starts a new video/audio file immediatly. Requires that Play has been called.
public LoadFile ( string filePath ) : void
filePath string string
Résultat void

MPlayer() public méthode

public MPlayer ( int wid, MplayerBackends backend ) : System
wid int
backend MplayerBackends
Résultat System

MPlayer() public méthode

public MPlayer ( int wid, MplayerBackends backend, string mplayerPath ) : System
wid int
backend MplayerBackends
mplayerPath string
Résultat System

MPlayer() public méthode

Create a new instance of mplayer class.
public MPlayer ( int wid, MplayerBackends backend, string mplayerPath, bool loadMplayer ) : System
wid int Window ID that mplayer should attach itself
backend MplayerBackends The video output backend that mplayer will use.
mplayerPath string The full filepath to mplayer.exe. If mplayerPath is left empty it will search for mplayer.exe in /// "current directory\backend\mplayer.exe" on windows and mplayer in the path on linux.
loadMplayer bool If true mplayer will immediately be loaded and you should not attempt to /// play any files until MplayerRunning is true.
Résultat System

MovePosition() public méthode

Move to a new position in the video.
public MovePosition ( int timePosition ) : void
timePosition int Seconds. The position to seek move to.
Résultat void

Mute() public méthode

Toggle Mute.
public Mute ( ) : void
Résultat void

Pause() public méthode

Pause the current video. If paused it will unpause.
public Pause ( ) : void
Résultat void

Play() public méthode

Load and start playing a video.
public Play ( string filePath ) : void
filePath string
Résultat void

Quit() public méthode

Close MPlayer instance.
public Quit ( ) : void
Résultat void

RemoveSubtitle() public méthode

public RemoveSubtitle ( ) : void
Résultat void

Seek() public méthode

Seek a new postion. Seek to some place in the movie. Seek.Relative is a relative seek of +/- value seconds (default). Seek.Percentage is a seek to value % in the movie. Seek.Absolute is a seek to an absolute position of value seconds.
public Seek ( int value, Seek type ) : void
value int
type Seek
Résultat void

SetPercent() public méthode

set percent position of mplayer
public SetPercent ( int v ) : void
v int
Résultat void

SetSize() public méthode

public SetSize ( int width, int height ) : void
width int
height int
Résultat void

Stop() public méthode

Stop the current video.
public Stop ( ) : void
Résultat void

SubDelay() public méthode

public SubDelay ( int v ) : void
v int
Résultat void

SubPos() public méthode

public SubPos ( int v ) : void
v int
Résultat void

SubScale() public méthode

public SubScale ( int v ) : void
v int
Résultat void

SwitchAudioTrack() public méthode

public SwitchAudioTrack ( int track ) : void
track int
Résultat void

SwitchRatio() public méthode

Change aspect ratio at runtime. [value] is the new aspect ratio expressed as a float (e.g. 1.77778 for 16/9), or special value -1 to reset to original aspect ratio (ditto if [value] is missing), or special value 0 to disable automatic movie aspect ratio compensation. There might be problems with some video filters.
public SwitchRatio ( string ratio ) : void
ratio string
Résultat void

SwitchSubtitle() public méthode

public SwitchSubtitle ( int sub ) : void
sub int
Résultat void

ToggleFullScreen() public méthode

Toggle Fullscreen.
public ToggleFullScreen ( ) : void
Résultat void

VisibilitySubtitle() public méthode

public VisibilitySubtitle ( int v ) : void
v int
Résultat void

Volume() public méthode

Accepts a volume value of 0 - 100.
public Volume ( int volume ) : void
volume int
Résultat void

getalbum() public méthode

public getalbum ( ) : string
Résultat string