Space Engineers
Public Member Functions | Protected Member Functions | Properties | List of all members
DShowNET.VideoPlayer Class Referenceabstract

Enables Video Playback in Microsoft XNA More...

Inheritance diagram for DShowNET.VideoPlayer:
DShowNET.ISampleGrabberCB VRageRender.MyVideoPlayer

Public Member Functions

void Update ()
 Updates the Output Frame data using data from the video stream. Call this in Game.Update(). More...
 
void Play ()
 Starts playing the video More...
 
void Pause ()
 Pauses the video More...
 
void Stop ()
 Stops playing the video More...
 
void Rewind ()
 Rewinds the video to the start and plays it again More...
 
int BufferCB (double SampleTime, IntPtr pBuffer, int BufferLen)
 Required public callback from DirectShow SampleGrabber. Do not call this method. More...
 
int SampleCB (double SampleTime, IMediaSample pSample)
 Required public callback from DirectShow SampleGrabber. Do not call this method. More...
 
virtual void Dispose ()
 Cleans up the Video Player. Must be called when finished with the player. More...
 

Protected Member Functions

 VideoPlayer (string FileName)
 Creates a new Video Player. Automatically creates the required Texture2D on the specificied GraphicsDevice. More...
 
abstract void OnFrame (byte[] frameData)
 

Properties

int VideoWidth [get]
 Width of the loaded video More...
 
int VideoHeight [get]
 Height of the loaded video More...
 
double CurrentPosition [get, set]
 Gets or Sets the current position of playback in seconds More...
 
string CurrentPositionAsTimeString [get]
 Returns the current position of playback, formatted as a time string (HH:MM:SS) More...
 
double Duration [get]
 Total duration in seconds More...
 
string DurationAsTimeString [get]
 Returns the duration of the video, formatted as a time string (HH:MM:SS) More...
 
string FileName [get]
 Currently Loaded Video File More...
 
VideoState CurrentState [get, set]
 Gets or Sets the current state of the video player More...
 
bool IsDisposed [get]
 Is Disposed? More...
 
int FramesPerSecond [get]
 Number of Frames Per Second in the video file. Returns -1 if this cannot be calculated. More...
 
float MillisecondsPerFrame [get]
 The number of milliseconds between each frame Returns -1 if this cannot be calculated More...
 
byte AlphaTransparency [get, set]
 Gets or sets how transparent the video frame is. Takes effect on the next frame after this is updated Max Value: 255 - Opaque Min Value: 0 - Transparent More...
 
float Volume [get, set]
 

Detailed Description

Enables Video Playback in Microsoft XNA

Definition at line 22 of file VideoPlayer.cs.

Constructor & Destructor Documentation

DShowNET.VideoPlayer.VideoPlayer ( string  FileName)
inlineprotected

Creates a new Video Player. Automatically creates the required Texture2D on the specificied GraphicsDevice.

Parameters
FileNameThe video file to open
graphicsDeviceXNA Graphics Device

Definition at line 330 of file VideoPlayer.cs.

Member Function Documentation

int DShowNET.VideoPlayer.BufferCB ( double  SampleTime,
IntPtr  pBuffer,
int  BufferLen 
)
inline

Required public callback from DirectShow SampleGrabber. Do not call this method.

Implements DShowNET.ISampleGrabberCB.

Definition at line 525 of file VideoPlayer.cs.

virtual void DShowNET.VideoPlayer.Dispose ( )
inlinevirtual

Cleans up the Video Player. Must be called when finished with the player.

Reimplemented in VRageRender.MyVideoPlayer.

Definition at line 578 of file VideoPlayer.cs.

abstract void DShowNET.VideoPlayer.OnFrame ( byte[]  frameData)
protectedpure virtual

Implemented in VRageRender.MyVideoPlayer.

void DShowNET.VideoPlayer.Pause ( )
inline

Pauses the video

Definition at line 487 of file VideoPlayer.cs.

void DShowNET.VideoPlayer.Play ( )
inline

Starts playing the video

Definition at line 472 of file VideoPlayer.cs.

void DShowNET.VideoPlayer.Rewind ( )
inline

Rewinds the video to the start and plays it again

Definition at line 514 of file VideoPlayer.cs.

int DShowNET.VideoPlayer.SampleCB ( double  SampleTime,
IMediaSample  pSample 
)
inline

Required public callback from DirectShow SampleGrabber. Do not call this method.

Implements DShowNET.ISampleGrabberCB.

Definition at line 550 of file VideoPlayer.cs.

void DShowNET.VideoPlayer.Stop ( )
inline

Stops playing the video

Definition at line 499 of file VideoPlayer.cs.

void DShowNET.VideoPlayer.Update ( )
inline

Updates the Output Frame data using data from the video stream. Call this in Game.Update().

Definition at line 445 of file VideoPlayer.cs.

Property Documentation

byte DShowNET.VideoPlayer.AlphaTransparency
getset

Gets or sets how transparent the video frame is. Takes effect on the next frame after this is updated Max Value: 255 - Opaque Min Value: 0 - Transparent

Definition at line 312 of file VideoPlayer.cs.

double DShowNET.VideoPlayer.CurrentPosition
getset

Gets or Sets the current position of playback in seconds

Definition at line 148 of file VideoPlayer.cs.

string DShowNET.VideoPlayer.CurrentPositionAsTimeString
get

Returns the current position of playback, formatted as a time string (HH:MM:SS)

Definition at line 170 of file VideoPlayer.cs.

VideoState DShowNET.VideoPlayer.CurrentState
getset

Gets or Sets the current state of the video player

Definition at line 240 of file VideoPlayer.cs.

double DShowNET.VideoPlayer.Duration
get

Total duration in seconds

Definition at line 194 of file VideoPlayer.cs.

string DShowNET.VideoPlayer.DurationAsTimeString
get

Returns the duration of the video, formatted as a time string (HH:MM:SS)

Definition at line 205 of file VideoPlayer.cs.

string DShowNET.VideoPlayer.FileName
get

Currently Loaded Video File

Definition at line 229 of file VideoPlayer.cs.

int DShowNET.VideoPlayer.FramesPerSecond
get

Number of Frames Per Second in the video file. Returns -1 if this cannot be calculated.

Definition at line 278 of file VideoPlayer.cs.

bool DShowNET.VideoPlayer.IsDisposed
get

Is Disposed?

Definition at line 266 of file VideoPlayer.cs.

float DShowNET.VideoPlayer.MillisecondsPerFrame
get

The number of milliseconds between each frame Returns -1 if this cannot be calculated

Definition at line 295 of file VideoPlayer.cs.

int DShowNET.VideoPlayer.VideoHeight
get

Height of the loaded video

Definition at line 137 of file VideoPlayer.cs.

int DShowNET.VideoPlayer.VideoWidth
get

Width of the loaded video

Definition at line 126 of file VideoPlayer.cs.

float DShowNET.VideoPlayer.Volume
getset

Definition at line 558 of file VideoPlayer.cs.


The documentation for this class was generated from the following file: