VLC: bump version

This commit is contained in:
Gerasim Troeglazov
2021-01-27 16:58:54 +10:00
parent d3743b72fe
commit aae5ce825f
2 changed files with 140 additions and 226 deletions

View File

@@ -1,6 +1,6 @@
From 92fa11a4f53754cde91b20f29dc56ede05aa6be0 Mon Sep 17 00:00:00 2001
From 73662e183cbab1e641c4460b74b0871ce1d94b21 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 20 Oct 2020 16:31:09 +1000
Date: Wed, 27 Jan 2021 16:32:03 +1000
Subject: Add Haiku support
@@ -52,7 +52,7 @@ index 0f42e78..0ce5aef 100644
#include <limits.h>
#include <stdlib.h>
diff --git a/configure.ac b/configure.ac
index 1f74566..5b504a2 100644
index 3fc0954..2dbb94a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,6 @@ dnl
@@ -149,8 +149,103 @@ index 1f74566..5b504a2 100644
enable_xcb="yes"
], [
enable_xcb="no"
diff --git a/haiku/VLCLauncher.cpp b/haiku/VLCLauncher.cpp
new file mode 100644
index 0000000..37af2e8
--- /dev/null
+++ b/haiku/VLCLauncher.cpp
@@ -0,0 +1,89 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#include <Application.h>
+#include <String.h>
+#include <Resources.h>
+#include <Roster.h>
+#include <Mime.h>
+#include <Path.h>
+#include <AppFileInfo.h>
+
+class VLCLauncherApp : public BApplication {
+ public:
+ VLCLauncherApp(const char *signature, int argc, char **argv);
+ ~VLCLauncherApp() {};
+ void RefsReceived(BMessage *pmsg);
+ virtual void ReadyToRun();
+ BString GetVLCPath(void);
+ private:
+ BMessenger fTrackerMessenger;
+};
+
+VLCLauncherApp::VLCLauncherApp(const char *signature, int argc, char **argv)
+ : BApplication(signature)
+{
+}
+
+BString
+VLCLauncherApp::GetVLCPath(void)
+{
+ app_info inf;
+ be_app->GetAppInfo(&inf);
+ BPath binPath = BPath(&(inf.ref));
+ BPath appPath;
+ binPath.GetParent(&appPath);
+ appPath.Append("VLC");
+ return appPath.Path();
+}
+
+void
+VLCLauncherApp::RefsReceived(BMessage *pmsg)
+{
+ if (pmsg->HasMessenger("TrackerViewToken")) {
+ pmsg->FindMessenger("TrackerViewToken", &fTrackerMessenger);
+ }
+
+ uint32 type;
+ int32 count;
+ status_t ret = pmsg->GetInfo("refs", &type, &count);
+ if (ret != B_OK || type != B_REF_TYPE)
+ return;
+
+ BString commandLine = GetVLCPath();
+
+ entry_ref ref;
+ for (int32 i = 0; i < count; i++) {
+ if (pmsg->FindRef("refs", i, &ref) == B_OK)
+ {
+ BPath file=BPath(&ref);
+ commandLine += " \"";
+ commandLine += file.Path();
+ commandLine += "\"";
+ }
+ }
+ commandLine += " &";
+ system(commandLine.String());
+ Quit();
+}
+
+void
+VLCLauncherApp::ReadyToRun()
+{
+ BString commandLine = GetVLCPath();
+ commandLine += " &";
+ system(commandLine.String());
+ Quit();
+}
+
+
+int main(int argc, char **argv)
+{
+ VLCLauncherApp application("application/x-vnd.vlc-launcher", argc, argv);
+ application.Run();
+ return 0;
+}
+
+
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
index 9b9d008..ed853e8 100644
index a83d068..49cfe60 100644
--- a/include/vlc_fixups.h
+++ b/include/vlc_fixups.h
@@ -103,7 +103,7 @@ typedef struct
@@ -162,7 +257,7 @@ index 9b9d008..ed853e8 100644
# include <sys/types.h> /* ssize_t, pid_t */
#endif
@@ -373,6 +373,7 @@ void swab (const void *, void *, ssize_t);
@@ -381,6 +381,7 @@ void swab (const void *, void *, ssize_t);
#endif
/* Socket stuff */
@@ -170,7 +265,7 @@ index 9b9d008..ed853e8 100644
#ifndef HAVE_INET_PTON
# ifndef _WIN32
# include <sys/socket.h>
@@ -382,6 +383,7 @@ typedef int socklen_t;
@@ -390,6 +391,7 @@ typedef int socklen_t;
int inet_pton(int, const char *, void *);
const char *inet_ntop(int, const void *, char *, socklen_t);
#endif
@@ -178,7 +273,7 @@ index 9b9d008..ed853e8 100644
/* NaCl has a broken netinet/tcp.h, so TCP_NODELAY is not set */
#if defined(__native_client__) && !defined( HAVE_NETINET_TCP_H )
@@ -415,6 +417,8 @@ struct pollfd;
@@ -423,6 +425,8 @@ struct pollfd;
int poll (struct pollfd *, unsigned, int);
#endif
@@ -187,7 +282,7 @@ index 9b9d008..ed853e8 100644
#ifndef HAVE_IF_NAMEINDEX
#include <errno.h>
# ifndef HAVE_STRUCT_IF_NAMEINDEX
@@ -430,6 +434,7 @@ struct if_nameindex
@@ -438,6 +442,7 @@ struct if_nameindex
# define if_nameindex() (errno = ENOBUFS, NULL)
# define if_freenameindex(list) (void)0
#endif
@@ -804,20 +899,8 @@ index bcf65d2..ff2babd 100644
case VOUT_WINDOW_TYPE_NSOBJECT:
p_wnd->handle.nsobject = (void *)stable->winId();
break;
diff --git a/modules/gui/qt/components/playlist/views.cpp b/modules/gui/qt/components/playlist/views.cpp
index 24db9d9..73c1779 100644
--- a/modules/gui/qt/components/playlist/views.cpp
+++ b/modules/gui/qt/components/playlist/views.cpp
@@ -27,6 +27,7 @@
#include "input_manager.hpp" /* THEMIM */
#include <QPainter>
+#include <QPainterPath>
#include <QRect>
#include <QStyleOptionViewItem>
#include <QFontMetrics>
diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp
index d233382..69728eb 100644
index 450889b..e389724 100644
--- a/modules/gui/qt/dialogs/plugins.cpp
+++ b/modules/gui/qt/dialogs/plugins.cpp
@@ -53,6 +53,7 @@
@@ -829,7 +912,7 @@ index d233382..69728eb 100644
#include <QKeyEvent>
#include <QPushButton>
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index bb5dad8..f9dc8fe 100644
index bb5dad8..d421f4f 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -127,7 +127,13 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
@@ -859,11 +942,21 @@ index bb5dad8..f9dc8fe 100644
/* Should the UI stays on top of other windows */
b_interfaceOnTop = var_InheritBool( p_intf, "video-on-top" );
@@ -318,6 +328,17 @@ void MainInterface::computeMinimumSize()
@@ -313,11 +323,27 @@ MainInterface::~MainInterface()
void MainInterface::computeMinimumSize()
{
+#ifndef __HAIKU__
int minWidth = 80;
if( menuBar()->isVisible() )
minWidth += controls->sizeHint().width();
setMinimumWidth( minWidth );
+#ifdef __HAIKU__
+#else
+ int minWidth = 32;
+ minWidth += fmax(controls->sizeHint().width(), menuBar()->sizeHint().width());
+ setMinimumWidth( minWidth );
+
+ int minHeight = 50;
+ minHeight += controls->sizeHint().height();
+ if( statusBar()->isVisible() )
@@ -877,7 +970,7 @@ index bb5dad8..f9dc8fe 100644
}
/*****************************
@@ -411,6 +432,9 @@ void MainInterface::showResumePanel( int64_t _time ) {
@@ -411,6 +437,9 @@ void MainInterface::showResumePanel( int64_t _time ) {
if( !isFullScreen() && !isMaximized() && !b_isWindowTiled )
resizeWindow( width(), height() + resumePanel->height() );
resumePanel->setVisible(true);
@@ -887,7 +980,7 @@ index bb5dad8..f9dc8fe 100644
resumeTimer->start();
}
}
@@ -423,6 +447,9 @@ void MainInterface::hideResumePanel()
@@ -423,6 +452,9 @@ void MainInterface::hideResumePanel()
resizeWindow( width(), height() - resumePanel->height() );
resumePanel->hide();
resumeTimer->stop();
@@ -897,7 +990,7 @@ index bb5dad8..f9dc8fe 100644
}
}
@@ -463,7 +490,7 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
@@ -463,7 +495,7 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
createResumePanel( main );
/* */
stackCentralW = new QVLCStackedWidget( main );
@@ -906,7 +999,7 @@ index bb5dad8..f9dc8fe 100644
/* Bg Cone */
if ( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY
&& var_InheritBool( p_intf, "qt-icon-change" ) )
@@ -493,7 +520,9 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
@@ -493,7 +525,9 @@ void MainInterface::createMainWidget( QSettings *creationSettings )
creationSettings->value( "MainWindow/bgSize", QSize( 600, 0 ) ).toSize();
/* Resize even if no-auto-resize, because we are at creation */
resizeStack( stackWidgetsSizes[bgWidget].width(), stackWidgetsSizes[bgWidget].height() );
@@ -917,7 +1010,7 @@ index bb5dad8..f9dc8fe 100644
/* Create the CONTROLS Widget */
controls = new ControlsWidget( p_intf,
creationSettings->value( "MainWindow/adv-controls", false ).toBool(), this );
@@ -1202,6 +1231,9 @@ void MainInterface::toggleMinimalView( bool b_minimal )
@@ -1202,6 +1236,9 @@ void MainInterface::toggleMinimalView( bool b_minimal )
void MainInterface::toggleAdvancedButtons()
{
controls->toggleAdvanced();
@@ -927,7 +1020,7 @@ index bb5dad8..f9dc8fe 100644
// if( fullscreenControls ) fullscreenControls->toggleAdvanced();
}
@@ -1223,7 +1255,11 @@ void MainInterface::setStatusBarVisibility( bool b_visible )
@@ -1223,7 +1260,11 @@ void MainInterface::setStatusBarVisibility( bool b_visible )
{
statusBar()->setVisible( b_visible );
b_statusbarVisible = b_visible;
@@ -939,7 +1032,7 @@ index bb5dad8..f9dc8fe 100644
}
@@ -1294,9 +1330,9 @@ void MainInterface::createSystray()
@@ -1294,9 +1335,9 @@ void MainInterface::createSystray()
{
QIcon iconVLC;
if( QDate::currentDate().dayOfYear() >= QT_XMAS_JOKE_DAY && var_InheritBool( p_intf, "qt-icon-change" ) )
@@ -1005,10 +1098,10 @@ index ab912fd..e3c9ed8 100644
else
msg_Err( p_intf, "unknown Qt platform: %s", qtu(platform) );
diff --git a/modules/gui/qt/util/timetooltip.cpp b/modules/gui/qt/util/timetooltip.cpp
index 81789df..ce5f87c 100644
index 70a8e6d..f6237bc 100644
--- a/modules/gui/qt/util/timetooltip.cpp
+++ b/modules/gui/qt/util/timetooltip.cpp
@@ -28,7 +28,11 @@
@@ -27,7 +27,11 @@
#include <QFontMetrics>
#include <QDesktopWidget>
@@ -1020,18 +1113,6 @@ index 81789df..ce5f87c 100644
TimeTooltip::TimeTooltip( QWidget *parent ) :
QWidget( parent )
diff --git a/modules/gui/qt/util/timetooltip.hpp b/modules/gui/qt/util/timetooltip.hpp
index 6a1329e..9f50b18 100644
--- a/modules/gui/qt/util/timetooltip.hpp
+++ b/modules/gui/qt/util/timetooltip.hpp
@@ -25,6 +25,7 @@
#include "qt.hpp"
#include <QWidget>
+#include <QPainterPath>
class TimeTooltip : public QWidget
{
diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 78c06cf..0ae24ec 100644
--- a/modules/video_output/Makefile.am
@@ -1064,10 +1145,10 @@ index 78c06cf..0ae24ec 100644
vout_LTLIBRARIES += $(LTLIBcaca)
diff --git a/modules/video_output/haiku.cpp b/modules/video_output/haiku.cpp
new file mode 100644
index 0000000..d2de038
index 0000000..9f0a2e3
--- /dev/null
+++ b/modules/video_output/haiku.cpp
@@ -0,0 +1,779 @@
@@ -0,0 +1,785 @@
+/*****************************************************************************
+ * haiku.c: Haiku video output display method for testing purposes
+ *****************************************************************************
@@ -1460,7 +1541,8 @@ index 0000000..d2de038
+bool
+VLCVideoWindow::QuitRequested()
+{
+ Minimize(true);
+ BMessage message(B_QUIT_REQUESTED);
+ CloneAndPushMessage(&message);
+ return false;
+}
+
@@ -1735,6 +1817,11 @@ index 0000000..d2de038
+
+ while (BMessage* request = sys->win->Queue()->NextMessage()) {
+ switch (request->what) {
+ case B_QUIT_REQUESTED:
+ {
+ vout_display_SendEventKey(vd, KEY_MEDIA_STOP);
+ break;
+ }
+ case B_MOUSE_WHEEL_CHANGED:
+ {
+ uint32 modifiers = 0;
@@ -2205,179 +2292,5 @@ index ff482dc..fe3c06c 100644
w->inhibit = vlc_inhibit_Create(VLC_OBJECT (window));
if (w->inhibit != NULL)
--
2.28.0
From 0415150c94e3d881fca539dd2c8154b242be92a0 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 20 Oct 2020 18:53:09 +1000
Subject: Add launcher for Haiku
diff --git a/haiku/VLCLauncher.cpp b/haiku/VLCLauncher.cpp
new file mode 100644
index 0000000..37af2e8
--- /dev/null
+++ b/haiku/VLCLauncher.cpp
@@ -0,0 +1,89 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#include <Application.h>
+#include <String.h>
+#include <Resources.h>
+#include <Roster.h>
+#include <Mime.h>
+#include <Path.h>
+#include <AppFileInfo.h>
+
+class VLCLauncherApp : public BApplication {
+ public:
+ VLCLauncherApp(const char *signature, int argc, char **argv);
+ ~VLCLauncherApp() {};
+ void RefsReceived(BMessage *pmsg);
+ virtual void ReadyToRun();
+ BString GetVLCPath(void);
+ private:
+ BMessenger fTrackerMessenger;
+};
+
+VLCLauncherApp::VLCLauncherApp(const char *signature, int argc, char **argv)
+ : BApplication(signature)
+{
+}
+
+BString
+VLCLauncherApp::GetVLCPath(void)
+{
+ app_info inf;
+ be_app->GetAppInfo(&inf);
+ BPath binPath = BPath(&(inf.ref));
+ BPath appPath;
+ binPath.GetParent(&appPath);
+ appPath.Append("VLC");
+ return appPath.Path();
+}
+
+void
+VLCLauncherApp::RefsReceived(BMessage *pmsg)
+{
+ if (pmsg->HasMessenger("TrackerViewToken")) {
+ pmsg->FindMessenger("TrackerViewToken", &fTrackerMessenger);
+ }
+
+ uint32 type;
+ int32 count;
+ status_t ret = pmsg->GetInfo("refs", &type, &count);
+ if (ret != B_OK || type != B_REF_TYPE)
+ return;
+
+ BString commandLine = GetVLCPath();
+
+ entry_ref ref;
+ for (int32 i = 0; i < count; i++) {
+ if (pmsg->FindRef("refs", i, &ref) == B_OK)
+ {
+ BPath file=BPath(&ref);
+ commandLine += " \"";
+ commandLine += file.Path();
+ commandLine += "\"";
+ }
+ }
+ commandLine += " &";
+ system(commandLine.String());
+ Quit();
+}
+
+void
+VLCLauncherApp::ReadyToRun()
+{
+ BString commandLine = GetVLCPath();
+ commandLine += " &";
+ system(commandLine.String());
+ Quit();
+}
+
+
+int main(int argc, char **argv)
+{
+ VLCLauncherApp application("application/x-vnd.vlc-launcher", argc, argv);
+ application.Run();
+ return 0;
+}
+
+
--
2.28.0
From f225ec461be84c05c7f9dd06c5a0bd1a1beb5319 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 21 Oct 2020 23:20:35 +1000
Subject: Calculate window width
diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index f9dc8fe..d421f4f 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -323,12 +323,17 @@ MainInterface::~MainInterface()
void MainInterface::computeMinimumSize()
{
+#ifndef __HAIKU__
int minWidth = 80;
if( menuBar()->isVisible() )
minWidth += controls->sizeHint().width();
setMinimumWidth( minWidth );
-#ifdef __HAIKU__
+#else
+ int minWidth = 32;
+ minWidth += fmax(controls->sizeHint().width(), menuBar()->sizeHint().width());
+ setMinimumWidth( minWidth );
+
int minHeight = 50;
minHeight += controls->sizeHint().height();
if( statusBar()->isVisible() )
--
2.28.0
From a56722f20085453cd52161ac9c94abfeff4e44e8 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 18 Dec 2020 09:10:30 +1000
Subject: Close video output when window close
diff --git a/modules/video_output/haiku.cpp b/modules/video_output/haiku.cpp
index d2de038..071d353 100644
--- a/modules/video_output/haiku.cpp
+++ b/modules/video_output/haiku.cpp
@@ -390,7 +390,8 @@ VLCVideoWindow::DispatchMessage(BMessage *message, BHandler *handler)
bool
VLCVideoWindow::QuitRequested()
{
- Minimize(true);
+ BMessage message(B_QUIT_REQUESTED);
+ CloneAndPushMessage(&message);
return false;
}
@@ -665,6 +666,11 @@ static void Manage( vout_display_t *vd )
while (BMessage* request = sys->win->Queue()->NextMessage()) {
switch (request->what) {
+ case B_QUIT_REQUESTED:
+ {
+ vout_display_SendEventKey(vd, KEY_MEDIA_STOP);
+ break;
+ }
case B_MOUSE_WHEEL_CHANGED:
{
uint32 modifiers = 0;
--
2.28.0
2.30.0

View File

@@ -3,11 +3,12 @@ DESCRIPTION="VLC is a free and open source cross-platform multimedia player \
and framework that plays most multimedia files as well as DVDs, Audio CDs, \
VCDs, and various streaming protocols."
HOMEPAGE="https://www.videolan.org/vlc/"
COPYRIGHT="1998-2020 VideoLAN"
COPYRIGHT="1998-2021 VideoLAN"
LICENSE="GNU GPL v2"
REVISION="8"
REVISION="1"
SOURCE_URI="https://download.videolan.org/pub/videolan/vlc/$portVersion/vlc-$portVersion.tar.xz"
CHECKSUM_SHA256="189311d28aa814f106a7b3645211ac52c0b3e2b9f4b348de2f63bab3218086b8"
SOURCE_DIR="vlc-$portVersion"
CHECKSUM_SHA256="eff458f38a92126094f44f2263c2bf2c7cdef271b48192d0fe7b1726388cf879"
PATCHES="vlc-$portVersion.patchset"
ADDITIONAL_FILES="
vlc.rdef.in