AudRecordLib
|
import "IAudRecord.idl";
Public Member Functions | |
HRESULT | Record ([in]struct _Endpoint *pDevice) |
HRESULT | ChangeCodec ([in]struct _CodecConfiguration *pNewCodec) |
HRESULT | TogglePause ([out, retval]AudPausedState *pState) |
HRESULT | QueryPause ([out, retval]AudPausedState *pState) |
HRESULT | Stop () |
HRESULT | AddFileTarget ([in]LPCWSTR pwszFileName,[out]PVOID *ppCookie) |
HRESULT | AddNetworkBroadcastTarget ([in, out]DWORD *pPort,[in]DWORD maxConnectors,[out]LPWSTR *ppwszUrl,[out]PVOID *ppCookie) |
HRESULT | AddCustomTarget ([in]IWMWriterSink *pTarget,[out]PVOID *ppCookie) |
HRESULT | RemoveTarget ([in]PVOID pTargetCookie) |
HRESULT | GetStatistics ([out]AudRecordStats *pStats) |
Exposes methods to control the recording of the live audio stream.
Controls a live recording session including codec configuration and file and network targets. Also provides methods for querying statistics and
HRESULT IAudRecord::AddCustomTarget | ( | [in] IWMWriterSink * | pTarget, |
[out] PVOID * | ppCookie | ||
) |
Adds a custom target to the recording process.
pTarget | A pointer to the IWMWriterSink | |
[out] | ppCookie | A pointer that receives a value that can be passed to RemoveTarget() to remove the target from the recording process |
Implemented in AudRecord.
HRESULT IAudRecord::AddFileTarget | ( | [in] LPCWSTR | pwszFileName, |
[out] PVOID * | ppCookie | ||
) |
Adds a file target to the recording process
Adds an additional file target to the recording session. If the file exists, it will be overwritten. A target can added at any time before or after Record() has been called.
pwszFileName | The WMA file to create | |
[out] | ppCookie | A pointer that receives a value that can be passed to RemoveTarget() to remove the target from the recording process |
Implemented in AudRecord.
HRESULT IAudRecord::AddNetworkBroadcastTarget | ( | [in, out] DWORD * | pPort, |
[in] DWORD | maxConnectors, | ||
[out] LPWSTR * | ppwszUrl, | ||
[out] PVOID * | ppCookie | ||
) |
Opens a port that clients can connect to and receive the recorded stream.
Adds a broadcasting target to the current recording session. A target can added at any time before or after Record() has been called.
[in,out] | pPort | Optional value that on input, specifies the port to bind to. On output, returns the port actually used. |
maxConnectors | The maximum number of clients that can connect to the stream, 5 is the default | |
[out] | ppwszUrl | Option pointer to a string that receives the full URL of the stream |
[out] | ppCookie | A pointer that receives a value that can be passed to RemoveTarget() to remove the target from the recording process |
Implemented in AudRecord.
HRESULT IAudRecord::ChangeCodec | ( | [in] struct _CodecConfiguration * | pNewCodec | ) |
Changes the compression parameters of the recording stream.
If the stream is currently recording it will be stopped, the compression changed then the stream started again. This will overwrite any files created by file targets. To alleviate this problem manually Stop() the stream, call ChangeCodec(), archive the files and then call Record() again with the same EndPoint
pNewCodec | The new codec compression configuration to set |
Implemented in AudRecord.
HRESULT IAudRecord::GetStatistics | ( | [out] AudRecordStats * | pStats | ) |
Retrieves the statistics for the recording session
[out] | pStats | A pointer to a struct to fill with the statistics |
Implemented in AudRecord.
HRESULT IAudRecord::QueryPause | ( | [out, retval] AudPausedState * | pState | ) |
Queries the state of the recording stream.
[out] | pState | Pointer to a value that receives the current state of the recording stream on function success. A nonzero value means the stream is recording, zero/FALSE indicates a paused state |
Implemented in AudRecord.
HRESULT IAudRecord::Record | ( | [in] struct _Endpoint * | pDevice | ) |
Starts recording from the specified endpoint
Starts a recording session capturing output from the specified endpoint. At least one file, network, or custom target must be set before calling this function.
pDevice | The device to capture from |
Implemented in AudRecord.
HRESULT IAudRecord::RemoveTarget | ( | [in] PVOID | pTargetCookie | ) |
Removes a target from the recording process.
If the cookie refers to a network target, the port it references is closed. If it refers to a file, the handle is released. If it refers to a custom sink, the reference count is decremented.
pTargetCookie | The cookie value returned by one of the Add*Target functions |
Implemented in AudRecord.
HRESULT IAudRecord::Stop | ( | ) |
HRESULT IAudRecord::TogglePause | ( | [out, retval] AudPausedState * | pState | ) |
Pauses/resumes the recording.
If the current state of the stream is recording, this function stops collecting samples from the endpoint but leaves the recording session open, so it can be resumed by calling this function again. If the stream is paused, the function begins collecting samples again and writing them to the targets
[out] | pState | Optional pointer to a value that receives the current state of the recording stream on function success. A nonzero value means the stream is recording, zero/FALSE indicates a paused state |
Implemented in AudRecord.