QNX: Restructure plugins
Now that the MmRenderer implementation is ported to plain QNX, rename the directories and files accordingly: "blackberry" becomes "qnx", replace the Bb prefix with MmRenderer for classes concerned with mm-renderer. The legacy alsa support for plain qnx is now "qnx-audio". Change-Id: I6abd98ecdd713b2d5e554d42224dc30f13772f43 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
This commit is contained in:
committed by
The Qt Project
parent
66219c9a28
commit
99667804e1
@@ -1,22 +0,0 @@
|
||||
TARGET = qtmedia_blackberry
|
||||
QT += multimedia-private gui-private
|
||||
|
||||
PLUGIN_TYPE=mediaservice
|
||||
PLUGIN_CLASS_NAME = BbServicePlugin
|
||||
load(qt_plugin)
|
||||
|
||||
LIBS += -lscreen
|
||||
|
||||
include(common/common.pri)
|
||||
include(mediaplayer/mediaplayer.pri)
|
||||
|
||||
blackberry {
|
||||
include(camera/camera.pri)
|
||||
HEADERS += bbserviceplugin.h
|
||||
SOURCES += bbserviceplugin.cpp
|
||||
OTHER_FILES += blackberry_mediaservice.json
|
||||
} else {
|
||||
HEADERS += neutrinoserviceplugin.h
|
||||
SOURCES += neutrinoserviceplugin.cpp
|
||||
OTHER_FILES += neutrino_mediaservice.json
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/bbmediaplayercontrol.h \
|
||||
$$PWD/bbmediaplayerservice.h \
|
||||
$$PWD/bbmetadata.h \
|
||||
$$PWD/bbmetadatareadercontrol.h \
|
||||
$$PWD/bbplayervideorenderercontrol.h \
|
||||
$$PWD/bbutil.h \
|
||||
$$PWD/bbvideowindowcontrol.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/bbmediaplayercontrol.cpp \
|
||||
$$PWD/bbmediaplayerservice.cpp \
|
||||
$$PWD/bbmetadata.cpp \
|
||||
$$PWD/bbmetadatareadercontrol.cpp \
|
||||
$$PWD/bbplayervideorenderercontrol.cpp \
|
||||
$$PWD/bbutil.cpp \
|
||||
$$PWD/bbvideowindowcontrol.cpp
|
||||
|
||||
LIBS += -lmmrndclient -lstrm
|
||||
|
||||
blackberry {
|
||||
HEADERS += $$PWD/bpsmediaplayercontrol.h
|
||||
SOURCES += $$PWD/bpsmediaplayercontrol.cpp
|
||||
} else {
|
||||
HEADERS += $$PWD/ppsmediaplayercontrol.h
|
||||
SOURCES += $$PWD/ppsmediaplayercontrol.cpp
|
||||
QT += core-private
|
||||
LIBS += -lpps
|
||||
}
|
||||
@@ -13,8 +13,11 @@ android {
|
||||
}
|
||||
|
||||
qnx {
|
||||
SUBDIRS += blackberry
|
||||
SUBDIRS += audiocapture qnx
|
||||
SUBDIRS += qnx audiocapture
|
||||
}
|
||||
|
||||
qnx:!blackberry {
|
||||
SUBDIRS += qnx-audio
|
||||
}
|
||||
|
||||
win32 {
|
||||
|
||||
3
src/plugins/qnx-audio/qnx-audio.pro
Normal file
3
src/plugins/qnx-audio/qnx-audio.pro
Normal file
@@ -0,0 +1,3 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
SUBDIRS = audio
|
||||
@@ -58,7 +58,7 @@ QMediaService *BbServicePlugin::create(const QString &key)
|
||||
return new BbCameraService();
|
||||
|
||||
if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
|
||||
return new BbMediaPlayerService();
|
||||
return new MmRendererMediaPlayerService();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -40,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "bpsmediaplayercontrol.h"
|
||||
#include "bbvideowindowcontrol.h"
|
||||
#include "mmrenderervideowindowcontrol.h"
|
||||
|
||||
#include <bps/mmrenderer.h>
|
||||
#include <bps/screen.h>
|
||||
@@ -48,7 +48,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
BpsMediaPlayerControl::BpsMediaPlayerControl(QObject *parent)
|
||||
: BbMediaPlayerControl(parent),
|
||||
: MmRendererMediaPlayerControl(parent),
|
||||
m_eventMonitor(0)
|
||||
{
|
||||
openConnection();
|
||||
@@ -89,7 +89,7 @@ bool BpsMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void
|
||||
|
||||
if (event && bps_event_get_domain(event) == screen_get_domain()) {
|
||||
const screen_event_t screen_event = screen_event_get_event(event);
|
||||
if (BbVideoWindowControl *control = videoWindowControl())
|
||||
if (MmRendererVideoWindowControl *control = videoWindowControl())
|
||||
control->screenEventHandler(screen_event);
|
||||
}
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
#ifndef BPSMEDIAPLAYERCONTROL_H
|
||||
#define BPSMEDIAPLAYERCONTROL_H
|
||||
|
||||
#include "bbmediaplayercontrol.h"
|
||||
#include "mmrenderermediaplayercontrol.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class BpsMediaPlayerControl Q_DECL_FINAL : public BbMediaPlayerControl
|
||||
class BpsMediaPlayerControl Q_DECL_FINAL : public MmRendererMediaPlayerControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
31
src/plugins/qnx/mediaplayer/mediaplayer.pri
Normal file
31
src/plugins/qnx/mediaplayer/mediaplayer.pri
Normal file
@@ -0,0 +1,31 @@
|
||||
INCLUDEPATH += $$PWD
|
||||
|
||||
HEADERS += \
|
||||
$$PWD/mmrenderermediaplayercontrol.h \
|
||||
$$PWD/mmrenderermediaplayerservice.h \
|
||||
$$PWD/mmrenderermetadata.h \
|
||||
$$PWD/mmrenderermetadatareadercontrol.h \
|
||||
$$PWD/mmrendererplayervideorenderercontrol.h \
|
||||
$$PWD/mmrendererutil.h \
|
||||
$$PWD/mmrenderervideowindowcontrol.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/mmrenderermediaplayercontrol.cpp \
|
||||
$$PWD/mmrenderermediaplayerservice.cpp \
|
||||
$$PWD/mmrenderermetadata.cpp \
|
||||
$$PWD/mmrenderermetadatareadercontrol.cpp \
|
||||
$$PWD/mmrendererplayervideorenderercontrol.cpp \
|
||||
$$PWD/mmrendererutil.cpp \
|
||||
$$PWD/mmrenderervideowindowcontrol.cpp
|
||||
|
||||
LIBS += -lmmrndclient -lstrm
|
||||
|
||||
blackberry {
|
||||
HEADERS += $$PWD/bpsmediaplayercontrol.h
|
||||
SOURCES += $$PWD/bpsmediaplayercontrol.cpp
|
||||
} else {
|
||||
HEADERS += $$PWD/ppsmediaplayercontrol.h
|
||||
SOURCES += $$PWD/ppsmediaplayercontrol.cpp
|
||||
QT += core-private
|
||||
LIBS += -lpps
|
||||
}
|
||||
@@ -38,11 +38,11 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "bbmediaplayercontrol.h"
|
||||
#include "bbmetadatareadercontrol.h"
|
||||
#include "bbplayervideorenderercontrol.h"
|
||||
#include "bbutil.h"
|
||||
#include "bbvideowindowcontrol.h"
|
||||
#include "mmrenderermediaplayercontrol.h"
|
||||
#include "mmrenderermetadatareadercontrol.h"
|
||||
#include "mmrendererplayervideorenderercontrol.h"
|
||||
#include "mmrendererutil.h"
|
||||
#include "mmrenderervideowindowcontrol.h"
|
||||
#include <QtCore/qabstracteventdispatcher.h>
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include <QtCore/qdir.h>
|
||||
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
static int idCounter = 0;
|
||||
|
||||
BbMediaPlayerControl::BbMediaPlayerControl(QObject *parent)
|
||||
MmRendererMediaPlayerControl::MmRendererMediaPlayerControl(QObject *parent)
|
||||
: QMediaPlayerControl(parent),
|
||||
m_connection(0),
|
||||
m_context(0),
|
||||
@@ -81,7 +81,7 @@ BbMediaPlayerControl::BbMediaPlayerControl(QObject *parent)
|
||||
QCoreApplication::eventDispatcher()->installNativeEventFilter(this);
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::destroy()
|
||||
void MmRendererMediaPlayerControl::destroy()
|
||||
{
|
||||
stop();
|
||||
detach();
|
||||
@@ -89,7 +89,7 @@ void BbMediaPlayerControl::destroy()
|
||||
QCoreApplication::eventDispatcher()->removeNativeEventFilter(this);
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::openConnection()
|
||||
void MmRendererMediaPlayerControl::openConnection()
|
||||
{
|
||||
m_connection = mmr_connect(NULL);
|
||||
if (!m_connection) {
|
||||
@@ -98,7 +98,7 @@ void BbMediaPlayerControl::openConnection()
|
||||
}
|
||||
|
||||
m_id = idCounter++;
|
||||
m_contextName = QString("BbMediaPlayerControl_%1_%2").arg(m_id)
|
||||
m_contextName = QString("MmRendererMediaPlayerControl_%1_%2").arg(m_id)
|
||||
.arg(QCoreApplication::applicationPid());
|
||||
m_context = mmr_context_create(m_connection, m_contextName.toLatin1(),
|
||||
0, S_IRWXU|S_IRWXG|S_IRWXO);
|
||||
@@ -111,7 +111,7 @@ void BbMediaPlayerControl::openConnection()
|
||||
startMonitoring(m_id, m_contextName);
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::handleMmStatusUpdate(qint64 newPosition)
|
||||
void MmRendererMediaPlayerControl::handleMmStatusUpdate(qint64 newPosition)
|
||||
{
|
||||
// Prevent spurious position change events from overriding our own position, for example
|
||||
// when setting the position to 0 in stop().
|
||||
@@ -126,7 +126,7 @@ void BbMediaPlayerControl::handleMmStatusUpdate(qint64 newPosition)
|
||||
setMmPosition(newPosition);
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::handleMmStopped()
|
||||
void MmRendererMediaPlayerControl::handleMmStopped()
|
||||
{
|
||||
// Only react to stop events that happen when the end of the stream is reached and
|
||||
// playback is stopped because of this.
|
||||
@@ -140,7 +140,7 @@ void BbMediaPlayerControl::handleMmStopped()
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::closeConnection()
|
||||
void MmRendererMediaPlayerControl::closeConnection()
|
||||
{
|
||||
stopMonitoring();
|
||||
|
||||
@@ -156,7 +156,7 @@ void BbMediaPlayerControl::closeConnection()
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray BbMediaPlayerControl::resourcePathForUrl(const QUrl &url)
|
||||
QByteArray MmRendererMediaPlayerControl::resourcePathForUrl(const QUrl &url)
|
||||
{
|
||||
// If this is a local file, mmrenderer expects the file:// prefix and an absolute path.
|
||||
// We treat URLs without scheme as local files, most likely someone just forgot to set the
|
||||
@@ -192,7 +192,7 @@ QByteArray BbMediaPlayerControl::resourcePathForUrl(const QUrl &url)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::attach()
|
||||
void MmRendererMediaPlayerControl::attach()
|
||||
{
|
||||
// Should only be called in detached state
|
||||
Q_ASSERT(m_audioId == -1 && !m_inputAttached && m_tempMediaFileName.isEmpty());
|
||||
@@ -238,7 +238,7 @@ void BbMediaPlayerControl::attach()
|
||||
emit bufferStatusChanged(m_bufferStatus);
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::detach()
|
||||
void MmRendererMediaPlayerControl::detach()
|
||||
{
|
||||
if (m_context) {
|
||||
if (m_inputAttached) {
|
||||
@@ -262,27 +262,27 @@ void BbMediaPlayerControl::detach()
|
||||
m_loadingTimer.stop();
|
||||
}
|
||||
|
||||
QMediaPlayer::State BbMediaPlayerControl::state() const
|
||||
QMediaPlayer::State MmRendererMediaPlayerControl::state() const
|
||||
{
|
||||
return m_state;
|
||||
}
|
||||
|
||||
QMediaPlayer::MediaStatus BbMediaPlayerControl::mediaStatus() const
|
||||
QMediaPlayer::MediaStatus MmRendererMediaPlayerControl::mediaStatus() const
|
||||
{
|
||||
return m_mediaStatus;
|
||||
}
|
||||
|
||||
qint64 BbMediaPlayerControl::duration() const
|
||||
qint64 MmRendererMediaPlayerControl::duration() const
|
||||
{
|
||||
return m_metaData.duration();
|
||||
}
|
||||
|
||||
qint64 BbMediaPlayerControl::position() const
|
||||
qint64 MmRendererMediaPlayerControl::position() const
|
||||
{
|
||||
return m_position;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setPosition(qint64 position)
|
||||
void MmRendererMediaPlayerControl::setPosition(qint64 position)
|
||||
{
|
||||
if (m_position != position) {
|
||||
m_position = position;
|
||||
@@ -296,12 +296,12 @@ void BbMediaPlayerControl::setPosition(qint64 position)
|
||||
}
|
||||
}
|
||||
|
||||
int BbMediaPlayerControl::volume() const
|
||||
int MmRendererMediaPlayerControl::volume() const
|
||||
{
|
||||
return m_volume;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setVolumeInternal(int newVolume)
|
||||
void MmRendererMediaPlayerControl::setVolumeInternal(int newVolume)
|
||||
{
|
||||
if (!m_context)
|
||||
return;
|
||||
@@ -315,7 +315,7 @@ void BbMediaPlayerControl::setVolumeInternal(int newVolume)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setPlaybackRateInternal(qreal rate)
|
||||
void MmRendererMediaPlayerControl::setPlaybackRateInternal(qreal rate)
|
||||
{
|
||||
if (!m_context)
|
||||
return;
|
||||
@@ -325,7 +325,7 @@ void BbMediaPlayerControl::setPlaybackRateInternal(qreal rate)
|
||||
emitMmError("mmr_speed_set failed");
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setPositionInternal(qint64 position)
|
||||
void MmRendererMediaPlayerControl::setPositionInternal(qint64 position)
|
||||
{
|
||||
if (!m_context)
|
||||
return;
|
||||
@@ -336,7 +336,7 @@ void BbMediaPlayerControl::setPositionInternal(qint64 position)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setMediaStatus(QMediaPlayer::MediaStatus status)
|
||||
void MmRendererMediaPlayerControl::setMediaStatus(QMediaPlayer::MediaStatus status)
|
||||
{
|
||||
if (m_mediaStatus != status) {
|
||||
m_mediaStatus = status;
|
||||
@@ -344,7 +344,7 @@ void BbMediaPlayerControl::setMediaStatus(QMediaPlayer::MediaStatus status)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setState(QMediaPlayer::State state)
|
||||
void MmRendererMediaPlayerControl::setState(QMediaPlayer::State state)
|
||||
{
|
||||
if (m_state != state) {
|
||||
if (m_videoRendererControl) {
|
||||
@@ -361,7 +361,7 @@ void BbMediaPlayerControl::setState(QMediaPlayer::State state)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::stopInternal(StopCommand stopCommand)
|
||||
void MmRendererMediaPlayerControl::stopInternal(StopCommand stopCommand)
|
||||
{
|
||||
if (m_state != QMediaPlayer::StoppedState) {
|
||||
|
||||
@@ -379,7 +379,7 @@ void BbMediaPlayerControl::stopInternal(StopCommand stopCommand)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setVolume(int volume)
|
||||
void MmRendererMediaPlayerControl::setVolume(int volume)
|
||||
{
|
||||
const int newVolume = qBound(0, volume, 100);
|
||||
if (m_volume != newVolume) {
|
||||
@@ -390,12 +390,12 @@ void BbMediaPlayerControl::setVolume(int volume)
|
||||
}
|
||||
}
|
||||
|
||||
bool BbMediaPlayerControl::isMuted() const
|
||||
bool MmRendererMediaPlayerControl::isMuted() const
|
||||
{
|
||||
return m_muted;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setMuted(bool muted)
|
||||
void MmRendererMediaPlayerControl::setMuted(bool muted)
|
||||
{
|
||||
if (m_muted != muted) {
|
||||
m_muted = muted;
|
||||
@@ -404,38 +404,38 @@ void BbMediaPlayerControl::setMuted(bool muted)
|
||||
}
|
||||
}
|
||||
|
||||
int BbMediaPlayerControl::bufferStatus() const
|
||||
int MmRendererMediaPlayerControl::bufferStatus() const
|
||||
{
|
||||
return m_bufferStatus;
|
||||
}
|
||||
|
||||
bool BbMediaPlayerControl::isAudioAvailable() const
|
||||
bool MmRendererMediaPlayerControl::isAudioAvailable() const
|
||||
{
|
||||
return m_metaData.hasAudio();
|
||||
}
|
||||
|
||||
bool BbMediaPlayerControl::isVideoAvailable() const
|
||||
bool MmRendererMediaPlayerControl::isVideoAvailable() const
|
||||
{
|
||||
return m_metaData.hasVideo();
|
||||
}
|
||||
|
||||
bool BbMediaPlayerControl::isSeekable() const
|
||||
bool MmRendererMediaPlayerControl::isSeekable() const
|
||||
{
|
||||
return m_metaData.isSeekable();
|
||||
}
|
||||
|
||||
QMediaTimeRange BbMediaPlayerControl::availablePlaybackRanges() const
|
||||
QMediaTimeRange MmRendererMediaPlayerControl::availablePlaybackRanges() const
|
||||
{
|
||||
// We can't get this information from the mmrenderer API yet, so pretend we can seek everywhere
|
||||
return QMediaTimeRange(0, m_metaData.duration());
|
||||
}
|
||||
|
||||
qreal BbMediaPlayerControl::playbackRate() const
|
||||
qreal MmRendererMediaPlayerControl::playbackRate() const
|
||||
{
|
||||
return m_rate;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setPlaybackRate(qreal rate)
|
||||
void MmRendererMediaPlayerControl::setPlaybackRate(qreal rate)
|
||||
{
|
||||
if (m_rate != rate) {
|
||||
m_rate = rate;
|
||||
@@ -444,18 +444,18 @@ void BbMediaPlayerControl::setPlaybackRate(qreal rate)
|
||||
}
|
||||
}
|
||||
|
||||
QMediaContent BbMediaPlayerControl::media() const
|
||||
QMediaContent MmRendererMediaPlayerControl::media() const
|
||||
{
|
||||
return m_media;
|
||||
}
|
||||
|
||||
const QIODevice *BbMediaPlayerControl::mediaStream() const
|
||||
const QIODevice *MmRendererMediaPlayerControl::mediaStream() const
|
||||
{
|
||||
// Always 0, we don't support QIODevice streams
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *stream)
|
||||
void MmRendererMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *stream)
|
||||
{
|
||||
Q_UNUSED(stream); // not supported
|
||||
|
||||
@@ -479,7 +479,7 @@ void BbMediaPlayerControl::setMedia(const QMediaContent &media, QIODevice *strea
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::continueLoadMedia()
|
||||
void MmRendererMediaPlayerControl::continueLoadMedia()
|
||||
{
|
||||
attach();
|
||||
updateMetaData();
|
||||
@@ -487,17 +487,17 @@ void BbMediaPlayerControl::continueLoadMedia()
|
||||
play();
|
||||
}
|
||||
|
||||
QString BbMediaPlayerControl::contextName() const
|
||||
QString MmRendererMediaPlayerControl::contextName() const
|
||||
{
|
||||
return m_contextName;
|
||||
}
|
||||
|
||||
BbVideoWindowControl *BbMediaPlayerControl::videoWindowControl() const
|
||||
MmRendererVideoWindowControl *MmRendererMediaPlayerControl::videoWindowControl() const
|
||||
{
|
||||
return m_videoWindowControl;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::play()
|
||||
void MmRendererMediaPlayerControl::play()
|
||||
{
|
||||
if (m_playAfterMediaLoaded)
|
||||
m_playAfterMediaLoaded = false;
|
||||
@@ -542,7 +542,7 @@ void BbMediaPlayerControl::play()
|
||||
setState( QMediaPlayer::PlayingState);
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::pause()
|
||||
void MmRendererMediaPlayerControl::pause()
|
||||
{
|
||||
if (m_state == QMediaPlayer::PlayingState) {
|
||||
setPlaybackRateInternal(0);
|
||||
@@ -550,32 +550,32 @@ void BbMediaPlayerControl::pause()
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::stop()
|
||||
void MmRendererMediaPlayerControl::stop()
|
||||
{
|
||||
stopInternal(StopMmRenderer);
|
||||
}
|
||||
|
||||
BbPlayerVideoRendererControl *BbMediaPlayerControl::videoRendererControl() const
|
||||
MmRendererPlayerVideoRendererControl *MmRendererMediaPlayerControl::videoRendererControl() const
|
||||
{
|
||||
return m_videoRendererControl;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setVideoRendererControl(BbPlayerVideoRendererControl *videoControl)
|
||||
void MmRendererMediaPlayerControl::setVideoRendererControl(MmRendererPlayerVideoRendererControl *videoControl)
|
||||
{
|
||||
m_videoRendererControl = videoControl;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setVideoWindowControl(BbVideoWindowControl *videoControl)
|
||||
void MmRendererMediaPlayerControl::setVideoWindowControl(MmRendererVideoWindowControl *videoControl)
|
||||
{
|
||||
m_videoWindowControl = videoControl;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setMetaDataReaderControl(BbMetaDataReaderControl *metaDataReaderControl)
|
||||
void MmRendererMediaPlayerControl::setMetaDataReaderControl(MmRendererMetaDataReaderControl *metaDataReaderControl)
|
||||
{
|
||||
m_metaDataReaderControl = metaDataReaderControl;
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setMmPosition(qint64 newPosition)
|
||||
void MmRendererMediaPlayerControl::setMmPosition(qint64 newPosition)
|
||||
{
|
||||
if (newPosition != 0 && newPosition != m_position) {
|
||||
m_position = newPosition;
|
||||
@@ -583,7 +583,7 @@ void BbMediaPlayerControl::setMmPosition(qint64 newPosition)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::setMmBufferStatus(const QString &bufferStatus)
|
||||
void MmRendererMediaPlayerControl::setMmBufferStatus(const QString &bufferStatus)
|
||||
{
|
||||
const int slashPos = bufferStatus.indexOf('/');
|
||||
if (slashPos != -1) {
|
||||
@@ -596,7 +596,7 @@ void BbMediaPlayerControl::setMmBufferStatus(const QString &bufferStatus)
|
||||
}
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::updateMetaData()
|
||||
void MmRendererMediaPlayerControl::updateMetaData()
|
||||
{
|
||||
if (m_mediaStatus == QMediaPlayer::LoadedMedia)
|
||||
m_metaData.parse(m_contextName);
|
||||
@@ -616,7 +616,7 @@ void BbMediaPlayerControl::updateMetaData()
|
||||
emit seekableChanged(m_metaData.isSeekable());
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::emitMmError(const QString &msg)
|
||||
void MmRendererMediaPlayerControl::emitMmError(const QString &msg)
|
||||
{
|
||||
int errorCode = MMR_ERROR_NONE;
|
||||
const QString errorMessage = mmErrorMessage(msg, m_context, &errorCode);
|
||||
@@ -624,7 +624,7 @@ void BbMediaPlayerControl::emitMmError(const QString &msg)
|
||||
emit error(errorCode, errorMessage);
|
||||
}
|
||||
|
||||
void BbMediaPlayerControl::emitPError(const QString &msg)
|
||||
void MmRendererMediaPlayerControl::emitPError(const QString &msg)
|
||||
{
|
||||
const QString errorMessage = QString("%1: %2").arg(msg).arg(strerror(errno));
|
||||
qDebug() << errorMessage;
|
||||
@@ -38,10 +38,10 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef BBMEDIAPLAYERCONTROL_H
|
||||
#define BBMEDIAPLAYERCONTROL_H
|
||||
#ifndef MMRENDERERMEDIAPLAYERCONTROL_H
|
||||
#define MMRENDERERMEDIAPLAYERCONTROL_H
|
||||
|
||||
#include "bbmetadata.h"
|
||||
#include "mmrenderermetadata.h"
|
||||
#include <qmediaplayercontrol.h>
|
||||
#include <QtCore/qabstractnativeeventfilter.h>
|
||||
#include <QtCore/qpointer.h>
|
||||
@@ -53,15 +53,15 @@ typedef struct mmrenderer_monitor mmrenderer_monitor_t;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class BbMetaDataReaderControl;
|
||||
class BbPlayerVideoRendererControl;
|
||||
class BbVideoWindowControl;
|
||||
class MmRendererMetaDataReaderControl;
|
||||
class MmRendererPlayerVideoRendererControl;
|
||||
class MmRendererVideoWindowControl;
|
||||
|
||||
class BbMediaPlayerControl : public QMediaPlayerControl, public QAbstractNativeEventFilter
|
||||
class MmRendererMediaPlayerControl : public QMediaPlayerControl, public QAbstractNativeEventFilter
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BbMediaPlayerControl(QObject *parent = 0);
|
||||
explicit MmRendererMediaPlayerControl(QObject *parent = 0);
|
||||
|
||||
QMediaPlayer::State state() const Q_DECL_OVERRIDE;
|
||||
|
||||
@@ -98,12 +98,12 @@ public:
|
||||
void pause() Q_DECL_OVERRIDE;
|
||||
void stop() Q_DECL_OVERRIDE;
|
||||
|
||||
BbPlayerVideoRendererControl *videoRendererControl() const;
|
||||
void setVideoRendererControl(BbPlayerVideoRendererControl *videoControl);
|
||||
MmRendererPlayerVideoRendererControl *videoRendererControl() const;
|
||||
void setVideoRendererControl(MmRendererPlayerVideoRendererControl *videoControl);
|
||||
|
||||
BbVideoWindowControl *videoWindowControl() const;
|
||||
void setVideoWindowControl(BbVideoWindowControl *videoControl);
|
||||
void setMetaDataReaderControl(BbMetaDataReaderControl *metaDataReaderControl);
|
||||
MmRendererVideoWindowControl *videoWindowControl() const;
|
||||
void setVideoWindowControl(MmRendererVideoWindowControl *videoControl);
|
||||
void setMetaDataReaderControl(MmRendererMetaDataReaderControl *metaDataReaderControl);
|
||||
|
||||
protected:
|
||||
virtual void startMonitoring(int contextId, const QString &contextName) = 0;
|
||||
@@ -152,10 +152,10 @@ private:
|
||||
int m_volume;
|
||||
bool m_muted;
|
||||
qreal m_rate;
|
||||
QPointer<BbPlayerVideoRendererControl> m_videoRendererControl;
|
||||
QPointer<BbVideoWindowControl> m_videoWindowControl;
|
||||
QPointer<BbMetaDataReaderControl> m_metaDataReaderControl;
|
||||
BbMetaData m_metaData;
|
||||
QPointer<MmRendererPlayerVideoRendererControl> m_videoRendererControl;
|
||||
QPointer<MmRendererVideoWindowControl> m_videoWindowControl;
|
||||
QPointer<MmRendererMetaDataReaderControl> m_metaDataReaderControl;
|
||||
MmRendererMetaData m_metaData;
|
||||
int m_id;
|
||||
qint64 m_position;
|
||||
QMediaPlayer::MediaStatus m_mediaStatus;
|
||||
@@ -38,13 +38,13 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "bbmediaplayerservice.h"
|
||||
#include "mmrenderermediaplayerservice.h"
|
||||
|
||||
#include "bbmediaplayercontrol.h"
|
||||
#include "bbmetadatareadercontrol.h"
|
||||
#include "bbplayervideorenderercontrol.h"
|
||||
#include "bbutil.h"
|
||||
#include "bbvideowindowcontrol.h"
|
||||
#include "mmrenderermediaplayercontrol.h"
|
||||
#include "mmrenderermetadatareadercontrol.h"
|
||||
#include "mmrendererplayervideorenderercontrol.h"
|
||||
#include "mmrendererutil.h"
|
||||
#include "mmrenderervideowindowcontrol.h"
|
||||
|
||||
#ifdef Q_OS_BLACKBERRY
|
||||
#include "bpsmediaplayercontrol.h"
|
||||
@@ -56,7 +56,7 @@ typedef PpsMediaPlayerControl PlatformSpecificMediaPlayerControl;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
BbMediaPlayerService::BbMediaPlayerService(QObject *parent)
|
||||
MmRendererMediaPlayerService::MmRendererMediaPlayerService(QObject *parent)
|
||||
: QMediaService(parent),
|
||||
m_videoRendererControl(0),
|
||||
m_videoWindowControl(0),
|
||||
@@ -67,7 +67,7 @@ BbMediaPlayerService::BbMediaPlayerService(QObject *parent)
|
||||
{
|
||||
}
|
||||
|
||||
BbMediaPlayerService::~BbMediaPlayerService()
|
||||
MmRendererMediaPlayerService::~MmRendererMediaPlayerService()
|
||||
{
|
||||
// Someone should have called releaseControl(), but better be safe
|
||||
delete m_videoRendererControl;
|
||||
@@ -76,7 +76,7 @@ BbMediaPlayerService::~BbMediaPlayerService()
|
||||
delete m_metaDataReaderControl;
|
||||
}
|
||||
|
||||
QMediaControl *BbMediaPlayerService::requestControl(const char *name)
|
||||
QMediaControl *MmRendererMediaPlayerService::requestControl(const char *name)
|
||||
{
|
||||
if (qstrcmp(name, QMediaPlayerControl_iid) == 0) {
|
||||
if (!m_mediaPlayerControl) {
|
||||
@@ -87,7 +87,7 @@ QMediaControl *BbMediaPlayerService::requestControl(const char *name)
|
||||
}
|
||||
else if (qstrcmp(name, QMetaDataReaderControl_iid) == 0) {
|
||||
if (!m_metaDataReaderControl) {
|
||||
m_metaDataReaderControl = new BbMetaDataReaderControl();
|
||||
m_metaDataReaderControl = new MmRendererMetaDataReaderControl();
|
||||
updateControls();
|
||||
}
|
||||
return m_metaDataReaderControl;
|
||||
@@ -106,14 +106,14 @@ QMediaControl *BbMediaPlayerService::requestControl(const char *name)
|
||||
}
|
||||
|
||||
if (!m_videoRendererControl) {
|
||||
m_videoRendererControl = new BbPlayerVideoRendererControl();
|
||||
m_videoRendererControl = new MmRendererPlayerVideoRendererControl();
|
||||
updateControls();
|
||||
}
|
||||
return m_videoRendererControl;
|
||||
}
|
||||
else if (qstrcmp(name, QVideoWindowControl_iid) == 0) {
|
||||
if (!m_videoWindowControl) {
|
||||
m_videoWindowControl = new BbVideoWindowControl();
|
||||
m_videoWindowControl = new MmRendererVideoWindowControl();
|
||||
updateControls();
|
||||
}
|
||||
return m_videoWindowControl;
|
||||
@@ -121,7 +121,7 @@ QMediaControl *BbMediaPlayerService::requestControl(const char *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BbMediaPlayerService::releaseControl(QMediaControl *control)
|
||||
void MmRendererMediaPlayerService::releaseControl(QMediaControl *control)
|
||||
{
|
||||
if (control == m_videoRendererControl)
|
||||
m_videoRendererControl = 0;
|
||||
@@ -134,7 +134,7 @@ void BbMediaPlayerService::releaseControl(QMediaControl *control)
|
||||
delete control;
|
||||
}
|
||||
|
||||
void BbMediaPlayerService::updateControls()
|
||||
void MmRendererMediaPlayerService::updateControls()
|
||||
{
|
||||
if (m_videoRendererControl && m_mediaPlayerControl)
|
||||
m_mediaPlayerControl->setVideoRendererControl(m_videoRendererControl);
|
||||
@@ -38,25 +38,25 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef BBMEDIAPLAYERSERVICE_H
|
||||
#define BBMEDIAPLAYERSERVICE_H
|
||||
#ifndef MMRENDERERMEDIAPLAYERSERVICE_H
|
||||
#define MMRENDERERMEDIAPLAYERSERVICE_H
|
||||
|
||||
#include <qmediaservice.h>
|
||||
#include <QtCore/qpointer.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class BbMediaPlayerControl;
|
||||
class BbMetaDataReaderControl;
|
||||
class BbPlayerVideoRendererControl;
|
||||
class BbVideoWindowControl;
|
||||
class MmRendererMediaPlayerControl;
|
||||
class MmRendererMetaDataReaderControl;
|
||||
class MmRendererPlayerVideoRendererControl;
|
||||
class MmRendererVideoWindowControl;
|
||||
|
||||
class BbMediaPlayerService : public QMediaService
|
||||
class MmRendererMediaPlayerService : public QMediaService
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BbMediaPlayerService(QObject *parent = 0);
|
||||
~BbMediaPlayerService();
|
||||
explicit MmRendererMediaPlayerService(QObject *parent = 0);
|
||||
~MmRendererMediaPlayerService();
|
||||
|
||||
QMediaControl *requestControl(const char *name) Q_DECL_OVERRIDE;
|
||||
void releaseControl(QMediaControl *control) Q_DECL_OVERRIDE;
|
||||
@@ -64,10 +64,10 @@ public:
|
||||
private:
|
||||
void updateControls();
|
||||
|
||||
QPointer<BbPlayerVideoRendererControl> m_videoRendererControl;
|
||||
QPointer<BbVideoWindowControl> m_videoWindowControl;
|
||||
QPointer<BbMediaPlayerControl> m_mediaPlayerControl;
|
||||
QPointer<BbMetaDataReaderControl> m_metaDataReaderControl;
|
||||
QPointer<MmRendererPlayerVideoRendererControl> m_videoRendererControl;
|
||||
QPointer<MmRendererVideoWindowControl> m_videoWindowControl;
|
||||
QPointer<MmRendererMediaPlayerControl> m_mediaPlayerControl;
|
||||
QPointer<MmRendererMetaDataReaderControl> m_metaDataReaderControl;
|
||||
|
||||
bool m_appHasDrmPermission : 1;
|
||||
bool m_appHasDrmPermissionChecked : 1;
|
||||
@@ -38,7 +38,7 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "bbmetadata.h"
|
||||
#include "mmrenderermetadata.h"
|
||||
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qfile.h>
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
BbMetaData::BbMetaData()
|
||||
MmRendererMetaData::MmRendererMetaData()
|
||||
{
|
||||
clear();
|
||||
}
|
||||
@@ -71,7 +71,7 @@ static const char * seekableKey = "md_title_seekable";
|
||||
static const int mediaTypeAudioFlag = 4;
|
||||
static const int mediaTypeVideoFlag = 2;
|
||||
|
||||
bool BbMetaData::parse(const QString &contextName)
|
||||
bool MmRendererMetaData::parse(const QString &contextName)
|
||||
{
|
||||
clear();
|
||||
QString fileName =
|
||||
@@ -138,7 +138,7 @@ bool BbMetaData::parse(const QString &contextName)
|
||||
return true;
|
||||
}
|
||||
|
||||
void BbMetaData::clear()
|
||||
void MmRendererMetaData::clear()
|
||||
{
|
||||
m_duration = 0;
|
||||
m_height = 0;
|
||||
@@ -158,7 +158,7 @@ void BbMetaData::clear()
|
||||
m_track = 0;
|
||||
}
|
||||
|
||||
qlonglong BbMetaData::duration() const
|
||||
qlonglong MmRendererMetaData::duration() const
|
||||
{
|
||||
return m_duration;
|
||||
}
|
||||
@@ -173,17 +173,17 @@ qlonglong BbMetaData::duration() const
|
||||
// is 600x200, which will cause the video to be displayed in an aspect ratio of 3:1 instead of 3:2,
|
||||
// and therefore look correct.
|
||||
|
||||
int BbMetaData::height() const
|
||||
int MmRendererMetaData::height() const
|
||||
{
|
||||
return m_height * m_pixelHeight;
|
||||
}
|
||||
|
||||
int BbMetaData::width() const
|
||||
int MmRendererMetaData::width() const
|
||||
{
|
||||
return m_width * m_pixelWidth;
|
||||
}
|
||||
|
||||
bool BbMetaData::hasVideo() const
|
||||
bool MmRendererMetaData::hasVideo() const
|
||||
{
|
||||
// By default, assume no video if we can't extract the information
|
||||
if (m_mediaType == -1)
|
||||
@@ -192,7 +192,7 @@ bool BbMetaData::hasVideo() const
|
||||
return (m_mediaType & mediaTypeVideoFlag);
|
||||
}
|
||||
|
||||
bool BbMetaData::hasAudio() const
|
||||
bool MmRendererMetaData::hasAudio() const
|
||||
{
|
||||
// By default, assume audio only if we can't extract the information
|
||||
if (m_mediaType == -1)
|
||||
@@ -201,37 +201,37 @@ bool BbMetaData::hasAudio() const
|
||||
return (m_mediaType & mediaTypeAudioFlag);
|
||||
}
|
||||
|
||||
QString BbMetaData::title() const
|
||||
QString MmRendererMetaData::title() const
|
||||
{
|
||||
return m_title;
|
||||
}
|
||||
|
||||
bool BbMetaData::isSeekable() const
|
||||
bool MmRendererMetaData::isSeekable() const
|
||||
{
|
||||
return m_seekable;
|
||||
}
|
||||
|
||||
QString BbMetaData::artist() const
|
||||
QString MmRendererMetaData::artist() const
|
||||
{
|
||||
return m_artist;
|
||||
}
|
||||
|
||||
QString BbMetaData::comment() const
|
||||
QString MmRendererMetaData::comment() const
|
||||
{
|
||||
return m_comment;
|
||||
}
|
||||
|
||||
QString BbMetaData::genre() const
|
||||
QString MmRendererMetaData::genre() const
|
||||
{
|
||||
return m_genre;
|
||||
}
|
||||
|
||||
int BbMetaData::year() const
|
||||
int MmRendererMetaData::year() const
|
||||
{
|
||||
return m_year;
|
||||
}
|
||||
|
||||
QString BbMetaData::mediaType() const
|
||||
QString MmRendererMetaData::mediaType() const
|
||||
{
|
||||
if (hasVideo())
|
||||
return QLatin1String("video");
|
||||
@@ -241,27 +241,27 @@ QString BbMetaData::mediaType() const
|
||||
return QString();
|
||||
}
|
||||
|
||||
int BbMetaData::audioBitRate() const
|
||||
int MmRendererMetaData::audioBitRate() const
|
||||
{
|
||||
return m_audioBitRate;
|
||||
}
|
||||
|
||||
int BbMetaData::sampleRate() const
|
||||
int MmRendererMetaData::sampleRate() const
|
||||
{
|
||||
return m_sampleRate;
|
||||
}
|
||||
|
||||
QString BbMetaData::album() const
|
||||
QString MmRendererMetaData::album() const
|
||||
{
|
||||
return m_album;
|
||||
}
|
||||
|
||||
int BbMetaData::track() const
|
||||
int MmRendererMetaData::track() const
|
||||
{
|
||||
return m_track;
|
||||
}
|
||||
|
||||
QSize BbMetaData::resolution() const
|
||||
QSize MmRendererMetaData::resolution() const
|
||||
{
|
||||
return QSize(width(), height());
|
||||
}
|
||||
@@ -38,8 +38,8 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef BBMETADATA_H
|
||||
#define BBMETADATA_H
|
||||
#ifndef MMRENDERERMETADATA_H
|
||||
#define MMRENDERERMETADATA_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/QSize>
|
||||
@@ -47,10 +47,10 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class BbMetaData
|
||||
class MmRendererMetaData
|
||||
{
|
||||
public:
|
||||
BbMetaData();
|
||||
MmRendererMetaData();
|
||||
bool parse(const QString &contextName);
|
||||
void clear();
|
||||
|
||||
@@ -38,22 +38,22 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "bbmetadatareadercontrol.h"
|
||||
#include "mmrenderermetadatareadercontrol.h"
|
||||
#include <QtMultimedia/qmediametadata.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
BbMetaDataReaderControl::BbMetaDataReaderControl(QObject *parent)
|
||||
MmRendererMetaDataReaderControl::MmRendererMetaDataReaderControl(QObject *parent)
|
||||
: QMetaDataReaderControl(parent)
|
||||
{
|
||||
}
|
||||
|
||||
bool BbMetaDataReaderControl::isMetaDataAvailable() const
|
||||
bool MmRendererMetaDataReaderControl::isMetaDataAvailable() const
|
||||
{
|
||||
return !availableMetaData().isEmpty();
|
||||
}
|
||||
|
||||
QVariant BbMetaDataReaderControl::metaData(const QString &key) const
|
||||
QVariant MmRendererMetaDataReaderControl::metaData(const QString &key) const
|
||||
{
|
||||
if (key == QMediaMetaData::Title)
|
||||
return m_metaData.title();
|
||||
@@ -83,7 +83,7 @@ QVariant BbMetaDataReaderControl::metaData(const QString &key) const
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
QStringList BbMetaDataReaderControl::availableMetaData() const
|
||||
QStringList MmRendererMetaDataReaderControl::availableMetaData() const
|
||||
{
|
||||
QStringList metaData;
|
||||
|
||||
@@ -115,9 +115,9 @@ QStringList BbMetaDataReaderControl::availableMetaData() const
|
||||
return metaData;
|
||||
}
|
||||
|
||||
void BbMetaDataReaderControl::setMetaData(const BbMetaData &data)
|
||||
void MmRendererMetaDataReaderControl::setMetaData(const MmRendererMetaData &data)
|
||||
{
|
||||
const BbMetaData oldMetaData = m_metaData;
|
||||
const MmRendererMetaData oldMetaData = m_metaData;
|
||||
const bool oldMetaDataAvailable = isMetaDataAvailable();
|
||||
|
||||
m_metaData = data;
|
||||
@@ -38,29 +38,29 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef BBMETADATAREADERCONTROL_H
|
||||
#define BBMETADATAREADERCONTROL_H
|
||||
#ifndef MMRENDERERMETADATAREADERCONTROL_H
|
||||
#define MMRENDERERMETADATAREADERCONTROL_H
|
||||
|
||||
#include "bbmetadata.h"
|
||||
#include "mmrenderermetadata.h"
|
||||
#include <qmetadatareadercontrol.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class BbMetaDataReaderControl : public QMetaDataReaderControl
|
||||
class MmRendererMetaDataReaderControl : public QMetaDataReaderControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BbMetaDataReaderControl(QObject *parent = 0);
|
||||
explicit MmRendererMetaDataReaderControl(QObject *parent = 0);
|
||||
|
||||
bool isMetaDataAvailable() const Q_DECL_OVERRIDE;
|
||||
|
||||
QVariant metaData(const QString &key) const Q_DECL_OVERRIDE;
|
||||
QStringList availableMetaData() const Q_DECL_OVERRIDE;
|
||||
|
||||
void setMetaData(const BbMetaData &data);
|
||||
void setMetaData(const MmRendererMetaData &data);
|
||||
|
||||
private:
|
||||
BbMetaData m_metaData;
|
||||
MmRendererMetaData m_metaData;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
@@ -39,7 +39,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "bbplayervideorenderercontrol.h"
|
||||
#include "mmrendererplayervideorenderercontrol.h"
|
||||
|
||||
#include "windowgrabber.h"
|
||||
|
||||
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
static int winIdCounter = 0;
|
||||
|
||||
BbPlayerVideoRendererControl::BbPlayerVideoRendererControl(QObject *parent)
|
||||
MmRendererPlayerVideoRendererControl::MmRendererPlayerVideoRendererControl(QObject *parent)
|
||||
: QVideoRendererControl(parent)
|
||||
, m_windowGrabber(new WindowGrabber(this))
|
||||
, m_context(0)
|
||||
@@ -62,40 +62,40 @@ BbPlayerVideoRendererControl::BbPlayerVideoRendererControl(QObject *parent)
|
||||
connect(m_windowGrabber, SIGNAL(frameGrabbed(QImage)), SLOT(frameGrabbed(QImage)));
|
||||
}
|
||||
|
||||
BbPlayerVideoRendererControl::~BbPlayerVideoRendererControl()
|
||||
MmRendererPlayerVideoRendererControl::~MmRendererPlayerVideoRendererControl()
|
||||
{
|
||||
detachDisplay();
|
||||
}
|
||||
|
||||
QAbstractVideoSurface *BbPlayerVideoRendererControl::surface() const
|
||||
QAbstractVideoSurface *MmRendererPlayerVideoRendererControl::surface() const
|
||||
{
|
||||
return m_surface;
|
||||
}
|
||||
|
||||
void BbPlayerVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
|
||||
void MmRendererPlayerVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
|
||||
{
|
||||
m_surface = QPointer<QAbstractVideoSurface>(surface);
|
||||
}
|
||||
|
||||
void BbPlayerVideoRendererControl::attachDisplay(mmr_context_t *context)
|
||||
void MmRendererPlayerVideoRendererControl::attachDisplay(mmr_context_t *context)
|
||||
{
|
||||
if (m_videoId != -1) {
|
||||
qWarning() << "BbPlayerVideoRendererControl: Video output already attached!";
|
||||
qWarning() << "MmRendererPlayerVideoRendererControl: Video output already attached!";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!context) {
|
||||
qWarning() << "BbPlayerVideoRendererControl: No media player context!";
|
||||
qWarning() << "MmRendererPlayerVideoRendererControl: No media player context!";
|
||||
return;
|
||||
}
|
||||
|
||||
const QByteArray windowGroupId = m_windowGrabber->windowGroupId();
|
||||
if (windowGroupId.isEmpty()) {
|
||||
qWarning() << "BbPlayerVideoRendererControl: Unable to find window group";
|
||||
qWarning() << "MmRendererPlayerVideoRendererControl: Unable to find window group";
|
||||
return;
|
||||
}
|
||||
|
||||
const QString windowName = QStringLiteral("BbPlayerVideoRendererControl_%1_%2")
|
||||
const QString windowName = QStringLiteral("MmRendererPlayerVideoRendererControl_%1_%2")
|
||||
.arg(winIdCounter++)
|
||||
.arg(QCoreApplication::applicationPid());
|
||||
|
||||
@@ -115,7 +115,7 @@ void BbPlayerVideoRendererControl::attachDisplay(mmr_context_t *context)
|
||||
m_context = context;
|
||||
}
|
||||
|
||||
void BbPlayerVideoRendererControl::detachDisplay()
|
||||
void MmRendererPlayerVideoRendererControl::detachDisplay()
|
||||
{
|
||||
m_windowGrabber->stop();
|
||||
|
||||
@@ -129,17 +129,17 @@ void BbPlayerVideoRendererControl::detachDisplay()
|
||||
m_videoId = -1;
|
||||
}
|
||||
|
||||
void BbPlayerVideoRendererControl::pause()
|
||||
void MmRendererPlayerVideoRendererControl::pause()
|
||||
{
|
||||
m_windowGrabber->pause();
|
||||
}
|
||||
|
||||
void BbPlayerVideoRendererControl::resume()
|
||||
void MmRendererPlayerVideoRendererControl::resume()
|
||||
{
|
||||
m_windowGrabber->resume();
|
||||
}
|
||||
|
||||
void BbPlayerVideoRendererControl::frameGrabbed(const QImage &frame)
|
||||
void MmRendererPlayerVideoRendererControl::frameGrabbed(const QImage &frame)
|
||||
{
|
||||
if (m_surface) {
|
||||
if (!m_surface->isActive()) {
|
||||
@@ -38,8 +38,8 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef BBPLAYERVIDEORENDERERCONTROL_H
|
||||
#define BBPLAYERVIDEORENDERERCONTROL_H
|
||||
#ifndef MMRENDERERPLAYERVIDEORENDERERCONTROL_H
|
||||
#define MMRENDERERPLAYERVIDEORENDERERCONTROL_H
|
||||
|
||||
#include <QPointer>
|
||||
#include <qabstractvideosurface.h>
|
||||
@@ -51,12 +51,12 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class WindowGrabber;
|
||||
|
||||
class BbPlayerVideoRendererControl : public QVideoRendererControl
|
||||
class MmRendererPlayerVideoRendererControl : public QVideoRendererControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BbPlayerVideoRendererControl(QObject *parent = 0);
|
||||
~BbPlayerVideoRendererControl();
|
||||
explicit MmRendererPlayerVideoRendererControl(QObject *parent = 0);
|
||||
~MmRendererPlayerVideoRendererControl();
|
||||
|
||||
QAbstractVideoSurface *surface() const Q_DECL_OVERRIDE;
|
||||
void setSurface(QAbstractVideoSurface *surface) Q_DECL_OVERRIDE;
|
||||
@@ -38,7 +38,7 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "bbutil.h"
|
||||
#include "mmrendererutil.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
@@ -38,8 +38,8 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef BBUTIL_H
|
||||
#define BBUTIL_H
|
||||
#ifndef MMRENDERERUTIL_H
|
||||
#define MMRENDERERUTIL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#include "bbvideowindowcontrol.h"
|
||||
#include "bbutil.h"
|
||||
#include "mmrenderervideowindowcontrol.h"
|
||||
#include "mmrendererutil.h"
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtGui/qguiapplication.h>
|
||||
#include <QtGui/qpa/qplatformnativeinterface.h>
|
||||
@@ -51,7 +51,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
static int winIdCounter = 0;
|
||||
|
||||
BbVideoWindowControl::BbVideoWindowControl(QObject *parent)
|
||||
MmRendererVideoWindowControl::MmRendererVideoWindowControl(QObject *parent)
|
||||
: QVideoWindowControl(parent),
|
||||
m_videoId(-1),
|
||||
m_winId(0),
|
||||
@@ -66,26 +66,26 @@ BbVideoWindowControl::BbVideoWindowControl(QObject *parent)
|
||||
{
|
||||
}
|
||||
|
||||
BbVideoWindowControl::~BbVideoWindowControl()
|
||||
MmRendererVideoWindowControl::~MmRendererVideoWindowControl()
|
||||
{
|
||||
}
|
||||
|
||||
WId BbVideoWindowControl::winId() const
|
||||
WId MmRendererVideoWindowControl::winId() const
|
||||
{
|
||||
return m_winId;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setWinId(WId id)
|
||||
void MmRendererVideoWindowControl::setWinId(WId id)
|
||||
{
|
||||
m_winId = id;
|
||||
}
|
||||
|
||||
QRect BbVideoWindowControl::displayRect() const
|
||||
QRect MmRendererVideoWindowControl::displayRect() const
|
||||
{
|
||||
return m_displayRect ;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setDisplayRect(const QRect &rect)
|
||||
void MmRendererVideoWindowControl::setDisplayRect(const QRect &rect)
|
||||
{
|
||||
if (m_displayRect != rect) {
|
||||
m_displayRect = rect;
|
||||
@@ -93,12 +93,12 @@ void BbVideoWindowControl::setDisplayRect(const QRect &rect)
|
||||
}
|
||||
}
|
||||
|
||||
bool BbVideoWindowControl::isFullScreen() const
|
||||
bool MmRendererVideoWindowControl::isFullScreen() const
|
||||
{
|
||||
return m_fullscreen;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setFullScreen(bool fullScreen)
|
||||
void MmRendererVideoWindowControl::setFullScreen(bool fullScreen)
|
||||
{
|
||||
if (m_fullscreen != fullScreen) {
|
||||
m_fullscreen = fullScreen;
|
||||
@@ -107,32 +107,32 @@ void BbVideoWindowControl::setFullScreen(bool fullScreen)
|
||||
}
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::repaint()
|
||||
void MmRendererVideoWindowControl::repaint()
|
||||
{
|
||||
// Nothing we can or should do here
|
||||
}
|
||||
|
||||
QSize BbVideoWindowControl::nativeSize() const
|
||||
QSize MmRendererVideoWindowControl::nativeSize() const
|
||||
{
|
||||
return QSize(m_metaData.width(), m_metaData.height());
|
||||
}
|
||||
|
||||
Qt::AspectRatioMode BbVideoWindowControl::aspectRatioMode() const
|
||||
Qt::AspectRatioMode MmRendererVideoWindowControl::aspectRatioMode() const
|
||||
{
|
||||
return m_aspectRatioMode;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)
|
||||
void MmRendererVideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)
|
||||
{
|
||||
m_aspectRatioMode = mode;
|
||||
}
|
||||
|
||||
int BbVideoWindowControl::brightness() const
|
||||
int MmRendererVideoWindowControl::brightness() const
|
||||
{
|
||||
return m_brightness;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setBrightness(int brightness)
|
||||
void MmRendererVideoWindowControl::setBrightness(int brightness)
|
||||
{
|
||||
if (m_brightness != brightness) {
|
||||
m_brightness = brightness;
|
||||
@@ -141,12 +141,12 @@ void BbVideoWindowControl::setBrightness(int brightness)
|
||||
}
|
||||
}
|
||||
|
||||
int BbVideoWindowControl::contrast() const
|
||||
int MmRendererVideoWindowControl::contrast() const
|
||||
{
|
||||
return m_contrast;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setContrast(int contrast)
|
||||
void MmRendererVideoWindowControl::setContrast(int contrast)
|
||||
{
|
||||
if (m_contrast != contrast) {
|
||||
m_contrast = contrast;
|
||||
@@ -155,12 +155,12 @@ void BbVideoWindowControl::setContrast(int contrast)
|
||||
}
|
||||
}
|
||||
|
||||
int BbVideoWindowControl::hue() const
|
||||
int MmRendererVideoWindowControl::hue() const
|
||||
{
|
||||
return m_hue;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setHue(int hue)
|
||||
void MmRendererVideoWindowControl::setHue(int hue)
|
||||
{
|
||||
if (m_hue != hue) {
|
||||
m_hue = hue;
|
||||
@@ -169,12 +169,12 @@ void BbVideoWindowControl::setHue(int hue)
|
||||
}
|
||||
}
|
||||
|
||||
int BbVideoWindowControl::saturation() const
|
||||
int MmRendererVideoWindowControl::saturation() const
|
||||
{
|
||||
return m_saturation;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setSaturation(int saturation)
|
||||
void MmRendererVideoWindowControl::setSaturation(int saturation)
|
||||
{
|
||||
if (m_saturation != saturation) {
|
||||
m_saturation = saturation;
|
||||
@@ -183,39 +183,39 @@ void BbVideoWindowControl::setSaturation(int saturation)
|
||||
}
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::attachDisplay(mmr_context_t *context)
|
||||
void MmRendererVideoWindowControl::attachDisplay(mmr_context_t *context)
|
||||
{
|
||||
if (m_videoId != -1) {
|
||||
qDebug() << "BbVideoWindowControl: Video output already attached!";
|
||||
qDebug() << "MmRendererVideoWindowControl: Video output already attached!";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!context) {
|
||||
qDebug() << "BbVideoWindowControl: No media player context!";
|
||||
qDebug() << "MmRendererVideoWindowControl: No media player context!";
|
||||
return;
|
||||
}
|
||||
|
||||
QWindow *window = findWindow(m_winId);
|
||||
if (!window) {
|
||||
qDebug() << "BbVideoWindowControl: No video window!";
|
||||
qDebug() << "MmRendererVideoWindowControl: No video window!";
|
||||
return;
|
||||
}
|
||||
|
||||
QPlatformNativeInterface * const nativeInterface = QGuiApplication::platformNativeInterface();
|
||||
if (!nativeInterface) {
|
||||
qDebug() << "BbVideoWindowControl: Unable to get platform native interface";
|
||||
qDebug() << "MmRendererVideoWindowControl: Unable to get platform native interface";
|
||||
return;
|
||||
}
|
||||
|
||||
const char * const groupNameData = static_cast<const char *>(
|
||||
nativeInterface->nativeResourceForWindow("windowGroup", window));
|
||||
if (!groupNameData) {
|
||||
qDebug() << "BbVideoWindowControl: Unable to find window group for window" << window;
|
||||
qDebug() << "MmRendererVideoWindowControl: Unable to find window group for window" << window;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString groupName = QString::fromLatin1(groupNameData);
|
||||
m_windowName = QString("BbVideoWindowControl_%1_%2").arg(winIdCounter++)
|
||||
m_windowName = QString("MmRendererVideoWindowControl_%1_%2").arg(winIdCounter++)
|
||||
.arg(QCoreApplication::applicationPid());
|
||||
|
||||
nativeInterface->setWindowProperty(window->handle(),
|
||||
@@ -240,7 +240,7 @@ void BbVideoWindowControl::attachDisplay(mmr_context_t *context)
|
||||
updateSaturation();
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::updateVideoPosition()
|
||||
void MmRendererVideoWindowControl::updateVideoPosition()
|
||||
{
|
||||
QWindow * const window = findWindow(m_winId);
|
||||
if (m_context && m_videoId != -1 && window) {
|
||||
@@ -306,7 +306,7 @@ void BbVideoWindowControl::updateVideoPosition()
|
||||
}
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::updateBrightness()
|
||||
void MmRendererVideoWindowControl::updateBrightness()
|
||||
{
|
||||
if (m_window != 0) {
|
||||
const int backendValue = m_brightness * 2.55f;
|
||||
@@ -315,7 +315,7 @@ void BbVideoWindowControl::updateBrightness()
|
||||
}
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::updateContrast()
|
||||
void MmRendererVideoWindowControl::updateContrast()
|
||||
{
|
||||
if (m_window != 0) {
|
||||
const int backendValue = m_contrast * 1.27f;
|
||||
@@ -324,7 +324,7 @@ void BbVideoWindowControl::updateContrast()
|
||||
}
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::updateHue()
|
||||
void MmRendererVideoWindowControl::updateHue()
|
||||
{
|
||||
if (m_window != 0) {
|
||||
const int backendValue = m_hue * 1.27f;
|
||||
@@ -333,7 +333,7 @@ void BbVideoWindowControl::updateHue()
|
||||
}
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::updateSaturation()
|
||||
void MmRendererVideoWindowControl::updateSaturation()
|
||||
{
|
||||
if (m_window != 0) {
|
||||
const int backendValue = m_saturation * 1.27f;
|
||||
@@ -342,7 +342,7 @@ void BbVideoWindowControl::updateSaturation()
|
||||
}
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::detachDisplay()
|
||||
void MmRendererVideoWindowControl::detachDisplay()
|
||||
{
|
||||
if (m_context && m_videoId != -1)
|
||||
mmr_output_detach(m_context, m_videoId);
|
||||
@@ -358,7 +358,7 @@ void BbVideoWindowControl::detachDisplay()
|
||||
m_saturation = 0;
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::setMetaData(const BbMetaData &metaData)
|
||||
void MmRendererVideoWindowControl::setMetaData(const MmRendererMetaData &metaData)
|
||||
{
|
||||
m_metaData = metaData;
|
||||
emit nativeSizeChanged();
|
||||
@@ -367,11 +367,11 @@ void BbVideoWindowControl::setMetaData(const BbMetaData &metaData)
|
||||
updateVideoPosition();
|
||||
}
|
||||
|
||||
void BbVideoWindowControl::screenEventHandler(const screen_event_t &screen_event)
|
||||
void MmRendererVideoWindowControl::screenEventHandler(const screen_event_t &screen_event)
|
||||
{
|
||||
int eventType;
|
||||
if (screen_get_event_property_iv(screen_event, SCREEN_PROPERTY_TYPE, &eventType) != 0) {
|
||||
perror("BbVideoWindowControl: Failed to query screen event type");
|
||||
perror("MmRendererVideoWindowControl: Failed to query screen event type");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -380,14 +380,14 @@ void BbVideoWindowControl::screenEventHandler(const screen_event_t &screen_event
|
||||
|
||||
screen_window_t window = 0;
|
||||
if (screen_get_event_property_pv(screen_event, SCREEN_PROPERTY_WINDOW, (void**)&window) != 0) {
|
||||
perror("BbVideoWindowControl: Failed to query window property");
|
||||
perror("MmRendererVideoWindowControl: Failed to query window property");
|
||||
return;
|
||||
}
|
||||
|
||||
const int maxIdStrLength = 128;
|
||||
char idString[maxIdStrLength];
|
||||
if (screen_get_window_property_cv(window, SCREEN_PROPERTY_ID_STRING, maxIdStrLength, idString) != 0) {
|
||||
perror("BbVideoWindowControl: Failed to query window ID string");
|
||||
perror("MmRendererVideoWindowControl: Failed to query window ID string");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -397,13 +397,13 @@ void BbVideoWindowControl::screenEventHandler(const screen_event_t &screen_event
|
||||
|
||||
const int visibleFlag = 1;
|
||||
if (screen_set_window_property_iv(m_window, SCREEN_PROPERTY_VISIBLE, &visibleFlag) != 0) {
|
||||
perror("BbVideoWindowControl: Failed to make window visible");
|
||||
perror("MmRendererVideoWindowControl: Failed to make window visible");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QWindow *BbVideoWindowControl::findWindow(WId id) const
|
||||
QWindow *MmRendererVideoWindowControl::findWindow(WId id) const
|
||||
{
|
||||
Q_FOREACH (QWindow *window, QGuiApplication::allWindows())
|
||||
if (window->winId() == id)
|
||||
@@ -38,10 +38,10 @@
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
#ifndef BBVIDEOWINDOWCONTROL_H
|
||||
#define BBVIDEOWINDOWCONTROL_H
|
||||
#ifndef MMRENDERERVIDEOWINDOWCONTROL_H
|
||||
#define MMRENDERERVIDEOWINDOWCONTROL_H
|
||||
|
||||
#include "bbmetadata.h"
|
||||
#include "mmrenderermetadata.h"
|
||||
#include <qvideowindowcontrol.h>
|
||||
#include <screen/screen.h>
|
||||
|
||||
@@ -49,12 +49,12 @@ typedef struct mmr_context mmr_context_t;
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class BbVideoWindowControl : public QVideoWindowControl
|
||||
class MmRendererVideoWindowControl : public QVideoWindowControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BbVideoWindowControl(QObject *parent = 0);
|
||||
~BbVideoWindowControl();
|
||||
explicit MmRendererVideoWindowControl(QObject *parent = 0);
|
||||
~MmRendererVideoWindowControl();
|
||||
|
||||
WId winId() const Q_DECL_OVERRIDE;
|
||||
void setWinId(WId id) Q_DECL_OVERRIDE;
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
//
|
||||
void detachDisplay();
|
||||
void attachDisplay(mmr_context_t *context);
|
||||
void setMetaData(const BbMetaData &metaData);
|
||||
void setMetaData(const MmRendererMetaData &metaData);
|
||||
void screenEventHandler(const screen_event_t &event);
|
||||
|
||||
private:
|
||||
@@ -105,7 +105,7 @@ private:
|
||||
QRect m_displayRect;
|
||||
mmr_context_t *m_context;
|
||||
bool m_fullscreen;
|
||||
BbMetaData m_metaData;
|
||||
MmRendererMetaData m_metaData;
|
||||
Qt::AspectRatioMode m_aspectRatioMode;
|
||||
QString m_windowName;
|
||||
screen_window_t m_window;
|
||||
@@ -40,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "ppsmediaplayercontrol.h"
|
||||
#include "bbvideowindowcontrol.h"
|
||||
#include "mmrenderervideowindowcontrol.h"
|
||||
|
||||
#include <QtCore/qfile.h>
|
||||
#include <QtCore/qsocketnotifier.h>
|
||||
@@ -52,7 +52,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
PpsMediaPlayerControl::PpsMediaPlayerControl(QObject *parent)
|
||||
: BbMediaPlayerControl(parent),
|
||||
: MmRendererMediaPlayerControl(parent),
|
||||
m_ppsStatusNotifier(0),
|
||||
m_ppsStatusFd(-1),
|
||||
m_ppsStateNotifier(0),
|
||||
@@ -129,7 +129,7 @@ bool PpsMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void
|
||||
Q_UNUSED(result)
|
||||
if (eventType == "screen_event_t") {
|
||||
screen_event_t event = static_cast<screen_event_t>(message);
|
||||
if (BbVideoWindowControl *control = videoWindowControl())
|
||||
if (MmRendererVideoWindowControl *control = videoWindowControl())
|
||||
control->screenEventHandler(event);
|
||||
}
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
#ifndef PPSMEDIAPLAYERCONTROL_H
|
||||
#define PPSMEDIAPLAYERCONTROL_H
|
||||
|
||||
#include "bbmediaplayercontrol.h"
|
||||
#include "mmrenderermediaplayercontrol.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QSocketNotifier;
|
||||
|
||||
class PpsMediaPlayerControl Q_DECL_FINAL : public BbMediaPlayerControl
|
||||
class PpsMediaPlayerControl Q_DECL_FINAL : public MmRendererMediaPlayerControl
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -40,7 +40,7 @@
|
||||
****************************************************************************/
|
||||
#include "neutrinoserviceplugin.h"
|
||||
|
||||
#include "bbmediaplayerservice.h"
|
||||
#include "mmrenderermediaplayerservice.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -51,7 +51,7 @@ NeutrinoServicePlugin::NeutrinoServicePlugin()
|
||||
QMediaService *NeutrinoServicePlugin::create(const QString &key)
|
||||
{
|
||||
if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
|
||||
return new BbMediaPlayerService();
|
||||
return new MmRendererMediaPlayerService();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,3 +1,22 @@
|
||||
TEMPLATE = subdirs
|
||||
TARGET = qtmedia_qnx
|
||||
QT += multimedia-private gui-private
|
||||
|
||||
SUBDIRS = audio
|
||||
PLUGIN_TYPE=mediaservice
|
||||
PLUGIN_CLASS_NAME = BbServicePlugin
|
||||
load(qt_plugin)
|
||||
|
||||
LIBS += -lscreen
|
||||
|
||||
include(common/common.pri)
|
||||
include(mediaplayer/mediaplayer.pri)
|
||||
|
||||
blackberry {
|
||||
include(camera/camera.pri)
|
||||
HEADERS += bbserviceplugin.h
|
||||
SOURCES += bbserviceplugin.cpp
|
||||
OTHER_FILES += blackberry_mediaservice.json
|
||||
} else {
|
||||
HEADERS += neutrinoserviceplugin.h
|
||||
SOURCES += neutrinoserviceplugin.cpp
|
||||
OTHER_FILES += neutrino_mediaservice.json
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user