📄 sbe.idl
字号:
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingCopyrightURL[] =L\"CopyrightURL\";" )
cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// Optional attributes, used to give information " )
cpp_quote( "// about video stream properties." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAspectRatioX[] =L\"AspectRatioX\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingAspectRatioY[] =L\"AspectRatioY\";" )
cpp_quote( "////////////////////////////////////////////////////////////////" )
cpp_quote( "//" )
cpp_quote( "// The NSC file supports the following attributes." )
cpp_quote( "//" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCName[] =L\"NSC_Name\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCAddress[] =L\"NSC_Address\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCPhone[] =L\"NSC_Phone\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCEmail[] =L\"NSC_Email\";" )
cpp_quote( "static const WCHAR g_wszStreamBufferRecordingNSCDescription[] =L\"NSC_Description\";" )
cpp_quote( "" )
//
// StreamBuffer Attribute datatypes;
//
typedef enum {
STREAMBUFFER_TYPE_DWORD = 0,
STREAMBUFFER_TYPE_STRING = 1,
STREAMBUFFER_TYPE_BINARY = 2,
STREAMBUFFER_TYPE_BOOL = 3,
STREAMBUFFER_TYPE_QWORD = 4,
STREAMBUFFER_TYPE_WORD = 5,
STREAMBUFFER_TYPE_GUID = 6,
} STREAMBUFFER_ATTR_DATATYPE ;
[
object,
uuid(16CA4E03-FE69-4705-BD41-5B7DFC0C95F3),
pointer_default(unique)
]
interface IStreamBufferRecordingAttribute : IUnknown
{
/*++
------------------------------------------------------------------------
SetAttribute ()
1. Sets an attribute on a recording object;
2. Fails if the IStreamBufferRecordControl::Start has already been successfully
called;
3. If an attribute of the same name already exists, overwrites the old;
--*/
HRESULT
SetAttribute (
[in] ULONG ulReserved,
[in] LPCWSTR pszAttributeName,
[in] STREAMBUFFER_ATTR_DATATYPE StreamBufferAttributeType,
[in] BYTE * pbAttribute,
[in] WORD cbAttributeLength
) ;
/*++
------------------------------------------------------------------------
GetAttributeCount ()
1. Returns the count of attributes currently set;
--*/
HRESULT
GetAttributeCount (
[in] ULONG ulReserved,
[out] WORD * pcAttributes
) ;
/*++
------------------------------------------------------------------------
GetAttributeByName ()
1. Given a name, returns the attribute data;
2. If the provided buffer is too small, returns VFW_E_BUFFER_OVERFLOW,
and (* pcbLength) contains the minimum required length of the buffer
3. To learn the length of the attribute, pass in non-NULL pcbLength,
and NULL pbAttribute parameter; [out] value will be the length of
the attribute
--*/
HRESULT
GetAttributeByName (
[in] LPCWSTR pszAttributeName,
[in] ULONG * pulReserved,
[out] STREAMBUFFER_ATTR_DATATYPE * pStreamBufferAttributeType,
[out] BYTE * pbAttribute,
[in, out] WORD * pcbLength
) ;
/*++
------------------------------------------------------------------------
GetAttributeByIndex ()
1. Given an 0-based index, returns the attribute name and data
2. If either buffer is too small, returns VFW_E_BUFFER_OVERFLOW, and
(* pcbLength) and (* pcchNameLength) contain the minimum required
length of each buffer
3. The length returned by pcchNameLength includes the null-terminator
4. To learn the length of the name & attribute, pass in non-NULL
pcchNameLength & pcbLength, and NULL pszAttributeName & pbAttribute
parameters; [out] value of the non-NULL parameters will be the
lengths of the name and attribute
--*/
HRESULT
GetAttributeByIndex (
[in] WORD wIndex,
[in] ULONG * pulReserved,
[out] WCHAR * pszAttributeName,
[in, out] WORD * pcchNameLength, // includes NULL-terminator; in BYTES
[out] STREAMBUFFER_ATTR_DATATYPE * pStreamBufferAttributeType,
[out] BYTE * pbAttribute,
[in, out] WORD * pcbLength
) ;
/*++
------------------------------------------------------------------------
EnumAttributes ()
1. Returns a StreamBuffer attribute enumeration object that snapshots
the attributes at time-of-call
--*/
HRESULT
EnumAttributes (
[out] IEnumStreamBufferRecordingAttrib ** ppIEnumStreamBufferAttrib
) ;
} ;
/*++
============================================================================
============================================================================
IEnumStreamBufferRecordingAttrib
obtained by calling IStreamBufferRecordingAttribute::EnumAttributes, or
calling clone on this interface
--*/
typedef struct {
LPWSTR pszName ; // allocated by callee; freed by caller
STREAMBUFFER_ATTR_DATATYPE StreamBufferAttributeType ;
BYTE * pbAttribute ; // allocated by callee; freed by caller
WORD cbLength ;
} STREAMBUFFER_ATTRIBUTE ;
[
object,
uuid (C18A9162-1E82-4142-8C73-5690FA62FE33),
pointer_default(unique)
]
interface IEnumStreamBufferRecordingAttrib : IUnknown
{
HRESULT
Next (
[in] ULONG cRequest,
[in, out, size_is (cRequest)] STREAMBUFFER_ATTRIBUTE * pStreamBufferAttribute,
[out] ULONG * pcReceived
) ;
HRESULT
Skip (
[in] ULONG cRecords
) ;
HRESULT
Reset (
) ;
HRESULT
Clone (
[out] IEnumStreamBufferRecordingAttrib ** ppIEnumStreamBufferAttrib
) ;
} ;
/*++
============================================================================
============================================================================
IStreamBufferConfigure
--*/
[
object,
uuid(ce14dfae-4098-4af7-bbf7-d6511f835414),
pointer_default(unique)
]
interface IStreamBufferConfigure : IUnknown
{
/*++
------------------------------------------------------------------------
SetStreamBufferDirectory ()
1. Sets the directory where all content is saved, ringbuffer &
StreamBuffer;
2. Creates directory if necessary;
3. All TEMP files have hidden+system attributes
--*/
HRESULT
SetDirectory (
[in] LPCWSTR pszDirectoryName
) ;
/*++
------------------------------------------------------------------------
GetStreamBufferDirectory ()
1. Retrieves previously set backing store directory, or default
location if none was specified
--*/
HRESULT
GetDirectory (
[out] LPWSTR * ppszDirectoryName
) ;
/*++
------------------------------------------------------------------------
SetBackingFileCount ()
1. Sets the number of backing files
2. valid values
4 <= min <= 100
6 <= max <= 102
min max delta >= 2
--*/
HRESULT
SetBackingFileCount (
[in] DWORD dwMin,
[in] DWORD dwMax
) ;
/*++
------------------------------------------------------------------------
GetBackingFileCount ()
1. Retrieves previously set backing file counts, or defaults if none
have have been set
--*/
HRESULT
GetBackingFileCount (
[out] DWORD * pdwMin,
[out] DWORD * pdwMax
) ;
/*++
------------------------------------------------------------------------
SetEachBackingFileDuration ()
1. Sets the seconds of content each backing file will hold
2. valid values:
dwSeconds >= 15
--*/
HRESULT
SetBackingFileDuration (
[in] DWORD dwSeconds
) ;
/*++
------------------------------------------------------------------------
GetEachBackingFileDuration ()
1. Retrieves previously set backing file duration, or default of none
is set
--*/
HRESULT
GetBackingFileDuration (
[out] DWORD * pdwSeconds
) ;
} ;
/*++
============================================================================
============================================================================
IStreamBufferMediaSeeking
Implemented on the StreamBufferSource filter. Used to seek and set the
playback rate.
--*/
[
object,
uuid(f61f5c26-863d-4afa-b0ba-2f81dc978596),
pointer_default(unique)
]
interface IStreamBufferMediaSeeking : IMediaSeeking
{
// no additional methods have been added
} ;
/*++
============================================================================
============================================================================
events
--*/
// see evcode.h comment for range
// stream buffer engine (PVR) 0x0326 - 0x0350 (sbe.idl)
cpp_quote ("#define STREAMBUFFER_EC_BASE 0x0326")
cpp_quote ("enum {")
cpp_quote (" // timehole event")
cpp_quote (" // param1 = timehole stream offset ms")
cpp_quote (" // param1 = timehole size ms")
cpp_quote (" STREAMBUFFER_EC_TIMEHOLE = STREAMBUFFER_EC_BASE,")
cpp_quote (" ")
cpp_quote (" STREAMBUFFER_EC_STALE_DATA_READ,")
cpp_quote (" ")
cpp_quote (" STREAMBUFFER_EC_STALE_FILE_DELETED,")
cpp_quote (" STREAMBUFFER_EC_CONTENT_BECOMING_STALE,")
cpp_quote (" STREAMBUFFER_EC_WRITE_FAILURE,")
cpp_quote (" //")
cpp_quote (" // unexpected read failure")
cpp_quote (" // param1 = HRESULT failure")
cpp_quote (" // param2 = undefined")
cpp_quote (" STREAMBUFFER_EC_READ_FAILURE,")
cpp_quote (" //")
cpp_quote (" // playback rate change")
cpp_quote (" // param1 = old_playback_rate * 10000 e.g. 2x is 20000")
cpp_quote (" // param2 = new_playback_rate * 10000")
cpp_quote (" STREAMBUFFER_EC_RATE_CHANGED,")
cpp_quote ("} ;")
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -