SfxStreamHandlerInterface.h
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#ifndef __SFX__SfxStreamHandlerInterface__MODULE__
#define __SFX__SfxStreamHandlerInterface__MODULE__
#include "SfxMediaStd.h"
#ifdef __cplusplus
extern "C"
{
#endif
#ifdef SFX_WIN
#ifdef SFX_EXPORT_SHARE_LIB
#define SFX_EXPORT_LIB __declspec(dllexport)
#else
#define SFX_EXPORT_LIB __declspec(dllimport)
#endif
#endif
#ifdef SFX_LINUX
#define SFX_EXPORT_LIB
#endif
#pragma pack(1)
typedef struct SfxStreamHandlerFlags
{
sfx_u32 outFrameIndex:1;
sfx_u32 preposeFrameCount:1;
sfx_u32 useFastDecode:1;
sfx_u32 skipFrame:6;
sfx_u32 accelId:5;
sfx_u32 frameNumber:1;
sfx_u32 reserved:17;
sfx_u8 fmt; // SfxVideoFormat
sfx_u8 reserved1[63];
}SfxStreamHandlerFlags;
typedef struct SfxStreamHandlerConfig
{
SfxLogHandler log;
const sfx_void * userPtr;
SfxElementaryStreamCallback escb;
SfxStreamHandlerFlags flags;
}SfxStreamHandlerConfig;
typedef struct SfxStreamHandlerStatistics
{
sfx_u32 frameNumber;
sfx_u32 frameCache;
sfx_u8 reserved[504];
}SfxStreamHandlerStatistics;
#pragma pack()
#define SFX_STREAM_HANDLER_CONFIG_INTERFACE 1
class SfxStreamHandlerConfigInterface
{
public:
SfxStreamHandlerConfigInterface(){};
virtual ~SfxStreamHandlerConfigInterface(){};
virtual sfx_void SfxSetupCachePath( const sfx_8 * path ) = 0;
virtual sfx_u32 SfxGetFrameNumber() = 0;
};
class SFX_EXPORT_LIB SfxStreamHandlerInterface
{
public:
SfxStreamHandlerInterface();
virtual ~SfxStreamHandlerInterface();
static sfx_32 SfxInitialize( sfx_u32 maxChannel );
static sfx_void SfxUninitialize();
static SfxStreamHandlerInterface * SfxGetInstance( const SfxStreamHandlerConfig * cfg );
static sfx_void SfxReleaseInstance( SfxStreamHandlerInterface * ins );
static sfx_bool SfxCheckCompatible( const sfx_8 * uri );
virtual sfx_32 SfxOpenStreamHandler( const sfx_8 * uri ) = 0;
virtual sfx_void SfxCloseStreamHandler() = 0;
virtual sfx_void SfxGetStatistics( SfxStreamHandlerStatistics * statistics ) = 0;
virtual sfx_32 SfxQueryInterface( sfx_u32 fid, sfx_void ** ptr ) = 0;
};
#ifdef __cplusplus
}
#endif
#endif