| 1234567891011121314151617181920 |
- #ifndef PLAYBACK_H
- #define PLAYBACK_H
- #include "common.h"
- #include "isup_sdk.h"
- typedef enum { PB_STOPPED=0, PB_PLAYING, PB_PAUSED, PB_FINISHED } PlayState;
- typedef struct {
- int used; int id; int channel; char file[256];
- PlayState state; int64_t begin_ms,end_ms,cur_ms;
- uint64_t bytes_sent; void*sdk_handle; pthread_mutex_t lock;
- } PlaybackSession;
- int playback_init(void);
- int playback_start_listen(void);
- int playback_stop_listen(void);
- int playback_start(int channel,const char*file,int64_t begin,int64_t end,int*out_id);
- int playback_pause(int id);
- int playback_resume(int id);
- int playback_stop(int id);
- PlaybackSession* playback_get_session(int id);
- void playback_cleanup(void);
- #endif
|