-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathistb_m3u8.h
48 lines (36 loc) · 1.23 KB
/
istb_m3u8.h
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
#ifndef ISTB_M3U8_H
#define ISTB_M3U8_H
#ifdef __cplusplus
extern "C" {
#endif
#define M3U8_DEBUG
#ifdef M3U8_DEBUG
#define m3u8DBG(format,args...) \
do{ \
printf("m3u8DBG[%s:%d]:"format"",__FUNCTION__,__LINE__,##args);\
}while(0)
#else
#define m3u8DBG(format,args...) do{}while(0)
#endif
typedef enum
{
M3U8_SEGMENT_READY = 0,
M3U8_SEGMENT_FINISH = 1,
};
typedef int (*READ_DATA_FUN) (void *opaque, uint8_t *buf, int buf_size);
typedef int (*WRITE_DATA_FUN) (void *opaque, uint8_t *buf, int buf_size);
typedef int (*M3U8_EVENT_CALLBACK)(int eventtype);
pthread_t istb_m3u8_start(char * optionstrings, READ_DATA_FUN read_data_fun);
int istb_m3u8_event_subscribe(M3U8_EVENT_CALLBACK Callback);
int istb_m3u8_event_report(int eventtype);
int istb_m3u8_stop(pthread_t tid);
int istb_m3u8_segment_get(char *filename,char * readbuf, int readlen);
void * istb_m3u8_api_open(char *fifoname,int * bufferlen);
int istb_m3u8_api_read(void *fifohandle,char *buf, int readlen);
int istb_m3u8_api_write(void *fifohandle,char *buf, int writelen);
int istb_m3u8_api_close(void *fifohandle);
int istb_m3u8_api_seek (void *fifohandle, int offset,int fromwhere);
#ifdef __cplusplus
}
#endif
#endif