Agora Java API Reference for Android
|
9 #pragma once // NOLINT(build/header_guard)
12 #include "AgoraBase.h"
13 #include "AgoraMediaBase.h"
14 #include "AgoraMediaPlayerTypes.h"
15 #include "AgoraRefPtr.h"
21 class IMediaStreamingSourceObserver;
28 enum STREAMING_SRC_ERR {
29 STREAMING_SRC_ERR_NONE = 0,
30 STREAMING_SRC_ERR_UNKNOWN = 1,
31 STREAMING_SRC_ERR_INVALID_PARAM = 2,
32 STREAMING_SRC_ERR_BAD_STATE = 3,
33 STREAMING_SRC_ERR_NO_MEM = 4,
34 STREAMING_SRC_ERR_BUFFER_OVERFLOW = 5,
35 STREAMING_SRC_ERR_BUFFER_UNDERFLOW = 6,
36 STREAMING_SRC_ERR_NOT_FOUND = 7,
37 STREAMING_SRC_ERR_TIMEOUT = 8,
38 STREAMING_SRC_ERR_EXPIRED = 9,
39 STREAMING_SRC_ERR_UNSUPPORTED = 10,
40 STREAMING_SRC_ERR_NOT_EXIST = 11,
41 STREAMING_SRC_ERR_EXIST = 12,
42 STREAMING_SRC_ERR_OPEN = 13,
43 STREAMING_SRC_ERR_CLOSE = 14,
44 STREAMING_SRC_ERR_READ = 15,
45 STREAMING_SRC_ERR_WRITE = 16,
46 STREAMING_SRC_ERR_SEEK = 17,
47 STREAMING_SRC_ERR_EOF = 18,
48 STREAMING_SRC_ERR_CODECOPEN = 19,
49 STREAMING_SRC_ERR_CODECCLOSE = 20,
50 STREAMING_SRC_ERR_CODECPROC = 21,
59 enum STREAMING_SRC_STATE {
60 STREAMING_SRC_STATE_CLOSED = 0,
61 STREAMING_SRC_STATE_OPENING = 1,
62 STREAMING_SRC_STATE_IDLE = 2,
63 STREAMING_SRC_STATE_PLAYING = 3,
64 STREAMING_SRC_STATE_SEEKING = 4,
65 STREAMING_SRC_STATE_EOF = 5,
66 STREAMING_SRC_STATE_ERROR = 6,
103 virtual int open(
const char* url, int64_t start_pos,
bool auto_play =
true) = 0;
205 virtual int seek(int64_t new_pos) = 0;
287 virtual void onStateChanged(STREAMING_SRC_STATE state, STREAMING_SRC_ERR err_code) = 0;
308 virtual void onEofOnce(int64_t progress_ms, int64_t repeat_count) = 0;
Definition: AgoraRefPtr.h:31