From d262f8602661f222819c5d4b468a1c23257e643c Mon Sep 17 00:00:00 2001 From: Juha Kukkonen Date: Fri, 7 Sep 2012 14:21:08 +0300 Subject: Fix handling of type 4 tag specific command replies on Symbian It was possible to send tag specific commands using QNearFieldTarget sendCommand() but any replies were dropped in case of type 4 tags. Task-number: QTMOBILITY-2074 Task-number: QTBUG-22568 --- src/connectivity/nfc/qnearfieldtagtype4_symbian.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/connectivity/nfc/qnearfieldtagtype4_symbian.cpp b/src/connectivity/nfc/qnearfieldtagtype4_symbian.cpp index 4df5539b1d..5e93782c9f 100644 --- a/src/connectivity/nfc/qnearfieldtagtype4_symbian.cpp +++ b/src/connectivity/nfc/qnearfieldtagtype4_symbian.cpp @@ -134,6 +134,11 @@ QVariant QNearFieldTagType4Symbian::decodeResponse(const QByteArray &command, co result = response; } } + else + { + LOG("tag specific command"); + result = response; + } END return result; } -- cgit v1.2.3 From 2fa60a5fc2d10b639c258d019ed8b46ea2aa434b Mon Sep 17 00:00:00 2001 From: Marko Kenttala Date: Mon, 10 Sep 2012 09:01:26 +0300 Subject: Fix for Symbian video resume from pause after screen lock and unlock In Symbian video was not able to resume from paused state after screen lock. Only way to resume was to stop, load again and play from start. Fixed S60VideoPlayerSession to wait for surface before enabling buffering if surface was removed earlier. Task-Number: QTMOBILITY-1418 Reviewed-by: Juha Kukkonen --- .../mmf/mediaplayer/s60videoplayersession.cpp | 20 ++++++++++++++++++++ .../symbian/mmf/mediaplayer/s60videoplayersession.h | 1 + 2 files changed, 21 insertions(+) diff --git a/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.cpp b/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.cpp index 95069a04bf..1cc11f6685 100644 --- a/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.cpp +++ b/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.cpp @@ -167,6 +167,7 @@ S60VideoPlayerSession::S60VideoPlayerSession(QMediaService *service, S60MediaNet , m_player(0) #ifdef VIDEOOUTPUT_GRAPHICS_SURFACES , m_nativeSurface(TSurfaceId::CreateNullId()) + , m_bufferingWaitingSurface(false) #else , m_dsaActive(false) , m_dsaStopped(false) @@ -692,6 +693,11 @@ void S60VideoPlayerSession::MvpuoEvent(const TMMFEvent &aEvent) // MMF sends this event when video playback is paused due to foreground lost event applicationLostFocus(); } else { +#ifdef VIDEOOUTPUT_GRAPHICS_SURFACES + // Ignore KErrNotFound when loading for null surface + if (aEvent.iErrorCode == KErrNotFound && m_bufferingWaitingSurface) + return; +#endif setError(aEvent.iErrorCode); doClose(); } @@ -708,6 +714,13 @@ void S60VideoPlayerSession::MmsehSurfaceCreated(TInt aDisplayId, const TSurfaceI Q_UNUSED(aAspectRatio) Q_ASSERT(m_nativeSurface.IsNull()); m_nativeSurface = aId; +#ifdef VIDEOOUTPUT_GRAPHICS_SURFACES + if (m_bufferingWaitingSurface) { + // Loading had started before surface, start buffering now + m_bufferingWaitingSurface = false; + buffering(); + } +#endif emit nativeSurfaceChanged(m_nativeSurface); } @@ -817,6 +830,13 @@ bool S60VideoPlayerSession::stopDirectScreenAccess() void S60VideoPlayerSession::MvloLoadingStarted() { TRACE("S60VideoPlayerSession::MvloLoadingStarted" << qtThisPtr()); +#ifdef VIDEOOUTPUT_GRAPHICS_SURFACES + if (m_nativeSurface.IsNull()) { + // Wait for surface before starting buffering + m_bufferingWaitingSurface = true; + } + else +#endif buffering(); } diff --git a/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.h b/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.h index c9bb7154cc..2cc9595a47 100644 --- a/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.h +++ b/plugins/multimedia/symbian/mmf/mediaplayer/s60videoplayersession.h @@ -209,6 +209,7 @@ private: CVideoPlayerUtility2 *m_player; TSurfaceId m_nativeSurface; S60NativeWindow *m_dummyWindow; + bool m_bufferingWaitingSurface; #else CVideoPlayerUtility *m_player; bool m_dsaActive; -- cgit v1.2.3 From c3bf5eac6c216876acc855b182da4fc05a34acb6 Mon Sep 17 00:00:00 2001 From: Ari Lehtola Date: Mon, 10 Sep 2012 09:50:45 +0300 Subject: Fix QAudioInput to connect to correct slot on Symbian Symbian backend for QAudioInput tried to connect to a non-existent signal, instead it should have connected to notifyTimerExpired slot. Audioinput example updated also. Task-number: QTMOBILITY-1736 Reviewed-by: Juha Kukkonen --- examples/audioinput/audioinput.cpp | 9 ++++++++- examples/audioinput/audioinput.h | 1 + examples/audioinput/audioinput.pro | 4 +++- examples/audioinput/main.cpp | 4 ++++ src/multimedia/audio/qaudioinput_symbian_p.cpp | 2 +- 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/examples/audioinput/audioinput.cpp b/examples/audioinput/audioinput.cpp index aa008df1aa..fba6dcd091 100644 --- a/examples/audioinput/audioinput.cpp +++ b/examples/audioinput/audioinput.cpp @@ -56,6 +56,7 @@ const QString InputTest::PushModeLabel(tr("Enable push mode")); const QString InputTest::PullModeLabel(tr("Enable pull mode")); const QString InputTest::SuspendLabel(tr("Suspend recording")); const QString InputTest::ResumeLabel(tr("Resume recording")); +const QString InputTest::StoppedLabel(tr("Recording stopped")); const int BufferSize = 4096; @@ -338,7 +339,10 @@ void InputTest::toggleSuspend() } else if (m_audioInput->state() == QAudio::StoppedState) { qWarning() << "status: Stopped, resume()"; m_audioInput->resume(); - m_suspendResumeButton->setText(SuspendLabel); + if (m_audioInput->state() == QAudio::ActiveState) + m_suspendResumeButton->setText(SuspendLabel); + else + m_suspendResumeButton->setText(StoppedLabel); } else if (m_audioInput->state() == QAudio::IdleState) { qWarning() << "status: IdleState"; } @@ -347,6 +351,9 @@ void InputTest::toggleSuspend() void InputTest::stateChanged(QAudio::State state) { qWarning() << "state = " << state; + + if(state == QAudio::StoppedState) + m_suspendResumeButton->setText(StoppedLabel); } void InputTest::refreshDisplay() diff --git a/examples/audioinput/audioinput.h b/examples/audioinput/audioinput.h index 540e798453..58b75e3a18 100644 --- a/examples/audioinput/audioinput.h +++ b/examples/audioinput/audioinput.h @@ -133,6 +133,7 @@ private: static const QString PullModeLabel; static const QString SuspendLabel; static const QString ResumeLabel; + static const QString StoppedLabel; }; #endif diff --git a/examples/audioinput/audioinput.pro b/examples/audioinput/audioinput.pro index 80daa8d656..23dedc0367 100644 --- a/examples/audioinput/audioinput.pro +++ b/examples/audioinput/audioinput.pro @@ -13,4 +13,6 @@ HEADERS = audioinput.h SOURCES = audioinput.cpp \ main.cpp - +symbian: { +TARGET.CAPABILITY = UserEnvironment +} diff --git a/examples/audioinput/main.cpp b/examples/audioinput/main.cpp index c14d1c8433..fffb898f10 100644 --- a/examples/audioinput/main.cpp +++ b/examples/audioinput/main.cpp @@ -48,7 +48,11 @@ int main(int argv, char **args) app.setApplicationName("Audio Input Test"); InputTest input; +#ifndef Q_WS_S60 input.show(); +#else + input.showMaximized(); +#endif return app.exec(); } diff --git a/src/multimedia/audio/qaudioinput_symbian_p.cpp b/src/multimedia/audio/qaudioinput_symbian_p.cpp index fe250cf322..03bfeab9ee 100644 --- a/src/multimedia/audio/qaudioinput_symbian_p.cpp +++ b/src/multimedia/audio/qaudioinput_symbian_p.cpp @@ -125,7 +125,7 @@ QAudioInputPrivate::QAudioInputPrivate(const QByteArray &device) qRegisterMetaType("CMMFBuffer *"); connect(m_notifyTimer.data(), SIGNAL(timeout()), - this, SIGNAL(notifyTimerExpired())); + this, SLOT(notifyTimerExpired())); m_pullTimer->setInterval(PushInterval); connect(m_pullTimer.data(), SIGNAL(timeout()), this, SLOT(pullData())); -- cgit v1.2.3