blob: 43b9d2bb1c1c16826a80a8cba4f1ce856b100f0a (
plain)
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
|
#ifndef KITSOURCE_H
#define KITSOURCE_H
#include "kitchensink/kitconfig.h"
#ifdef __cplusplus
extern "C" {
#endif
#define KIT_CODECNAMESIZE 32
#define KIT_CODECLONGNAMESIZE 128
typedef enum Kit_streamtype {
KIT_STREAMTYPE_UNKNOWN,
KIT_STREAMTYPE_VIDEO,
KIT_STREAMTYPE_AUDIO,
KIT_STREAMTYPE_DATA,
KIT_STREAMTYPE_SUBTITLE,
KIT_STREAMTYPE_ATTACHMENT
} Kit_streamtype;
typedef struct Kit_Source {
int astream_idx;
int vstream_idx;
void *format_ctx;
} Kit_Source;
typedef struct Kit_Stream {
int index;
Kit_streamtype type;
} Kit_StreamInfo;
KIT_API Kit_Source* Kit_CreateSourceFromUrl(const char *path);
KIT_API void Kit_CloseSource(Kit_Source *src);
KIT_API int Kit_GetSourceStreamInfo(const Kit_Source *src, Kit_StreamInfo *info, int index);
KIT_API int Kit_GetSourceStreamCount(const Kit_Source *src);
KIT_API int Kit_GetBestSourceStream(const Kit_Source *src, const Kit_streamtype type);
KIT_API int Kit_SetSourceStream(Kit_Source *src, const Kit_streamtype type, int index);
KIT_API int Kit_GetSourceStream(const Kit_Source *src, const Kit_streamtype type);
#ifdef __cplusplus
}
#endif
#endif // KITSOURCE_H
|