C# 클래스 ScreenToGif.Webcam.DirectX.CaptureWebcam

Gets the video output of a webcam or other video device.
상속: EditStreaming.ISampleGrabberCB, IDisposable
파일 보기 프로젝트 열기: dbremner/ScreenToGif 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
ActualGraphState GraphState
CaptureGraphBuilder ExtendStreaming.ICaptureGraphBuilder2
GraphBuilder ExtendStreaming.IGraphBuilder
IsPreviewRendered bool
MediaControl ControlStreaming.IMediaControl
SampGrabber EditStreaming.ISampleGrabber
VideoCompressor Filter
VideoCompressorFilter CoreStreaming.IBaseFilter
VideoDeviceFilter CoreStreaming.IBaseFilter
VideoStreamConfig ExtendStreaming.IAMStreamConfig
VideoWindow ControlStreaming.IVideoWindow
WantPreviewRendered bool

공개 메소드들

메소드 설명
BufferCB ( double SampleTime, IntPtr pBuffer, int BufferLen ) : int
CaptureWebcam ( Filter videoDevice ) : System

Default constructor of the Capture class.

Dispose ( ) : void

Closes and cleans the video previewing.

GetFrame ( ) : Bitmap

Gets the current frame from the buffer.

PrepareCapture ( ) : void

Prepares the capture of frames.

SampleCB ( double SampleTime, CoreStreaming pSample ) : int
StartPreview ( ) : void

Starts the video preview from the video source.

StopPreview ( ) : void

Stops the video previewing.

보호된 메소드들

메소드 설명
CreateGraph ( ) : void

Create a new filter graph and add filters (devices, compressors, misc), but leave the filters unconnected. Call RenderGraph() to connect the filters.

DerenderGraph ( ) : void

Disconnect and remove all filters except the device and compressor filters. This is the opposite of renderGraph(). Soem properties such as FrameRate can only be set when the device output pins are not connected.

DestroyGraph ( ) : void

Completely tear down a filter graph and release all associated resources.

OnPreviewWindowResize ( object sender, EventArgs e ) : void

Resize the preview when the PreviewWindow is resized

RemoveDownstream ( CoreStreaming filter, bool removeFirstFilter ) : void

Removes all filters downstream from a filter from the graph. This is called only by DerenderGraph() to remove everything from the graph except the devices and compressors. The parameter "removeFirstFilter" is used to keep a compressor (that should be immediately downstream of the device) if one is begin used.

RenderGraph ( ) : void

Connects the filters of a previously created graph (created by CreateGraph()). Once rendered the graph is ready to be used. This method may also destroy streams if we have streams we no longer want.

StartPreviewIfNeeded ( ) : void

Setup and start the preview window if the user has requested it (by setting PreviewWindow).

메소드 상세

BufferCB() 공개 메소드

public BufferCB ( double SampleTime, IntPtr pBuffer, int BufferLen ) : int
SampleTime double
pBuffer System.IntPtr
BufferLen int
리턴 int

CaptureWebcam() 공개 메소드

Default constructor of the Capture class.
If no video device is provided.
public CaptureWebcam ( Filter videoDevice ) : System
videoDevice Filter The video device to be the source.
리턴 System

CreateGraph() 보호된 메소드

Create a new filter graph and add filters (devices, compressors, misc), but leave the filters unconnected. Call RenderGraph() to connect the filters.
protected CreateGraph ( ) : void
리턴 void

DerenderGraph() 보호된 메소드

Disconnect and remove all filters except the device and compressor filters. This is the opposite of renderGraph(). Soem properties such as FrameRate can only be set when the device output pins are not connected.
protected DerenderGraph ( ) : void
리턴 void

DestroyGraph() 보호된 메소드

Completely tear down a filter graph and release all associated resources.
protected DestroyGraph ( ) : void
리턴 void

Dispose() 공개 메소드

Closes and cleans the video previewing.
public Dispose ( ) : void
리턴 void

GetFrame() 공개 메소드

Gets the current frame from the buffer.
public GetFrame ( ) : Bitmap
리턴 System.Drawing.Bitmap

OnPreviewWindowResize() 보호된 메소드

Resize the preview when the PreviewWindow is resized
protected OnPreviewWindowResize ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
리턴 void

PrepareCapture() 공개 메소드

Prepares the capture of frames.
public PrepareCapture ( ) : void
리턴 void

RemoveDownstream() 보호된 메소드

Removes all filters downstream from a filter from the graph. This is called only by DerenderGraph() to remove everything from the graph except the devices and compressors. The parameter "removeFirstFilter" is used to keep a compressor (that should be immediately downstream of the device) if one is begin used.
protected RemoveDownstream ( CoreStreaming filter, bool removeFirstFilter ) : void
filter CoreStreaming
removeFirstFilter bool
리턴 void

RenderGraph() 보호된 메소드

Connects the filters of a previously created graph (created by CreateGraph()). Once rendered the graph is ready to be used. This method may also destroy streams if we have streams we no longer want.
protected RenderGraph ( ) : void
리턴 void

SampleCB() 공개 메소드

public SampleCB ( double SampleTime, CoreStreaming pSample ) : int
SampleTime double
pSample CoreStreaming
리턴 int

StartPreview() 공개 메소드

Starts the video preview from the video source.
public StartPreview ( ) : void
리턴 void

StartPreviewIfNeeded() 보호된 메소드

Setup and start the preview window if the user has requested it (by setting PreviewWindow).
protected StartPreviewIfNeeded ( ) : void
리턴 void

StopPreview() 공개 메소드

Stops the video previewing.
public StopPreview ( ) : void
리턴 void

프로퍼티 상세

ActualGraphState 보호되어 있는 프로퍼티

State of the internal filter graph.
protected GraphState ActualGraphState
리턴 GraphState

CaptureGraphBuilder 보호되어 있는 프로퍼티

DShow Filter: building graphs for capturing video.
protected ExtendStreaming.ICaptureGraphBuilder2 CaptureGraphBuilder
리턴 ExtendStreaming.ICaptureGraphBuilder2

GraphBuilder 보호되어 있는 프로퍼티

DShow Filter: Graph builder.
protected ExtendStreaming.IGraphBuilder GraphBuilder
리턴 ExtendStreaming.IGraphBuilder

IsPreviewRendered 보호되어 있는 프로퍼티

When graphState==Rendered, have we rendered the preview stream?
protected bool IsPreviewRendered
리턴 bool

MediaControl 보호되어 있는 프로퍼티

DShow Filter: Start/Stop the filter graph -> copy of graphBuilder.
protected ControlStreaming.IMediaControl MediaControl
리턴 ControlStreaming.IMediaControl

SampGrabber 보호되어 있는 프로퍼티

protected EditStreaming.ISampleGrabber SampGrabber
리턴 EditStreaming.ISampleGrabber

VideoCompressor 보호되어 있는 프로퍼티

Property Backer: Video compression filter.
protected Filter,ScreenToGif.Webcam.DirectX VideoCompressor
리턴 Filter

VideoCompressorFilter 보호되어 있는 프로퍼티

DShow Filter: selected video compressor.
protected CoreStreaming.IBaseFilter VideoCompressorFilter
리턴 CoreStreaming.IBaseFilter

VideoDeviceFilter 보호되어 있는 프로퍼티

DShow Filter: selected video device.
protected CoreStreaming.IBaseFilter VideoDeviceFilter
리턴 CoreStreaming.IBaseFilter

VideoStreamConfig 보호되어 있는 프로퍼티

DShow Filter: configure frame rate, size.
protected ExtendStreaming.IAMStreamConfig VideoStreamConfig
리턴 ExtendStreaming.IAMStreamConfig

VideoWindow 보호되어 있는 프로퍼티

DShow Filter: Control preview window -> copy of graphBuilder.
protected ControlStreaming.IVideoWindow VideoWindow
리턴 ControlStreaming.IVideoWindow

WantPreviewRendered 보호되어 있는 프로퍼티

Do we need the preview stream rendered (VideoDevice and PreviewWindow != null)
protected bool WantPreviewRendered
리턴 bool