C# Класс LibMPlayerCommon.MPlayer

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
HandleMediaPlayerErrorDataReceived void
HandleMediaPlayerOutputDataReceived void
InitializeMplayer void
LoadCurrentPlayingFileLength void
MPlayer System
MplayerBackend string
PrepareFilePath string
_currentPostionTimer_Elapsed void

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

CurrentPlayingFileLength() публичный Метод

Retrieves the number of seconds of the current playing video.
public CurrentPlayingFileLength ( ) : int
Результат int

GetArtist() публичный Метод

public GetArtist ( ) : string
Результат string

GetAudioBitrate() публичный Метод

public GetAudioBitrate ( ) : string
Результат string

GetAudioCodec() публичный Метод

public GetAudioCodec ( ) : string
Результат string

GetAudioSamples() публичный Метод

public GetAudioSamples ( ) : string
Результат string

GetComment() публичный Метод

public GetComment ( ) : string
Результат string

GetCurrentPosition() публичный Метод

Get the current postion in the file being played.
It is highly recommended to use the CurrentPostion event instead.
public GetCurrentPosition ( ) : int
Результат int

GetGenre() публичный Метод

public GetGenre ( ) : string
Результат string

GetPercentPos() публичный Метод

get percent positiob
public GetPercentPos ( ) : string
Результат string

GetTitle() публичный Метод

public GetTitle ( ) : string
Результат string

GetTrack() публичный Метод

public GetTrack ( ) : string
Результат string

GetVideoBitrate() публичный Метод

public GetVideoBitrate ( ) : string
Результат string

GetVideoResolution() публичный Метод

public GetVideoResolution ( ) : string
Результат string

GetYear() публичный Метод

public GetYear ( ) : string
Результат string

GetfileName() публичный Метод

public GetfileName ( ) : string
Результат string

InsertSubtitles() публичный Метод

public InsertSubtitles ( string filepath ) : void
filepath string
Результат void

LoadFile() публичный Метод

Starts a new video/audio file immediatly. Requires that Play has been called.
public LoadFile ( string filePath ) : void
filePath string string
Результат void

MPlayer() публичный Метод

public MPlayer ( int wid, MplayerBackends backend ) : System
wid int
backend MplayerBackends
Результат System

MPlayer() публичный Метод

public MPlayer ( int wid, MplayerBackends backend, string mplayerPath ) : System
wid int
backend MplayerBackends
mplayerPath string
Результат System

MPlayer() публичный Метод

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.
Результат System

MovePosition() публичный Метод

Move to a new position in the video.
public MovePosition ( int timePosition ) : void
timePosition int Seconds. The position to seek move to.
Результат void

Mute() публичный Метод

Toggle Mute.
public Mute ( ) : void
Результат void

Pause() публичный Метод

Pause the current video. If paused it will unpause.
public Pause ( ) : void
Результат void

Play() публичный Метод

Load and start playing a video.
public Play ( string filePath ) : void
filePath string
Результат void

Quit() публичный Метод

Close MPlayer instance.
public Quit ( ) : void
Результат void

RemoveSubtitle() публичный Метод

public RemoveSubtitle ( ) : void
Результат void

Seek() публичный Метод

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
Результат void

SetPercent() публичный Метод

set percent position of mplayer
public SetPercent ( int v ) : void
v int
Результат void

SetSize() публичный Метод

public SetSize ( int width, int height ) : void
width int
height int
Результат void

Stop() публичный Метод

Stop the current video.
public Stop ( ) : void
Результат void

SubDelay() публичный Метод

public SubDelay ( int v ) : void
v int
Результат void

SubPos() публичный Метод

public SubPos ( int v ) : void
v int
Результат void

SubScale() публичный Метод

public SubScale ( int v ) : void
v int
Результат void

SwitchAudioTrack() публичный Метод

public SwitchAudioTrack ( int track ) : void
track int
Результат void

SwitchRatio() публичный Метод

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
Результат void

SwitchSubtitle() публичный Метод

public SwitchSubtitle ( int sub ) : void
sub int
Результат void

ToggleFullScreen() публичный Метод

Toggle Fullscreen.
public ToggleFullScreen ( ) : void
Результат void

VisibilitySubtitle() публичный Метод

public VisibilitySubtitle ( int v ) : void
v int
Результат void

Volume() публичный Метод

Accepts a volume value of 0 - 100.
public Volume ( int volume ) : void
volume int
Результат void

getalbum() публичный Метод

public getalbum ( ) : string
Результат string