Home
last modified time | relevance | path

Searched refs:CommonNapi (Results 1 - 24 of 24) sorted by relevance

/foundation/multimedia/player_framework/frameworks/js/recorder/
H A Drecorder_capability_napi.cpp41 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in GetAudioRecorderCaps()
42 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in GetAudioRecorderCaps()
92 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[1]); in IsAudioRecorderConfigSupported()
93 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in IsAudioRecorderConfigSupported()
136 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in GetVideoRecorderCaps()
137 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in GetVideoRecorderCaps()
189 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[2]); // 2 : two params in GetVideoRecorderProfile()
190 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, ret); in GetVideoRecorderProfile()
243 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[2]); // 2 : two params in HasVideoRecorderProfile()
244 asyncCtx->deferred = CommonNapi in HasVideoRecorderProfile()
[all...]
H A Dvideo_recorder_napi.cpp170 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in CreateVideoRecorder()
171 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in CreateVideoRecorder()
215 std::string urlPath = CommonNapi::GetPropertyString(env, args[0], "url"); in Prepare()
232 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[1]); in Prepare()
233 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in Prepare()
281 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in GetInputSurface()
282 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in GetInputSurface()
337 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in Start()
338 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in Start()
387 asyncCtx->callbackRef = CommonNapi in Pause()
[all...]
H A Daudio_recorder_napi.cpp199 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in CreateAudioRecorderAsync()
200 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in CreateAudioRecorderAsync()
282 std::string outputFile = CommonNapi::GetPropertyString(env, args, "fileFormat"); in GetAudioEncAndFileFormat()
288 (void)CommonNapi::GetPropertyInt32(env, args, "format", fileFormat); in GetAudioEncAndFileFormat()
305 std::string audioMime = CommonNapi::GetPropertyString(env, args, "audioEncoderMime"); in GetAudioEncAndFileFormat()
311 (void)CommonNapi::GetPropertyInt32(env, args, "audioEncoder", audioEncoder); in GetAudioEncAndFileFormat()
337 (void)CommonNapi::GetPropertyDouble(env, geoLocation, "latitude", tempLatitude); in GetAudioProperties()
338 (void)CommonNapi::GetPropertyDouble(env, geoLocation, "longitude", tempLongitude); in GetAudioProperties()
342 (void)CommonNapi::GetPropertyInt32(env, args, "audioEncodeBitRate", properties.encodeBitRate); in GetAudioProperties()
343 (void)CommonNapi in GetAudioProperties()
[all...]
H A Drecorder_callback_napi.cpp209 nstatus = CommonNapi::FillErrorArgs(ref->env_, event->errorCode, args[0]); in OnJsErrorCallBack()
/foundation/multimedia/player_framework/frameworks/js/common/
H A Dcommon_napi.cpp23 constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, LOG_DOMAIN_PLAYER, "CommonNapi"};
28 std::string CommonNapi::GetStringArgument(napi_env env, napi_value value, size_t maxLength) in GetStringArgument()
47 bool CommonNapi::CheckValueType(napi_env env, napi_value arg, napi_valuetype type) in CheckValueType()
56 bool CommonNapi::CheckhasNamedProperty(napi_env env, napi_value arg, std::string type) in CheckhasNamedProperty()
63 bool CommonNapi::GetPropertyInt32(napi_env env, napi_value configObj, const std::string &type, int32_t &result) in GetPropertyInt32()
76 bool CommonNapi::GetPropertyUint32(napi_env env, napi_value configObj, const std::string &type, uint32_t &result) in GetPropertyUint32()
90 bool CommonNapi::GetPropertyInt64(napi_env env, napi_value configObj, const std::string &type, int64_t &result) in GetPropertyInt64()
112 bool CommonNapi::GetPropertyDouble(napi_env env, napi_value configObj, const std::string &type, double &result) in GetPropertyDouble()
134 std::string CommonNapi::GetPropertyString(napi_env env, napi_value configObj, const std::string &type) in GetPropertyString()
153 napi_status CommonNapi
[all...]
H A Dcommon_napi.h46 class CommonNapi { class
48 CommonNapi() = delete;
49 ~CommonNapi() = delete;
200 if (!CommonNapi::SetPropertyInt32(env, result, "min", min_)) {
204 if (!CommonNapi::SetPropertyInt32(env, result, "max", max_)) {
282 (void)CommonNapi::CreateFormatBufferByRef(env, format_, result);
/foundation/multimedia/player_framework/frameworks/js/avrecorder/
H A Davrecorder_callback.cpp417 nstatus = CommonNapi::FillErrorArgs(ref->env_, event->errorCode, args[0]); in OnJsErrorCallBack()
440 setRet = CommonNapi::SetPropertyInt32(env, result, "streamId", value_.sessionId); in GetJsResult()
442 setRet = CommonNapi::SetPropertyInt32(env, result, "clientUid", value_.clientUID); in GetJsResult()
444 setRet = CommonNapi::SetPropertyInt32(env, result, "capturerState", value_.capturerState); in GetJsResult()
446 setRet = CommonNapi::SetPropertyBool(env, result, "muted", value_.muted); in GetJsResult()
462 setRet = CommonNapi::SetPropertyInt32(env, captureInfo, "source", in SetAudioCapturerInfo()
465 setRet = CommonNapi::SetPropertyInt32(env, captureInfo, "capturerFlags", value_.capturerInfo.capturerFlags); in SetAudioCapturerInfo()
474 setRet = CommonNapi::SetPropertyInt32(env, element, "deviceRole", in SetDeviceProperty()
477 setRet = CommonNapi::SetPropertyInt32(env, element, "deviceType", in SetDeviceProperty()
480 setRet = CommonNapi in SetDeviceProperty()
[all...]
H A Davrecorder_napi.cpp192 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsCreateAVRecorder()
193 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsCreateAVRecorder()
250 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[1]); in JsPrepare()
251 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsPrepare()
302 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[1]); in JsSetOrientationHint()
303 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsSetOrientationHint()
354 asyncCtx->deferred = CommonNapi::CreatePromise(env, nullptr, result); in JsSetWatermark()
456 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsGetInputMetaSurface()
457 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsGetInputMetaSurface()
559 asyncCtx->callbackRef = CommonNapi in JsGetAVRecorderProfile()
[all...]
/foundation/multimedia/player_framework/frameworks/js/metadatahelper/
H A Davimagegenerator_napi.cpp147 asyncContext->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsCreateAVImageGenerator()
148 asyncContext->deferred = CommonNapi::CreatePromise(env, asyncContext->callbackRef, result); in JsCreateAVImageGenerator()
177 if (!CommonNapi::GetPropertyInt32(env, params, "width", width)) { in GetFetchFrameArgs()
182 if (!CommonNapi::GetPropertyInt32(env, params, "height", height)) { in GetFetchFrameArgs()
188 CommonNapi::GetPropertyInt32(env, params, "colorFormat", formatVal); in GetFetchFrameArgs()
219 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[argCallback]); in JsFetchFrameAtTime()
220 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsFetchFrameAtTime()
289 (void)CommonNapi::CreateError(env, asyncContext->errCode, asyncContext->errMessage, callback); in CommonCallbackRoutine()
322 promiseCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsRelease()
323 promiseCtx->deferred = CommonNapi in JsRelease()
[all...]
H A Davmetadataextractor_napi.cpp144 asyncContext->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsCreateAVMetadataExtractor()
145 asyncContext->deferred = CommonNapi::CreatePromise(env, asyncContext->callbackRef, result); in JsCreateAVMetadataExtractor()
174 promiseCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsResolveMetadata()
175 promiseCtx->deferred = CommonNapi::CreatePromise(env, promiseCtx->callbackRef, result); in JsResolveMetadata()
228 CHECK_AND_CONTINUE_LOG(CommonNapi::SetPropertyByValueType(env, location, metadata, key), in ResolveMetadataComplete()
239 CHECK_AND_CONTINUE_LOG(CommonNapi::SetPropertyByValueType(env, customInfo, customData, iter->first), in ResolveMetadataComplete()
244 CHECK_AND_CONTINUE_LOG(CommonNapi::SetPropertyByValueType(env, result, metadata, key), in ResolveMetadataComplete()
283 promiseCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsFetchArtPicture()
284 promiseCtx->deferred = CommonNapi::CreatePromise(env, promiseCtx->callbackRef, result); in JsFetchArtPicture()
347 (void)CommonNapi in CommonCallbackRoutine()
[all...]
H A Davmetadatahelper_callback.cpp91 (void)CommonNapi::CreateError(ref->env_, errorCode, errorMsg, args[0]);
/foundation/multimedia/player_framework/frameworks/js/player/
H A Dvideo_player_napi.cpp208 asyncContext->callbackRef = CommonNapi::CreateReference(env, args[0]); in CreateVideoPlayer()
209 asyncContext->deferred = CommonNapi::CreatePromise(env, asyncContext->callbackRef, result); in CreateVideoPlayer()
250 jsPlayer->url_ = CommonNapi::GetStringArgument(env, args[0]); in SetUrl()
335 if (!CommonNapi::GetFdArgument(env, args[0], jsPlayer->rawFd_)) { in SetFdSrc()
376 CHECK_AND_RETURN_RET(CommonNapi::AddNumberPropInt32(env, jsResult, "fd", jsPlayer->rawFd_.fd) == true, nullptr); in GetFdSrc()
377 CHECK_AND_RETURN_RET(CommonNapi::AddNumberPropInt64(env, jsResult, "offset", jsPlayer->rawFd_.offset) == true, in GetFdSrc()
379 CHECK_AND_RETURN_RET(CommonNapi::AddNumberPropInt64(env, jsResult, "length", jsPlayer->rawFd_.length) == true, in GetFdSrc()
443 asyncContext->surface = CommonNapi::GetStringArgument(env, args[0]); in SetDisplaySurface()
445 asyncContext->callbackRef = CommonNapi::CreateReference(env, args[1]); in SetDisplaySurface()
446 asyncContext->deferred = CommonNapi in SetDisplaySurface()
[all...]
H A Daudio_player_napi.cpp189 asyncContext->callbackRef = CommonNapi::CreateReference(env, args[0]); in CreateAudioPlayerAsync()
190 asyncContext->deferred = CommonNapi::CreatePromise(env, asyncContext->callbackRef, result); in CreateAudioPlayerAsync()
236 player->uri_ = CommonNapi::GetStringArgument(env, args[0]); in SetSrc()
319 if (!CommonNapi::GetFdArgument(env, args[0], player->rawFd_)) { in SetFdSrc()
362 CHECK_AND_RETURN_RET(CommonNapi::AddNumberPropInt32(env, jsResult, "fd", player->rawFd_.fd) == true, nullptr); in GetFdSrc()
363 CHECK_AND_RETURN_RET(CommonNapi::AddNumberPropInt64(env, jsResult, "offset", player->rawFd_.offset) == true, in GetFdSrc()
365 CHECK_AND_RETURN_RET(CommonNapi::AddNumberPropInt64(env, jsResult, "length", player->rawFd_.length) == true, in GetFdSrc()
649 std::string callbackName = CommonNapi::GetStringArgument(env, args[0]); in On()
918 asyncContext->callbackRef = CommonNapi::CreateReference(env, args[0]); in GetTrackDescription()
919 asyncContext->deferred = CommonNapi in GetTrackDescription()
[all...]
H A Dplayer_callback_napi.cpp376 nstatus = CommonNapi::FillErrorArgs(ref->env_, static_cast<int32_t>(event->errorCode), args[0]); in OnJsCallBackError()
560 bool ret = CommonNapi::AddArrayInt(ref->env_, array, event->valueVec); in OnJsCallBackIntArray()
617 CommonNapi::SetPropertyInt32(ref->env_, args[0], "eventType", in OnJsCallBackInterrupt()
619 CommonNapi::SetPropertyInt32(ref->env_, args[0], "forceType", in OnJsCallBackInterrupt()
621 CommonNapi::SetPropertyInt32(ref->env_, args[0], "hintType", in OnJsCallBackInterrupt()
/foundation/multimedia/player_framework/frameworks/js/soundpool/src/
H A Dsoundpool_napi.cpp151 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[PARAM2]); in JsCreateSoundPool()
152 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsCreateSoundPool()
183 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[PARAM3]); in JsLoad()
185 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[PARAM1]); in JsLoad()
187 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsLoad()
235 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[PARAM2]); in JsPlay()
237 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[PARAM1]); in JsPlay()
239 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsPlay()
281 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[PARAM1]); in JsStop()
282 asyncCtx->deferred = CommonNapi in JsStop()
[all...]
H A Dsoundpool_callback_napi.cpp181 nstatus = CommonNapi::FillErrorArgs(ref->env_, event->errorCode, args[0]); in OnJsErrorCallBack()
/foundation/multimedia/player_framework/frameworks/js/avplayer/
H A Davplayer_napi.cpp209 asyncContext->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsCreateAVPlayer()
210 asyncContext->deferred = CommonNapi::CreatePromise(env, asyncContext->callbackRef, result); in JsCreateAVPlayer()
274 promiseCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsPrepare()
275 promiseCtx->deferred = CommonNapi::CreatePromise(env, promiseCtx->callbackRef, result); in JsPrepare()
348 promiseCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsPlay()
349 promiseCtx->deferred = CommonNapi::CreatePromise(env, promiseCtx->callbackRef, result); in JsPlay()
426 promiseCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsPause()
427 promiseCtx->deferred = CommonNapi::CreatePromise(env, promiseCtx->callbackRef, result); in JsPause()
496 promiseCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsStop()
497 promiseCtx->deferred = CommonNapi in JsStop()
[all...]
H A Davplayer_callback.cpp142 (void)CommonNapi::CreateError(errorRef->env_, errorCode, errorMsg, args[0]);
347 (void)CommonNapi::SetPropertyString(subtitleRef->env_, args[0], "text", text);
431 CommonNapi::SetPropertyInt32(propertyIntRef->env_, args[0], it.first, it.second);
579 CommonNapi::SetPropertyString(subtitleRef->env_, args[0], "text", valueMap.text);
580 CommonNapi::SetPropertyInt32(subtitleRef->env_, args[0], "startTime", valueMap.pts);
581 CommonNapi::SetPropertyInt32(subtitleRef->env_, args[0], "duration", valueMap.duration);
612 status = CommonNapi::SetValueDeviceInfo(deviceChangeRef->env_, deviceInfo, deviceObj);
617 bool res = CommonNapi::SetPropertyInt32(deviceChangeRef->env_, args[0], "changeReason",
652 trackDescription = CommonNapi::CreateFormatBuffer(trackInfoRef->env_, trackInfo[i]);
/foundation/multimedia/player_framework/frameworks/js/avtranscoder/
H A Davtranscoder_napi.cpp195 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsCreateAVTransCoder()
196 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsCreateAVTransCoder()
246 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[1]); in JsPrepare()
247 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsPrepare()
359 std::string callbackName = CommonNapi::GetStringArgument(env, args[0]); in JsSetEventCallback()
390 std::string callbackName = CommonNapi::GetStringArgument(env, args[0]); in JsCancelEventCallback()
452 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in ExecuteByPromise()
453 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in ExecuteByPromise()
521 if (!CommonNapi::GetFdArgument(env, args[0], asyncCtx->napi->srcFd_)) { in JsSetSrcFd()
823 std::string audioCodec = CommonNapi in GetAudioConfig()
[all...]
H A Davtranscoder_callback.cpp335 nstatus = CommonNapi::FillErrorArgs(ref->env_, event->errorCode, args[0]); in QueueErrorWork()
/foundation/multimedia/player_framework/frameworks/js/avscreen_capture/
H A Davscreen_capture_napi.cpp159 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[0]); in JsCreateAVScreenRecorder()
160 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsCreateAVScreenRecorder()
240 std::string choice = CommonNapi::GetStringArgument(env, args[1]); in JsReportAVScreenCaptureUserChoice()
244 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsReportAVScreenCaptureUserChoice()
292 asyncCtx->callbackRef = CommonNapi::CreateReference(env, args[1]); in JsInit()
293 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsInit()
374 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsSkipPrivacyMode()
429 asyncCtx->deferred = CommonNapi::CreatePromise(env, asyncCtx->callbackRef, result); in JsSetMicrophoneEnabled()
480 std::string callbackName = CommonNapi::GetStringArgument(env, args[0]); in JsSetEventCallback()
516 std::string callbackName = CommonNapi in JsCancelEventCallback()
[all...]
H A Davscreen_capture_callback.cpp170 nstatus = CommonNapi::FillErrorArgs(ref->env_, event->errorCode, args[0]); in OnJsErrorCallBackWork()
/foundation/multimedia/player_framework/frameworks/js/mediasource/
H A Dmedia_source_napi.cpp135 mediaSource->url = CommonNapi::GetStringArgument(env, args[0]); in JsCreateMediaSourceWithUrl()
137 (void)CommonNapi::GetPropertyMap(env, args[1], mediaSource->header); in JsCreateMediaSourceWithUrl()
157 std::string mimeType = CommonNapi::GetStringArgument(env, args[0]); in JsSetMimeType()
/foundation/multimedia/player_framework/frameworks/js/system_sound_manager/src/tone_attrs/
H A Dtone_attrs_napi.cpp195 std::string toneAttrsTitle = CommonNapi::GetStringArgument(env, argv[0]); in SetTitle()
244 std::string toneAttrsFileName = CommonNapi::GetStringArgument(env, argv[0]); in SetFileName()

Completed in 31 milliseconds