webOS Userland
Native system APIs for webOS
NDL_directmedia_v2.h
1 /* NDL DirectMedia API 2 (webOS 5+) */
2 
3 #pragma once
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #else
8 /* needed for bool in C */
9 # include <stdbool.h>
10 #endif
11 
12 #ifndef NDL_DIRECTMEDIA_API_VERSION
13 # define NDL_DIRECTMEDIA_API_VERSION 2
14 #elif (NDL_DIRECTMEDIA_API_VERSION != 2)
15 # error "this header requires NDL_DIRECTMEDIA_API_VERSION 2"
16 #endif
17 
18 #include "NDL_directmedia_common.h"
19 
23 int NDL_DirectAudioGetAvailableBufferSize(int *available);
24 
28 int NDL_DirectAudioGetTotalBufferSize(int *total);
29 
38 int NDL_DirectAudioPlay(void *buffer, unsigned int size, long long pts);
39 
43 int NDL_DirectAudioSupportMultiChannel(int *isSuppored);
44 
48 int NDL_DirectEffectGetAvailableBufferSize(unsigned int *avail);
49 
53 int NDL_DirectEffectLoad(NDL_DIRECTAUDIO_PCM_INFO_T *info, unsigned int *preferredSize);
54 
62 int NDL_DirectEffectPlay(void *buffer, unsigned int size);
63 
67 int NDL_DirectEffectUnload(void);
68 
75 int NDL_DirectMediaLoad(NDL_DIRECTMEDIA_DATA_INFO_T *data, NDLMediaLoadCallback callback);
76 
82 int NDL_DirectMediaUnload(void);
83 
87 void NDL_DirectMedia_DL_Finalize(void);
88 
94 bool NDL_DirectMedia_DL_Initialize(void);
95 
101 bool NDL_DirectMedia_DL_IsInitialized(void);
102 
106 int NDL_DirectVideoFlushRenderBuffer(void);
107 
111 int NDL_DirectVideoGetRenderBufferLength(int *length);
112 
121 int NDL_DirectVideoPlay(void *buffer, unsigned int size, long long pts);
122 
126 int NDL_DirectVideoSetFrameDropThreshold(int threshold);
127 
131 int NDL_DirectVideoSetHDRInfo(NDL_DIRECTVIDEO_HDR_INFO_T hdrInfo);
132 
133 
134 
135 #ifdef __cplusplus
136 }
137 #endif