12#include "qandroidcamera_p.h"
13#include "qandroidimagecapture_p.h"
22#include <private/qplatformvideodevices_p.h>
24#include <QCoreApplication>
25#include <QtCore/qjnitypes.h>
27#include <QtMultimedia/private/qplatformmediaplugin_p.h>
31Q_LOGGING_CATEGORY(qtAndroidMediaPlugin,
"qt.multimedia.android")
42 return QAndroidCameraSession::availableCameras();
50 Q_PLUGIN_METADATA(IID QPlatformMediaPlugin_iid FILE
"android.json")
59 if (
name == u"android")
74 return new QAndroidFormatInfo;
89 return new QAndroidCamera(camera);
99 return new QAndroidImageCapture(imageCapture);
104 return new QAndroidAudioOutput(q);
109 return new QAndroidAudioInput(audioInput);
114 return new QAndroidVideoSink(sink);
117Q_DECLARE_JNI_CLASS(QtMultimediaUtils,
"org/qtproject/qt/android/multimedia/QtMultimediaUtils")
121 static const bool result = []{
122 const auto context = QNativeInterface::QAndroidApplication::context();
123 QtJniTypes::QtMultimediaUtils::callStaticMethod<
void>(
"setContext", context);
136 return new AndroidVideoDevices(
this);
141extern "C" Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm,
void * )
143 static bool initialized =
false;
145 return JNI_VERSION_1_6;
150 JNIEnv *nativeEnvironment;
154 UnionJNIEnvToVoid uenv;
157 if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK)
160 if (!QAndroidIntegration::registerNativeMethods())
163 return JNI_VERSION_1_6;
166#include "qandroidintegration.moc"
static bool registerNativeMethods()
static bool registerNativeMethods()
static bool registerNativeMethods()
QPlatformVideoDevices * createVideoDevices() override
q23::expected< QPlatformAudioInput *, QString > createAudioInput(QAudioInput *audioInput) override
q23::expected< QPlatformAudioDecoder *, QString > createAudioDecoder(QAudioDecoder *decoder) override
q23::expected< QPlatformAudioOutput *, QString > createAudioOutput(QAudioOutput *q) override
q23::expected< QPlatformImageCapture *, QString > createImageCapture(QImageCapture *imageCapture) override
q23::expected< QPlatformMediaRecorder *, QString > createRecorder(QMediaRecorder *recorder) override
q23::expected< QPlatformMediaPlayer *, QString > createPlayer(QMediaPlayer *player) override
QPlatformMediaFormatInfo * createFormatInfo() override
q23::expected< QPlatformMediaCaptureSession *, QString > createCaptureSession() override
static bool registerNativeMethods()
QList< QCameraDevice > findVideoInputs() const override
Combined button and popup list for selecting options.
Q_DECLARE_JNI_CLASS(MotionEvent, "android/view/MotionEvent")