commit QMPlay2 for openSUSE:Factory

Hello community, here is the log from the commit of package QMPlay2 for openSUSE:Factory checked in at 2016-03-31 13:02:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/QMPlay2 (Old) and /work/SRC/openSUSE:Factory/.QMPlay2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "QMPlay2" Changes: -------- --- /work/SRC/openSUSE:Factory/QMPlay2/QMPlay2.changes 2016-03-17 16:48:11.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.QMPlay2.new/QMPlay2.changes 2016-03-31 13:02:25.000000000 +0200 @@ -1,0 +2,7 @@ +Mon Mar 28 17:23:37 UTC 2016 - dap.darkness@gmail.com + +- Update to 16.03.24: + * XVideo SHM and OpenGL2(Qt >= 5.6) bugfix, + * Bob deint bugfix for odd video height/2. + +------------------------------------------------------------------- @@ -4 +11 @@ -- Update to 16.03.08: +- Update to 16.03.11: Old: ---- QMPlay2-src-16.03.11.tar.xz New: ---- QMPlay2-src-16.03.24.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ QMPlay2.spec ++++++ --- /var/tmp/diff_new_pack.TFyFJo/_old 2016-03-31 13:02:26.000000000 +0200 +++ /var/tmp/diff_new_pack.TFyFJo/_new 2016-03-31 13:02:26.000000000 +0200 @@ -17,7 +17,7 @@ Name: QMPlay2 -Version: 16.03.11 +Version: 16.03.24 Release: 0 Summary: A Qt based media player, streamer and downloader License: LGPL-3.0+ ++++++ QMPlay2-src-16.03.11.tar.xz -> QMPlay2-src-16.03.24.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/ChangeLog new/QMPlay2-src-16.03.24/ChangeLog --- old/QMPlay2-src-16.03.11/ChangeLog 2016-03-11 22:15:34.000000000 +0100 +++ new/QMPlay2-src-16.03.24/ChangeLog 2016-03-24 21:03:34.000000000 +0100 @@ -1,3 +1,7 @@ +Changes in QMPlay2 build 16.03.24: + - XVideo SHM and OpenGL2(Qt >= 5.6) bugfix, + - Bob deint bugfix for odd video height/2, + Changes in QMPlay2 build 16.03.11: - update Russian translation (victorr2007), - update ProstoPleer address, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/TODO new/QMPlay2-src-16.03.24/TODO --- old/QMPlay2-src-16.03.11/TODO 2016-03-06 01:44:49.000000000 +0100 +++ new/QMPlay2-src-16.03.24/TODO 2016-03-24 21:03:34.000000000 +0100 @@ -7,6 +7,7 @@ Better radio stations YouTube playlists Accurate seeking +Video cropping Filters: Video filters - YADIF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Common.cpp new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Common.cpp --- old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Common.cpp 2016-03-06 01:25:34.000000000 +0100 +++ new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Common.cpp 2016-03-24 21:03:34.000000000 +0100 @@ -219,7 +219,7 @@ void OpenGL2Common::resetClearCounter() { - doClear = 4; + doClear = 6; } void OpenGL2Common::initializeGL() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Writer.cpp new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Writer.cpp --- old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Writer.cpp 2016-03-06 01:29:33.000000000 +0100 +++ new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Writer.cpp 2016-03-24 21:03:34.000000000 +0100 @@ -144,10 +144,9 @@ useRtt = forceRtt; if (useRtt) { - const QWidget *videoDock = QMPlay2Core.getVideoDock(); //Don't use rtt when videoDock has native window - if (videoDock->objectName() == "videoDock") - useRtt = !videoDock->internalWinId() || (videoDock == videoDock->window()); + const QWidget *videoDock = QMPlay2Core.getVideoDock(); + useRtt = !videoDock->internalWinId() || (videoDock == videoDock->window()); } if (useRtt) drawable = new OpenGL2Widget; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/VideoFilters/BobDeint.cpp new/QMPlay2-src-16.03.24/src/modules/VideoFilters/BobDeint.cpp --- old/QMPlay2-src-16.03.11/src/modules/VideoFilters/BobDeint.cpp 2016-02-29 19:17:30.000000000 +0100 +++ new/QMPlay2-src-16.03.24/src/modules/VideoFilters/BobDeint.cpp 2016-03-24 21:03:34.000000000 +0100 @@ -50,7 +50,7 @@ src += linesize << 1; } - if (h & 1) //Duplicate last line for odd height + if ((p ? (h >> 1) : h) & 1) //Duplicate last line for odd height memcpy(dst2, dst2 - linesize, linesize); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/XVideo/XVideo.cpp new/QMPlay2-src-16.03.24/src/modules/XVideo/XVideo.cpp --- old/QMPlay2-src-16.03.11/src/modules/XVideo/XVideo.cpp 2016-02-29 19:17:30.000000000 +0100 +++ new/QMPlay2-src-16.03.24/src/modules/XVideo/XVideo.cpp 2016-03-24 21:03:34.000000000 +0100 @@ -7,7 +7,7 @@ moduleImg = QImage(":/Xorg"); init("Enabled", true); - init("UseSHM", false); + init("UseSHM", true); } QList< XVideo::Info > XVideo::getModulesInfo(const bool showDisabled) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.cpp new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.cpp --- old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.cpp 2016-03-03 18:07:57.000000000 +0100 +++ new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.cpp 2016-03-24 21:03:34.000000000 +0100 @@ -41,6 +41,7 @@ _flip = 0; ai = NULL; clrVars(); + invalidateShm(); _isOK = false; disp = QX11Info::display(); if (!disp || XvQueryAdaptors(disp, DefaultRootWindow(disp), &adaptors, &ai) != Success) @@ -57,7 +58,7 @@ delete priv; } -bool XVIDEO::open(int W, int H, unsigned long _handle, const QString &adaptorName, bool _useSHM) +bool XVIDEO::open(int W, int H, unsigned long _handle, const QString &adaptorName, bool useSHM) { if (isOpen()) close(); @@ -65,7 +66,6 @@ width = W; height = H; handle = _handle; - useSHM = _useSHM; for (uint i = 0; i < adaptors; i++) { @@ -121,35 +121,51 @@ return false; } - if (!useSHM) - { - image = XvCreateImage(disp, port, format_id, NULL, width, height); - image->data = new char[image->data_size]; - } - else + if (useSHM) { - image = XvShmCreateImage(disp, port, format_id, NULL, width, height, &shmInfo); - shmInfo.shmid = shmget(IPC_PRIVATE, image->data_size, IPC_CREAT | 0777); - if (shmInfo.shmid >= 0) - { - shmInfo.shmaddr = (char *)shmat(shmInfo.shmid, 0, 0); - image->data = shmInfo.shmaddr; - shmInfo.readOnly = false; - if (!XShmAttach(disp, &shmInfo)) - { - close(); - return false; - } - XSync(disp, false); - shmctl(shmInfo.shmid, IPC_RMID, 0); - } + if (!XShmQueryExtension(disp)) + useSHM = false; else { - close(); - return false; + image = XvShmCreateImage(disp, port, format_id, NULL, width, height, &shmInfo); + if (!image) + useSHM = false; + else + { + shmInfo.shmid = shmget(IPC_PRIVATE, image->data_size, IPC_CREAT | 0600); + if (shmInfo.shmid < 0) + useSHM = false; + else + { + shmInfo.shmaddr = (char *)shmat(shmInfo.shmid, 0, 0); + if (shmInfo.shmaddr == (char *)-1) + { + shmInfo.shmaddr = NULL; + useSHM = false; + } + else + { + const bool attached = XShmAttach(disp, &shmInfo); + XSync(disp, false); + if (!attached) + useSHM = false; + else + image->data = shmInfo.shmaddr; + } + } + if (!useSHM) + freeImage(); + } } } + if (!useSHM) + { + image = XvCreateImage(disp, port, format_id, NULL, width, height); + if (image) + image->data = new char[image->data_size]; + } + if (!image) { close(); @@ -162,20 +178,32 @@ _isOpen = true; return isOpen(); } -void XVIDEO::close() + +void XVIDEO::freeImage() { - if (image) + if (shmInfo.shmid < 0) + delete[] image->data; + else { - if (useSHM && shmInfo.shmaddr) - { - XShmDetach(disp, &shmInfo); - shmctl(shmInfo.shmid, IPC_RMID, 0); + XShmDetach(disp, &shmInfo); + shmctl(shmInfo.shmid, IPC_RMID, 0); + if (shmInfo.shmaddr) shmdt(shmInfo.shmaddr); - } - else if (!useSHM) - delete[] image->data; - XFree(image); + invalidateShm(); } + XFree(image); +} +void XVIDEO::invalidateShm() +{ + shmInfo.shmseg = 0; + shmInfo.shmid = -1; + shmInfo.shmaddr = NULL; + shmInfo.readOnly = false; +} +void XVIDEO::close() +{ + if (image) + freeImage(); if (gc) XFreeGC(disp, gc); if (port) @@ -269,10 +297,11 @@ void XVIDEO::putImage(const QRect &srcRect, const QRect &dstRect) { - if (!useSHM) - XvPutImage(disp, port, handle, gc, image, srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height(), dstRect.x(), dstRect.y(), dstRect.width(), dstRect.height()); - else + if (shmInfo.shmaddr) XvShmPutImage(disp, port, handle, gc, image, srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height(), dstRect.x(), dstRect.y(), dstRect.width(), dstRect.height(), false); + else + XvPutImage(disp, port, handle, gc, image, srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height(), dstRect.x(), dstRect.y(), dstRect.width(), dstRect.height()); + XSync(disp, false); } void XVIDEO::XvSetPortAttributeIfExists(void *attributes, int attrib_count, const char *k, int v) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.hpp new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.hpp --- old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.hpp 2016-02-29 19:17:30.000000000 +0100 +++ new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.hpp 2016-03-24 21:03:34.000000000 +0100 @@ -23,6 +23,9 @@ } bool open(int, int, unsigned long, const QString &adaptorName, bool); + + void freeImage(); + void invalidateShm(); void close(); void draw(const VideoFrame &, const QRect &, const QRect &, int, int, const QList< const QMPlay2_OSD * > &, QMutex &); @@ -42,7 +45,7 @@ void XvSetPortAttributeIfExists(void *attributes, int attrib_count, const char *k, int v); void clrVars(); - bool _isOK, _isOpen, hasImage, useSHM; + bool _isOK, _isOpen, hasImage; int _flip; unsigned long handle; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/qmplay2/headers/QMPlay2Core.hpp new/QMPlay2-src-16.03.24/src/qmplay2/headers/QMPlay2Core.hpp --- old/QMPlay2-src-16.03.11/src/qmplay2/headers/QMPlay2Core.hpp 2016-03-11 22:16:06.000000000 +0100 +++ new/QMPlay2-src-16.03.24/src/qmplay2/headers/QMPlay2Core.hpp 2016-03-24 21:03:34.000000000 +0100 @@ -1,7 +1,7 @@ #ifndef QMPLAY2CORE_HPP #define QMPLAY2CORE_HPP -#define QMPlay2Version "16.03.11" +#define QMPlay2Version "16.03.24" #if defined(__i386) || defined(__i386__) || defined(_M_IX86) || (__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) #define QMPLAY2_CPU_X86
participants (1)
-
root@hilbert.suse.de