/// /// JHybridVideoPlayerSourceSpec.cpp /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE. /// https://github.com/mrousavy/nitro /// Copyright © 2025 Marc Rousavy @ Margelo /// #include "JHybridVideoPlayerSourceSpec.hpp" // Forward declaration of `NativeVideoConfig` to properly resolve imports. namespace margelo::nitro::video { struct NativeVideoConfig; } // Forward declaration of `NativeExternalSubtitle` to properly resolve imports. namespace margelo::nitro::video { struct NativeExternalSubtitle; } // Forward declaration of `SubtitleType` to properly resolve imports. namespace margelo::nitro::video { enum class SubtitleType; } // Forward declaration of `NativeDrmParams` to properly resolve imports. namespace margelo::nitro::video { struct NativeDrmParams; } // Forward declaration of `OnGetLicensePayload` to properly resolve imports. namespace margelo::nitro::video { struct OnGetLicensePayload; } // Forward declaration of `BufferConfig` to properly resolve imports. namespace margelo::nitro::video { struct BufferConfig; } // Forward declaration of `LivePlaybackParams` to properly resolve imports. namespace margelo::nitro::video { struct LivePlaybackParams; } // Forward declaration of `Resolution` to properly resolve imports. namespace margelo::nitro::video { struct Resolution; } // Forward declaration of `CustomVideoMetadata` to properly resolve imports. namespace margelo::nitro::video { struct CustomVideoMetadata; } // Forward declaration of `VideoInformation` to properly resolve imports. namespace margelo::nitro::video { struct VideoInformation; } // Forward declaration of `VideoOrientation` to properly resolve imports. namespace margelo::nitro::video { enum class VideoOrientation; } #include #include "NativeVideoConfig.hpp" #include "JNativeVideoConfig.hpp" #include "NativeExternalSubtitle.hpp" #include #include #include "JNativeExternalSubtitle.hpp" #include "SubtitleType.hpp" #include "JSubtitleType.hpp" #include "NativeDrmParams.hpp" #include "JNativeDrmParams.hpp" #include #include #include "OnGetLicensePayload.hpp" #include #include "JFunc_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload.hpp" #include #include "JOnGetLicensePayload.hpp" #include "BufferConfig.hpp" #include "JBufferConfig.hpp" #include "LivePlaybackParams.hpp" #include "JLivePlaybackParams.hpp" #include "Resolution.hpp" #include "JResolution.hpp" #include "CustomVideoMetadata.hpp" #include "JCustomVideoMetadata.hpp" #include "VideoInformation.hpp" #include "JVideoInformation.hpp" #include "VideoOrientation.hpp" #include "JVideoOrientation.hpp" namespace margelo::nitro::video { jni::local_ref JHybridVideoPlayerSourceSpec::initHybrid(jni::alias_ref jThis) { return makeCxxInstance(jThis); } void JHybridVideoPlayerSourceSpec::registerNatives() { registerHybrid({ makeNativeMethod("initHybrid", JHybridVideoPlayerSourceSpec::initHybrid), }); } size_t JHybridVideoPlayerSourceSpec::getExternalMemorySize() noexcept { static const auto method = javaClassStatic()->getMethod("getMemorySize"); return method(_javaPart); } void JHybridVideoPlayerSourceSpec::dispose() noexcept { static const auto method = javaClassStatic()->getMethod("dispose"); method(_javaPart); } // Properties std::string JHybridVideoPlayerSourceSpec::getUri() { static const auto method = javaClassStatic()->getMethod()>("getUri"); auto __result = method(_javaPart); return __result->toStdString(); } NativeVideoConfig JHybridVideoPlayerSourceSpec::getConfig() { static const auto method = javaClassStatic()->getMethod()>("getConfig"); auto __result = method(_javaPart); return __result->toCpp(); } // Methods std::shared_ptr> JHybridVideoPlayerSourceSpec::getAssetInformationAsync() { static const auto method = javaClassStatic()->getMethod()>("getAssetInformationAsync"); auto __result = method(_javaPart); return [&]() { auto __promise = Promise::create(); __result->cthis()->addOnResolvedListener([=](const jni::alias_ref& __boxedResult) { auto __result = jni::static_ref_cast(__boxedResult); __promise->resolve(__result->toCpp()); }); __result->cthis()->addOnRejectedListener([=](const jni::alias_ref& __throwable) { jni::JniException __jniError(__throwable); __promise->reject(std::make_exception_ptr(__jniError)); }); return __promise; }(); } } // namespace margelo::nitro::video