C# Class HCS_Encoder.AudioCapture

Callback based audio capture class. This is pretty much an exact duplicate of VideoCapture, with a few audio-specific changes.
Inheritance: ISampleGrabberCB, IDisposable
ファイルを表示 Open project: i-e-b/HLS---Smooth-Encoder

Protected Properties

Property Type Description
m_BitsPerSample short
m_Channels short
m_IncrementTimecodes bool
m_MediaEvent IMediaEvent
m_SampleRate int
m_TimecodeBase double

Public Methods

Method Description
AudioCapture ( ) : System

Use capture device zero, default frame rate and size

AudioCapture ( int iDeviceNum ) : System

Use specified capture device, default frame rate and size

AudioCapture ( int iDeviceNum, int iSampleRate ) : System

Use specified capture device, specified frame rate and default size

AudioCapture ( int iDeviceNum, int iSampleRate, int iChannels ) : System

Use specified capture device, specified frame rate and default size

AudioCapture ( string Filename ) : System
Dispose ( ) : void

release everything.

IsCompleted ( ) : bool

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

Pause ( ) : void
Start ( ) : void

Protected Methods

Method Description
OnFrameAvailable ( object sender, AudioDataEventArgs 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
ISampleGrabberCB ( double SampleTime, IntPtr pBuffer, int BufferLen ) : int
SaveSizeInfo ( ISampleGrabber sampGrabber ) : void
SetConfigParms ( ICaptureGraphBuilder2 capGraph, IBaseFilter capFilter, int iSampleRate, int iChannels ) : void
SetupGraph ( DsDevice dev, int iSampleRate, int iChannels ) : void

build the capture graph for grabber.

SetupGraph ( string FileName ) : void
_Capture ( int iDeviceNum, int iSampleRate, int iChannels ) : void

Method Details

AudioCapture() public method

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

AudioCapture() public method

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

AudioCapture() public method

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

AudioCapture() public method

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

AudioCapture() public method

public AudioCapture ( string Filename ) : System
Filename string
return System

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, AudioDataEventArgs e ) : void
sender object
e AudioDataEventArgs
return void

Pause() public method

public Pause ( ) : void
return void

Start() public method

public Start ( ) : void
return void

Property Details

m_BitsPerSample protected_oe property

protected short m_BitsPerSample
return short

m_Channels protected_oe property

protected short m_Channels
return short

m_IncrementTimecodes protected_oe property

protected bool m_IncrementTimecodes
return bool

m_MediaEvent protected_oe property

protected IMediaEvent m_MediaEvent
return IMediaEvent

m_SampleRate protected_oe property

protected int m_SampleRate
return int

m_TimecodeBase protected_oe property

protected double m_TimecodeBase
return double