Skip to content

Commit 5c811aa

Browse files
committed
Fixes and improvements. Released code for version 5.7.0.
1 parent b72010a commit 5c811aa

File tree

18 files changed

+219
-156
lines changed

18 files changed

+219
-156
lines changed

piomxtextures_pocplayer/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
#include "poc_qmlutils.h"
3737
#include "poc_uptime.h"
3838

39+
using namespace lightlogger;
40+
3941
/*------------------------------------------------------------------------------
4042
| definitions
4143
+-----------------------------------------------------------------------------*/

piomxtextures_pocplayer_yt/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
#include "poc_bridge.h"
1515

16+
using namespace lightlogger;
17+
1618
/*------------------------------------------------------------------------------
1719
| main
1820
+-----------------------------------------------------------------------------*/

piomxtextures_pocplayer_yt/poc_bridge.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ POC_Bridge::POC_Bridge(const QString& videoId, QObject* parent) :
2020
+-----------------------------------------------------------------------------*/
2121
void POC_Bridge::onPlayerReady()
2222
{
23-
log_info("YouTube player ready.");
23+
lightlogger::log_info("YouTube player ready.");
2424
emit playVideoId(m_videoId);
2525
}

piomxtextures_qt_driver/mediaplayer/mediaplayer.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ PLUGIN_CLASS_NAME = OpenMAXILPlayerServicePlugin
4444

4545
include($$_PRO_FILE_PWD_/../../piomxtextures_src/piomxtextures_src.pri)
4646

47-
LIBS += -lEGL
47+
LIBS += -lbrcmEGL
4848

4949
HEADERS += \
5050
$$PWD/openmaxilplayercontrol.h \

piomxtextures_qt_driver/mediaplayer/openmaxilplayerservice.cpp

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -56,121 +56,121 @@ OpenMAXILPlayerService::OpenMAXILPlayerService(QObject *parent):
5656
, m_videoRenderer(0)
5757
, m_videoReferenceCount(0)
5858
{
59-
log_verbose("Instantiating QMediaService...");
59+
log_verbose("Instantiating QMediaService...");
6060

61-
m_control = new OpenMAXILPlayerControl(this);
62-
m_metaData = new OpenMAXILMetaDataProvider(m_control, this);
63-
m_streamsControl = new OpenMAXILStreamsControl(this);
64-
m_availabilityControl = new OpenMAXILAvailabilityControl(this);
65-
m_videoRenderer = new OpenMAXILVideoRendererControl(m_control, this);
66-
m_videoProbe = new OpenMAXILVideoProbe(this);
61+
m_control = new OpenMAXILPlayerControl(this);
62+
m_metaData = new OpenMAXILMetaDataProvider(m_control, this);
63+
m_streamsControl = new OpenMAXILStreamsControl(this);
64+
m_availabilityControl = new OpenMAXILAvailabilityControl(this);
65+
m_videoRenderer = new OpenMAXILVideoRendererControl(m_control, this);
66+
m_videoProbe = new OpenMAXILVideoProbe(this);
6767

68-
m_control->setVideoRenderer(m_videoRenderer);
68+
m_control->setVideoRenderer(m_videoRenderer);
6969

70-
connect(m_videoRenderer, SIGNAL(frameReady(QVideoFrame)),
71-
m_videoProbe, SIGNAL(videoFrameProbed(QVideoFrame)));
70+
connect(m_videoRenderer, SIGNAL(frameReady(QVideoFrame)),
71+
m_videoProbe, SIGNAL(videoFrameProbed(QVideoFrame)));
7272
}
7373

7474
/*------------------------------------------------------------------------------
7575
| OpenMAXILPlayerControl::~OpenMAXILPlayerControl
7676
+-----------------------------------------------------------------------------*/
7777
OpenMAXILPlayerService::~OpenMAXILPlayerService()
7878
{
79-
log_dtor_func;
79+
log_dtor_func;
8080
}
8181

8282
QMediaControl *OpenMAXILPlayerService::requestControl(const char *name)
8383
{
84-
qDebug("Requesting control for %s...", name);
84+
qDebug("Requesting control for %s...", name);
8585

86-
if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
87-
return m_control;
86+
if (qstrcmp(name, QMediaPlayerControl_iid) == 0)
87+
return m_control;
8888

89-
if (qstrcmp(name, QMetaDataReaderControl_iid) == 0)
90-
return m_metaData;
89+
if (qstrcmp(name, QMetaDataReaderControl_iid) == 0)
90+
return m_metaData;
9191

92-
if (qstrcmp(name, QMediaVideoProbeControl_iid) == 0)
93-
return m_videoProbe;
92+
if (qstrcmp(name, QMediaVideoProbeControl_iid) == 0)
93+
return m_videoProbe;
9494

9595
#if 0
96-
if (qstrcmp(name, QMediaStreamsControl_iid) == 0)
97-
return 0;
98-
99-
if (qstrcmp(name, QMediaAvailabilityControl_iid) == 0)
100-
return 0;
101-
102-
if (qstrcmp(name, QMediaVideoProbeControl_iid) == 0) {
103-
return 0;
104-
//if (m_session) {
105-
// QGstreamerVideoProbeControl *probe = new QGstreamerVideoProbeControl(this);
106-
// increaseVideoRef();
107-
// m_session->addProbe(probe);
108-
// return probe;
109-
//}
110-
//return 0;
111-
}
112-
113-
if (qstrcmp(name, QMediaAudioProbeControl_iid) == 0) {
114-
//if (m_session) {
115-
// QGstreamerAudioProbeControl *probe = new QGstreamerAudioProbeControl(this);
116-
// m_session->addProbe(probe);
117-
// return probe;
118-
//}
119-
return 0;
120-
}
96+
if (qstrcmp(name, QMediaStreamsControl_iid) == 0)
97+
return 0;
98+
99+
if (qstrcmp(name, QMediaAvailabilityControl_iid) == 0)
100+
return 0;
101+
102+
if (qstrcmp(name, QMediaVideoProbeControl_iid) == 0) {
103+
return 0;
104+
//if (m_session) {
105+
// QGstreamerVideoProbeControl *probe = new QGstreamerVideoProbeControl(this);
106+
// increaseVideoRef();
107+
// m_session->addProbe(probe);
108+
// return probe;
109+
//}
110+
//return 0;
111+
}
112+
113+
if (qstrcmp(name, QMediaAudioProbeControl_iid) == 0) {
114+
//if (m_session) {
115+
// QGstreamerAudioProbeControl *probe = new QGstreamerAudioProbeControl(this);
116+
// m_session->addProbe(probe);
117+
// return probe;
118+
//}
119+
return 0;
120+
}
121121
#endif
122122

123-
if (qstrcmp(name, QVideoRendererControl_iid) == 0)
124-
return m_videoRenderer;
123+
if (qstrcmp(name, QVideoRendererControl_iid) == 0)
124+
return m_videoRenderer;
125125

126126
#if 0
127-
if (!m_videoOutput) {
128-
if (qstrcmp(name, QVideoRendererControl_iid) == 0)
129-
m_videoOutput = m_videoRenderer;
127+
if (!m_videoOutput) {
128+
if (qstrcmp(name, QVideoRendererControl_iid) == 0)
129+
m_videoOutput = m_videoRenderer;
130130
#if defined(HAVE_XVIDEO) && defined(HAVE_WIDGETS)
131-
else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
132-
m_videoOutput = m_videoWidget;
133-
else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
134-
m_videoOutput = m_videoWindow;
131+
else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
132+
m_videoOutput = m_videoWidget;
133+
else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
134+
m_videoOutput = m_videoWindow;
135135
#endif
136136

137-
if (m_videoOutput) {
138-
increaseVideoRef();
139-
m_control->setVideoOutput(m_videoOutput);
140-
return m_videoOutput;
141-
}
142-
}
137+
if (m_videoOutput) {
138+
increaseVideoRef();
139+
m_control->setVideoOutput(m_videoOutput);
140+
return m_videoOutput;
141+
}
142+
}
143143
#endif
144144

145-
return 0;
145+
return 0;
146146
}
147147

148148
void OpenMAXILPlayerService::releaseControl(QMediaControl *control)
149149
{
150150
#if 0
151-
if (control == m_videoOutput) {
152-
m_videoOutput = 0;
153-
m_control->setVideoOutput(0);
154-
decreaseVideoRef();
155-
}
156-
157-
QGstreamerVideoProbeControl* videoProbe = qobject_cast<QGstreamerVideoProbeControl*>(control);
158-
if (videoProbe) {
159-
if (m_session) {
160-
m_session->removeProbe(videoProbe);
161-
decreaseVideoRef();
162-
}
163-
delete videoProbe;
164-
return;
165-
}
166-
167-
QGstreamerAudioProbeControl* audioProbe = qobject_cast<QGstreamerAudioProbeControl*>(control);
168-
if (audioProbe) {
169-
if (m_session)
170-
m_session->removeProbe(audioProbe);
171-
delete audioProbe;
172-
return;
173-
}
151+
if (control == m_videoOutput) {
152+
m_videoOutput = 0;
153+
m_control->setVideoOutput(0);
154+
decreaseVideoRef();
155+
}
156+
157+
QGstreamerVideoProbeControl* videoProbe = qobject_cast<QGstreamerVideoProbeControl*>(control);
158+
if (videoProbe) {
159+
if (m_session) {
160+
m_session->removeProbe(videoProbe);
161+
decreaseVideoRef();
162+
}
163+
delete videoProbe;
164+
return;
165+
}
166+
167+
QGstreamerAudioProbeControl* audioProbe = qobject_cast<QGstreamerAudioProbeControl*>(control);
168+
if (audioProbe) {
169+
if (m_session)
170+
m_session->removeProbe(audioProbe);
171+
delete audioProbe;
172+
return;
173+
}
174174
#endif
175175
}
176176

piomxtextures_src/PiOmxTextures.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ error("Either config as app or lib.");
6565
}
6666

6767
# External
68-
LIBS += -lopenmaxil -lGLESv2 -lEGL -lbcm_host -lvcos -lrt -lv4l2
68+
LIBS += -lopenmaxil -lbrcmEGL -lbcm_host -lvchiq_arm -lvcos -lbrcmGLESv2 -lrt -lv4l2
6969
#LIBS += -lavformat -lavcodec -lavutil
7070
# Internal
7171
contains(DEFINES, CONFIG_INCLUDE_FFMPEG) {

piomxtextures_src/omx_logging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <lc_logging.h>
3434

3535
using namespace std;
36+
using namespace lightlogger;
3637

3738
/*------------------------------------------------------------------------------
3839
| definitions

0 commit comments

Comments
 (0)