Merge remote-tracking branch 'origin/release' into stable
Change-Id: I53a7a2a3e096f76d50f2bb3ae125f6022de5c3f5
This commit is contained in:
@@ -76,7 +76,7 @@ public:
|
||||
qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "Audio");
|
||||
qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "MediaPlayer");
|
||||
qmlRegisterType<QDeclarativeVideoOutput>(uri, 5, 0, "VideoOutput");
|
||||
qmlRegisterType<QDeclarativeVideoOutput, 1>(uri, 5, 1, "VideoOutput");
|
||||
qmlRegisterType<QDeclarativeVideoOutput, 2>(uri, 5, 2, "VideoOutput");
|
||||
qmlRegisterType<QDeclarativeRadio>(uri, 5, 0, "Radio");
|
||||
qmlRegisterType<QDeclarativeRadioData>(uri, 5, 0, "RadioData");
|
||||
qmlRegisterType<QDeclarativeCamera>(uri, 5, 0, "Camera");
|
||||
|
||||
@@ -429,7 +429,7 @@ void QDeclarativeVideoOutput::setOrientation(int orientation)
|
||||
|
||||
By default \c autoOrientation is disabled.
|
||||
|
||||
\since QtMultimedia 5.1
|
||||
\since QtMultimedia 5.2
|
||||
*/
|
||||
bool QDeclarativeVideoOutput::autoOrientation() const
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ class QDeclarativeVideoOutput : public QQuickItem
|
||||
Q_PROPERTY(QObject* source READ source WRITE setSource NOTIFY sourceChanged)
|
||||
Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
|
||||
Q_PROPERTY(int orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
|
||||
Q_PROPERTY(bool autoOrientation READ autoOrientation WRITE setAutoOrientation NOTIFY autoOrientationChanged REVISION 1)
|
||||
Q_PROPERTY(bool autoOrientation READ autoOrientation WRITE setAutoOrientation NOTIFY autoOrientationChanged REVISION 2)
|
||||
Q_PROPERTY(QRectF sourceRect READ sourceRect NOTIFY sourceRectChanged)
|
||||
Q_PROPERTY(QRectF contentRect READ contentRect NOTIFY contentRectChanged)
|
||||
Q_ENUMS(FillMode)
|
||||
|
||||
@@ -62,6 +62,8 @@ JSurfaceTexture::JSurfaceTexture(unsigned int texName)
|
||||
{
|
||||
if (isValid())
|
||||
g_objectMap.insert(int(texName), this);
|
||||
else // If the class is not available, it means the Android version is < 3.0
|
||||
qWarning("Camera preview and video playback require Android 3.0 (API level 11) or later.");
|
||||
}
|
||||
|
||||
JSurfaceTexture::~JSurfaceTexture()
|
||||
@@ -94,16 +96,24 @@ static JNINativeMethod methods[] = {
|
||||
|
||||
bool JSurfaceTexture::initJNI(JNIEnv *env)
|
||||
{
|
||||
jclass clazz = env->FindClass("org/qtproject/qt5/android/multimedia/QtSurfaceTexture");
|
||||
// SurfaceTexture is available since API 11, try to find it first before loading
|
||||
// our custom class
|
||||
jclass surfaceTextureClass = env->FindClass("android/graphics/SurfaceTexture");
|
||||
if (env->ExceptionCheck())
|
||||
env->ExceptionClear();
|
||||
|
||||
if (clazz) {
|
||||
g_qtSurfaceTextureClass = static_cast<jclass>(env->NewGlobalRef(clazz));
|
||||
if (env->RegisterNatives(g_qtSurfaceTextureClass,
|
||||
methods,
|
||||
sizeof(methods) / sizeof(methods[0])) < 0) {
|
||||
return false;
|
||||
if (surfaceTextureClass) {
|
||||
jclass clazz = env->FindClass("org/qtproject/qt5/android/multimedia/QtSurfaceTexture");
|
||||
if (env->ExceptionCheck())
|
||||
env->ExceptionClear();
|
||||
|
||||
if (clazz) {
|
||||
g_qtSurfaceTextureClass = static_cast<jclass>(env->NewGlobalRef(clazz));
|
||||
if (env->RegisterNatives(g_qtSurfaceTextureClass,
|
||||
methods,
|
||||
sizeof(methods) / sizeof(methods[0])) < 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ PpsMediaPlayerControl::PpsMediaPlayerControl(QObject *parent)
|
||||
m_ppsStatusFd(-1),
|
||||
m_ppsStateNotifier(0),
|
||||
m_ppsStateFd(-1)
|
||||
, m_previouslySeenState("STOPPED")
|
||||
, m_previouslySeenState("stopped")
|
||||
{
|
||||
openConnection();
|
||||
}
|
||||
@@ -177,7 +177,7 @@ void PpsMediaPlayerControl::ppsReadyRead(int fd)
|
||||
|
||||
if (pps_decoder_get_string(&decoder, "state", &value) == PPS_DECODER_OK) {
|
||||
const QByteArray state = value;
|
||||
if (state != m_previouslySeenState && state == "STOPPED")
|
||||
if (state != m_previouslySeenState && state == "stopped")
|
||||
handleMmStopped();
|
||||
m_previouslySeenState = state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user