webOS Userland
Native system APIs for webOS
 
Loading...
Searching...
No Matches
AcbAPI.h
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7#include <stdbool.h>
8
9typedef void (*AcbAPI_Callback)(long acbId, long taskId, long eventType, long appState, long playState, const char *reply);
10
11typedef enum AcbAPI_PlayerType
12{
13 PLAYER_TYPE_GROUP = 0,
14 PLAYER_TYPE_VIDEO = 0,
15 PLAYER_TYPE_VIDEO_UNMUTED_AFTER_PLAYING = 1,
16 PLAYER_TYPE_AUDIO,
17 PLAYER_TYPE_HTML5_AUDIO,
18 PLAYER_TYPE_TV,
19 PLAYER_TYPE_EXT_INPUT,
20 PLAYER_TYPE_DVR,
21 PLAYER_TYPE_VCS,
22 PLAYER_TYPE_DIRECT_VIDEO,
23 PLAYER_TYPE_DIRECT_AUDIO,
24 PLAYER_TYPE_MSE,
25 PLAYER_TYPE_QT_DVR,
26 PLAYER_TYPE_PHOTO,
27} AcbAPI_PlayerType;
28
29typedef enum AcbAPI_SinkType
30{
31 SINK_TYPE_MAIN = 0,
32 SINK_TYPE_SUB = 1,
33} AcbAPI_SinkType;
34
35typedef enum AcbAPI_AppState
36{
37 APPSTATE_INITIALIZED = 0,
38 APPSTATE_FOREGROUND = 1,
39 APPSTATE_BACKGROUND = 2,
40} AcbAPI_AppState;
41
42typedef enum AcbAPI_PlayState
43{
44 PLAYSTATE_UNLOADED = 0,
45 PLAYSTATE_LOADED = 1,
46 PLAYSTATE_PLAYING = 2,
47 PLAYSTATE_PAUSED = 3,
48} AcbAPI_PlayState;
49
50long AcbAPI_create(void);
51
52bool AcbAPI_initialize(long acbId, AcbAPI_PlayerType playerType, const char *appId, AcbAPI_Callback callback);
53
54bool AcbAPI_setMediaId(long acbId, const char *connId);
55
56bool AcbAPI_setSinkType(long acbId, AcbAPI_SinkType sinkType);
57
58int AcbAPI_setMediaAudioData(long acbId, const char *payload, long *taskId);
59
60int AcbAPI_setMediaVideoData(long acbId, const char *payload, long *taskId);
61
62int AcbAPI_setState(long acbId, AcbAPI_AppState appState, AcbAPI_PlayState playState, long *taskId);
63
64int AcbAPI_setDisplayWindow(long acbId, long x, long y, long w, long h, bool fullScreen, long *taskId);
65
66int AcbAPI_setCustomDisplayWindow(long acbId, long in_x, long in_y, long in_w, long in_h, long out_x, long out_y, long out_w, long out_h, bool fullScreen, long *taskId);
67
68int AcbAPI_startMute(long acbId, bool audio, bool video, long *taskId);
69
70int AcbAPI_stopMute(long acbId, bool audio, bool video, long *taskId);
71
72int AcbAPI_finalize(long acbId);
73
74void AcbAPI_destroy(long acbId);
75
76#ifdef __cplusplus
77}
78#endif