webOS Userland
Native system APIs for webOS
 
Loading...
Searching...
No Matches
esplayer-api.h
1/*
2 * Copyright (c) 2008-2018 LG Electronics, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9
10
11
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17
18 * SPDX-License-Identifier: Apache-2.0
19 */
20
21#ifndef NDL_DIRECTMEDIA2_ESPLAYER_API_H_
22#define NDL_DIRECTMEDIA2_ESPLAYER_API_H_
23
24#include <stdint.h>
25#include <stddef.h>
26#include "ndl-directmedia2/media-common.h"
27#include "ndl-directmedia2/states.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33 typedef void* NDL_EsplayerHandle;
34 typedef void NDL_EsplayerCallback(NDL_ESP_EVENT event, void* playerdata, void* userdata);
36
44 NDL_EsplayerHandle NDL_EsplayerCreate(const char* appid, NDL_EsplayerCallback callback, void* userdata);
45
49 void NDL_EsplayerDestroy(NDL_EsplayerHandle player);
50
58 int NDL_EsplayerGetConnectionId(NDL_EsplayerHandle player, char* buf, size_t buf_len);
59
66 int NDL_EsplayerLoad(NDL_EsplayerHandle player, NDL_ESP_META_DATA* meta);
67
74 int NDL_EsplayerLoadEx(NDL_EsplayerHandle player, NDL_ESP_META_DATA* meta, NDL_ESP_PTS_UNITS units);
75
80 int NDL_EsplayerUnload(NDL_EsplayerHandle player);
81
87 int NDL_EsplayerPlay(NDL_EsplayerHandle player);
88
94 int NDL_EsplayerPause(NDL_EsplayerHandle player);
95
103 int NDL_EsplayerFeedData(NDL_EsplayerHandle player, NDL_EsplayerBuffer buff);
104
110 int NDL_EsplayerStepFrame(NDL_EsplayerHandle player);
111
118 int NDL_EsplayerFlush(NDL_EsplayerHandle player);
119
125 int NDL_EsplayerGetBufferLevel(NDL_EsplayerHandle player, NDL_ESP_STREAM_T type, uint32_t * level);
126
130 NDL_ESP_STATUS NDL_EsplayerGetStatus(NDL_EsplayerHandle player);
131
135 int NDL_EsplayerGetMediatime(NDL_EsplayerHandle player, int64_t* start_time, int64_t* current_time);
136
142 int NDL_EsplayerSetPlaybackRate(NDL_EsplayerHandle player, int rate);
143
149 int NDL_EsplayerReloadAudio(NDL_EsplayerHandle player, NDL_ESP_META_DATA* meta);
150
157 int NDL_EsplayerSetVideoDisplayWindow(NDL_EsplayerHandle player,
158 long left, long top, long width, long height, int isFullScreen);
159
167 int NDL_EsplayerSetVideoCustomDisplayWindow(NDL_EsplayerHandle player,
168 long src_left, long src_top, long src_width, long src_height,
169 long dst_left, long dst_top, long dst_width, long dst_height,
170 int isFullScreen);
171
176 int NDL_EsplayerSetAppForegroundState(NDL_EsplayerHandle player, NDL_ESP_APP_STATE appState);
177
178
184 int NDL_EsplayerMuteAudio(NDL_EsplayerHandle player, int mute);
185
191 int NDL_EsplayerMuteVideo(NDL_EsplayerHandle player, int mute);
192
193
198 int NDL_EsplayerSet3DType(NDL_EsplayerHandle player, NDL_ESP_3D_TYPE e3DType);
199
207 int NDL_EsplayerSetTrickMode(NDL_EsplayerHandle player, int enable);
208
209
217 int NDL_EsplayerSetVolume(NDL_EsplayerHandle player, int volume, int duration, NDL_ESP_EASE_TYPE type);
218
219#ifdef __cplusplus
220}
221#endif
222
223#endif //#ifdef NDL_DIRECTMEDIA2_ESPLAYER_API_H_
Definition media-common.h:50
Definition media-common.h:37