Merge lp:~mterry/qtvideo-node/arches into lp:qtvideo-node

Proposed by Michael Terry
Status: Merged
Approved by: Michael Terry
Approved revision: 29
Merged at revision: 29
Proposed branch: lp:~mterry/qtvideo-node/arches
Merge into: lp:qtvideo-node
Diff against target: 124 lines (+33/-15)
4 files modified
debian/control (+4/-2)
src/shadervideomaterial.cpp (+16/-4)
src/shadervideonode.cpp (+3/-3)
unittests/shadervideonode/tst_shadervideonode.cpp (+10/-6)
To merge this branch: bzr merge lp:~mterry/qtvideo-node/arches
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Łukasz Zemczak Approve
Review via email: mp+158405@code.launchpad.net

Commit message

Allow qtvideo-node to support all 3 major arches.

Description of the change

Allow qtvideo-node to support all 3 major arches.

Also fixes some 32-bit-centric pointer-to-int conversions.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/qtvideo-node/arches updated
29. By Michael Terry

sort libplatform-api-headers Build-Depend

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, it's building fine on my machine. I had some problems due to libhybris and libplatform-api-headers being too old - is that a problem? Distro-wise probably no, since those packages are not yet officially released.

Anyway, giving a 'Needs Information' for the dependency thing (if we should give minimum version numbers or not) and Approved for in-overall.

review: Needs Information
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Approving also since it's good anyways.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2013-03-26 23:12:03 +0000
3+++ debian/control 2013-04-11 16:55:25 +0000
4@@ -4,8 +4,10 @@
5 Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
6 Build-Depends: debhelper (>= 9),
7 libgl-dev,
8- libgles2-mesa-dev,
9+ libgl1-mesa-dev[!armhf],
10+ libgles2-mesa-dev[armhf],
11 libhybris-dev,
12+ libplatform-api-headers | ubuntu-platform-api-headers,
13 libpulse-dev,
14 libqt5opengl5-dev,
15 libqtubuntu-media-signals-dev,
16@@ -22,7 +24,7 @@
17 Vcs-Bzr: https://code.launchpad.net/~phablet-team/qtvideo-node/trunk
18
19 Package: qtvideonode-plugin
20-Architecture: armel armhf
21+Architecture: i386 amd64 armhf
22 Depends: ${misc:Depends},
23 ${shlibs:Depends},
24 Description: Plugin for showing camera viewfinder in Qt
25
26=== modified file 'src/shadervideomaterial.cpp'
27--- src/shadervideomaterial.cpp 2013-03-12 18:02:14 +0000
28+++ src/shadervideomaterial.cpp 2013-04-11 16:55:25 +0000
29@@ -14,6 +14,18 @@
30 * along with this program. If not, see <http://www.gnu.org/licenses/>.
31 */
32
33+#include <ubuntu/ui/config.h>
34+
35+#if UBUNTU_USE_GLES
36+# include <GLES2/gl2.h>
37+# define TEXTURE_TARGET GL_TEXTURE_EXTERNAL_OES
38+#else
39+# define GL_GLEXT_PROTOTYPES
40+# include <GL/gl.h>
41+# include <GL/glext.h>
42+# define TEXTURE_TARGET GL_TEXTURE_2D
43+#endif
44+
45 #include "shadervideomaterial.h"
46 #include "shadervideoshader.h"
47
48@@ -81,10 +93,10 @@
49 undoAndroidYFlip(m_textureMatrix);
50 glUniformMatrix4fv(m_videoShader->m_tex_matrix, 1, GL_FALSE, m_textureMatrix);
51
52- glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
53- glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
54- glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
55- glTexParameteri(GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
56+ glTexParameteri(TEXTURE_TARGET, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
57+ glTexParameteri(TEXTURE_TARGET, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
58+ glTexParameteri(TEXTURE_TARGET, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
59+ glTexParameteri(TEXTURE_TARGET, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
60 }
61
62 void ShaderVideoMaterial::undoAndroidYFlip(GLfloat matrix[])
63
64=== modified file 'src/shadervideonode.cpp'
65--- src/shadervideonode.cpp 2013-03-14 13:43:57 +0000
66+++ src/shadervideonode.cpp 2013-04-11 16:55:25 +0000
67@@ -55,16 +55,16 @@
68 return;
69 }
70
71- int ci = 0;
72+ void *ci = 0;
73 if (frame.availableMetaData().contains("CamControl")) {
74- ci = frame.metaData("CamControl").toInt();
75+ ci = frame.metaData("CamControl").value<void *>();
76 if (ci == 0) {
77 qWarning() << "No valid camera control pointer in video frame";
78 return;
79 }
80 m_material->setCamControl((CameraControl*)ci);
81 } else if (frame.availableMetaData().contains("MediaPlayerControl")) {
82- ci = frame.metaData("MediaPlayerControl").toInt();
83+ ci = frame.metaData("MediaPlayerControl").value<void *>();
84 if (ci == 0) {
85 qWarning() << "No valid media player control pointer in video frame";
86 return;
87
88=== modified file 'unittests/shadervideonode/tst_shadervideonode.cpp'
89--- unittests/shadervideonode/tst_shadervideonode.cpp 2013-03-12 18:02:14 +0000
90+++ unittests/shadervideonode/tst_shadervideonode.cpp 2013-04-11 16:55:25 +0000
91@@ -46,11 +46,13 @@
92 QVideoFrame frame(img);
93
94 node.setCurrentFrame(frame);
95- QCOMPARE((int)node.m_material->cameraControl(), 0);
96+ QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->cameraControl()),
97+ QVariant(QMetaType::VoidStar, 0));
98
99- frame.setMetaData("CamControl", (int)cc);
100+ frame.setMetaData("CamControl", QVariant::fromValue((void*)cc));
101 node.setCurrentFrame(frame);
102- QCOMPARE((int)node.m_material->cameraControl(), (int)cc);
103+ QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->cameraControl()),
104+ QVariant(QMetaType::VoidStar, cc));
105 }
106
107 void tst_ShaderVideoNode::testMediaPlayerSetCurrentFrame()
108@@ -63,11 +65,13 @@
109 QVideoFrame frame(img);
110
111 node.setCurrentFrame(frame);
112- QCOMPARE((int)node.m_material->mediaplayerControl(), 0);
113+ QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->mediaplayerControl()),
114+ QVariant(QMetaType::VoidStar, 0));
115
116- frame.setMetaData("MediaPlayerControl", (int)mp);
117+ frame.setMetaData("MediaPlayerControl", QVariant::fromValue((void*)mp));
118 node.setCurrentFrame(frame);
119- QCOMPARE((int)node.m_material->mediaplayerControl(), (int)mp);
120+ QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->mediaplayerControl()),
121+ QVariant(QMetaType::VoidStar, mp));
122 }
123
124 QTEST_MAIN(tst_ShaderVideoNode)

Subscribers

People subscribed via source and target branches