C# Class HCS_Encoder.VideoCapture

Callback based video capture class
Inheritance: ISampleGrabberCB, IDisposable
ファイルを表示 Open project: i-e-b/HLS---Smooth-Encoder

Public Properties

Property Type Description
m_Dropped int
m_MediaEvent IMediaEvent
m_frameRate int

Protected Properties

Property Type Description
m_IncrementTimecodes bool
m_TimecodeBase double

Public Methods

Method Description
Dispose ( ) : void

release everything.

IsCompleted ( ) : bool

Check if source media has ended. Only makes sense for file input.

Pause ( ) : void
Start ( ) : void
VideoCapture ( ) : System

Use capture device zero, default frame rate and size

VideoCapture ( int iDeviceNum ) : System

Use specified capture device, default frame rate and size

VideoCapture ( int iDeviceNum, int iFrameRate ) : System

Use specified capture device, specified frame rate and default size

VideoCapture ( int iDeviceNum, int iFrameRate, int iWidth, int iHeight ) : System

Use specified capture device, specified frame rate and size

VideoCapture ( string Filename ) : System

Start a frame-by-frame capture of a source file. Must be one that can be played in Windows Media Player.

Protected Methods

Method Description
OnFrameAvailable ( object sender, VideoDataEventArgs e ) : void

Private Methods

Method Description
CloseInterfaces ( ) : void

Shut down capture

ConfigureSampleGrabber ( ISampleGrabber sampGrabber ) : void
CopyMemory ( IntPtr Destination, IntPtr Source, int Length ) : void
ISampleGrabberCB ( double SampleTime, IMediaSample pSample ) : int

sample callback, NOT USED.

ISampleGrabberCB ( double SampleTime, IntPtr pBuffer, int BufferLen ) : int

buffer callback, COULD BE FROM FOREIGN THREAD.

RescaleToTargetSize ( IntPtr pBuffer ) : Bitmap

Scale a 24bpp interleaved image into another 24bpp interleaved image.

SaveSizeInfo ( ISampleGrabber sampGrabber ) : void
SetConfigParms ( ICaptureGraphBuilder2 capGraph, IBaseFilter capFilter, int iFrameRate, int iWidth, int iHeight ) : void
SetupGraph ( DsDevice dev, int iFrameRate, int iWidth, int iHeight ) : void

build the capture graph for grabber.

SetupGraph ( string FileName ) : void
VideoIndex ( IPin pPin ) : int
_Capture ( int iDeviceNum, int iFrameRate, int iWidth, int iHeight ) : void

Method Details

Dispose() public method

release everything.
public Dispose ( ) : void
return void

IsCompleted() public method

Check if source media has ended. Only makes sense for file input.
public IsCompleted ( ) : bool
return bool

OnFrameAvailable() protected method

protected OnFrameAvailable ( object sender, VideoDataEventArgs e ) : void
sender object
e VideoDataEventArgs
return void

Pause() public method

public Pause ( ) : void
return void

Start() public method

public Start ( ) : void
return void

VideoCapture() public method

Use capture device zero, default frame rate and size
public VideoCapture ( ) : System
return System

VideoCapture() public method

Use specified capture device, default frame rate and size
public VideoCapture ( int iDeviceNum ) : System
iDeviceNum int
return System

VideoCapture() public method

Use specified capture device, specified frame rate and default size
public VideoCapture ( int iDeviceNum, int iFrameRate ) : System
iDeviceNum int
iFrameRate int
return System

VideoCapture() public method

Use specified capture device, specified frame rate and size
public VideoCapture ( int iDeviceNum, int iFrameRate, int iWidth, int iHeight ) : System
iDeviceNum int
iFrameRate int
iWidth int
iHeight int
return System

VideoCapture() public method

Start a frame-by-frame capture of a source file. Must be one that can be played in Windows Media Player.
public VideoCapture ( string Filename ) : System
Filename string
return System

Property Details

m_Dropped public_oe property

public int m_Dropped
return int

m_IncrementTimecodes protected_oe property

protected bool m_IncrementTimecodes
return bool

m_MediaEvent public_oe property

public IMediaEvent m_MediaEvent
return IMediaEvent

m_TimecodeBase protected_oe property

protected double m_TimecodeBase
return double

m_frameRate public_oe property

public int m_frameRate
return int