mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
VLC: added recipe and patch for version 2.2.1
Builds and runs but doesn't output anything yet Also drop old non-working recipes
This commit is contained in:
@@ -1,32 +0,0 @@
|
|||||||
diff -urN vlc-1.1.5/configure.ac vlc-1.1.5-haiku/configure.ac
|
|
||||||
--- vlc-1.1.5/configure.ac 2010-11-06 18:02:38.013369344 -0700
|
|
||||||
+++ vlc-1.1.5-haiku/configure.ac 2010-11-07 11:39:30.000000000 -0800
|
|
||||||
@@ -379,6 +379,19 @@
|
|
||||||
VLC_ADD_LIBS([filesystem access_ftp access_mms access_output_udp oldtelnet netsync sap libvlccore growl_udp],[-lnet])
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
+ haiku)
|
|
||||||
+ SYS=beos
|
|
||||||
+ CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
|
|
||||||
+ CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
|
|
||||||
+ VLC_ADD_CXXFLAGS([beos],[])
|
|
||||||
+ VLC_ADD_LIBS([vlc libvlccore logger],[-lbe])
|
|
||||||
+ VLC_ADD_LIBS([dvdnav dvdread],[-lroot])
|
|
||||||
+ VLC_ADD_LIBS([filesystem],[-lroot])
|
|
||||||
+ VLC_ADD_LIBS([network],[-lnetwork])
|
|
||||||
+ LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${LDFLAGS_save}"
|
|
||||||
+ VLC_ADD_LIBS([filesystem access_ftp access_mms access_output_udp oldtelnet netsync sap libvlccore growl_udp],[-lnetwork])
|
|
||||||
+ ;;
|
|
||||||
+
|
|
||||||
*)
|
|
||||||
SYS="${host_os}"
|
|
||||||
;;
|
|
||||||
@@ -4713,7 +4725,7 @@
|
|
||||||
dnl Stuff used by the program
|
|
||||||
dnl
|
|
||||||
VERSION_MESSAGE="${VERSION} ${CODENAME}"
|
|
||||||
-COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the VideoLAN team"
|
|
||||||
+COPYRIGHT_MESSAGE="Copyright C ${COPYRIGHT_YEARS} the VideoLAN team"
|
|
||||||
AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION_MESSAGE}", [Simple version string])
|
|
||||||
AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "${COPYRIGHT_MESSAGE}", [Copyright string])
|
|
||||||
AC_DEFINE_UNQUOTED(COPYRIGHT_YEARS, "${COPYRIGHT_YEARS}", [The copyright years])
|
|
||||||
519
media-video/vlc/patches/vlc-2.2.1.patch
Normal file
519
media-video/vlc/patches/vlc-2.2.1.patch
Normal file
@@ -0,0 +1,519 @@
|
|||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 121e8c9..ccd10ac 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -295,11 +295,18 @@ case "${host_os}" in
|
||||||
|
LDFLAGS="${LDFLAGS} -Zomf -Zbin-files -Zargs-wild -Zhigh-mem"
|
||||||
|
AC_LIBOBJ([freeaddrinfo])
|
||||||
|
;;
|
||||||
|
+ *haiku*)
|
||||||
|
+ SYS=haiku
|
||||||
|
+ VLC_ADD_LIBS([libvlccore libvlc vlc],[-lnetwork -lbe])
|
||||||
|
+ VLC_ADD_PLUGIN([haiku_aout])
|
||||||
|
+ VLC_ADD_LIBS([haiku_aout],[-lmedia])
|
||||||
|
+ ;;
|
||||||
|
*)
|
||||||
|
SYS="${host_os}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
|
||||||
|
+AM_CONDITIONAL(HAVE_HAIKU, test "${SYS}" = "haiku")
|
||||||
|
AM_CONDITIONAL(HAVE_LINUX, test "${SYS}" = "linux")
|
||||||
|
AM_CONDITIONAL(HAVE_OS2, test "${SYS}" = "os2")
|
||||||
|
AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
|
||||||
|
@@ -532,10 +539,13 @@ VLC_LIBRARY_SUFFIX
|
||||||
|
dnl Check for system libs needed
|
||||||
|
need_libc=false
|
||||||
|
|
||||||
|
+# this fails to detect that we have if_nameindex and if_nametoindex on Haiku
|
||||||
|
+# and then it fails to detect that we don't have tdestroy...
|
||||||
|
+
|
||||||
|
dnl Check for usual libc functions
|
||||||
|
AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
|
||||||
|
AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
|
||||||
|
-AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp])
|
||||||
|
+AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab strverscmp])
|
||||||
|
AC_CHECK_FUNCS(fdatasync,,
|
||||||
|
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
|
||||||
|
])
|
||||||
|
@@ -603,8 +613,10 @@ AC_SEARCH_LIBS(connect, [socket], [
|
||||||
|
AS_IF([test "${SYS}" = "mingw32"], [
|
||||||
|
SOCKET_LIBS="-lws2_32"
|
||||||
|
])
|
||||||
|
+ AS_IF([test "${SYS}" = "haiku"], [
|
||||||
|
+ SOCKET_LIBS="-lnetwork"
|
||||||
|
+ ])
|
||||||
|
])
|
||||||
|
-
|
||||||
|
AC_SEARCH_LIBS([inet_pton], [nsl], [
|
||||||
|
AS_IF([test "$ac_cv_search_inet_pton" != "none required"], [
|
||||||
|
SOCKET_LIBS="$ac_cv_search_inet_pton $SOCKET_LIBS"
|
||||||
|
@@ -3186,7 +3198,7 @@ then
|
||||||
|
if test "${SYS}" != "darwin"; then
|
||||||
|
VLC_ADD_PLUGIN([vout_sdl])
|
||||||
|
fi
|
||||||
|
- if test "${SYS}" != "mingw32" -a "${SYS}" != "os2"; then
|
||||||
|
+ if test "${SYS}" != "mingw32" -a "${SYS}" != "os2" -a "${SYS}" != "haiku"; then
|
||||||
|
VLC_ADD_LIBS([vout_sdl],[${X_LIBS} ${X_PRE_LIBS} -lX11])
|
||||||
|
fi
|
||||||
|
VLC_ADD_CFLAGS([vout_sdl],[${SDL_CFLAGS}])
|
||||||
|
diff --git a/bin/override.c b/bin/override.c
|
||||||
|
index fb4608c..9c7c085 100644
|
||||||
|
--- a/bin/override.c
|
||||||
|
+++ b/bin/override.c
|
||||||
|
@@ -125,6 +125,8 @@ static void *getsym (const char *name)
|
||||||
|
*
|
||||||
|
* Some evil libraries modify the environment. We currently ignore the calls as
|
||||||
|
* they could crash the process. This may cause funny behaviour though. */
|
||||||
|
+#ifndef __HAIKU__
|
||||||
|
+//not working
|
||||||
|
int putenv (char *str)
|
||||||
|
{
|
||||||
|
if (override)
|
||||||
|
@@ -135,6 +137,7 @@ int putenv (char *str)
|
||||||
|
return CALL(putenv, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#endif
|
||||||
|
int setenv (const char *name, const char *value, int overwrite)
|
||||||
|
{
|
||||||
|
if (override)
|
||||||
|
diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
|
||||||
|
index 997f600..47b566e 100644
|
||||||
|
--- a/include/vlc_fixups.h
|
||||||
|
+++ b/include/vlc_fixups.h
|
||||||
|
@@ -261,10 +261,13 @@ void swab (const void *, void *, ssize_t);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Socket stuff */
|
||||||
|
+// configure doesn't detect these, likely not linking to -lnetwork, must investigate
|
||||||
|
+#ifndef __HAIKU__
|
||||||
|
#ifndef HAVE_INET_PTON
|
||||||
|
int inet_pton(int, const char *, void *);
|
||||||
|
const char *inet_ntop(int, const void *, char *, int);
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRUCT_POLLFD
|
||||||
|
enum
|
||||||
|
@@ -289,6 +292,8 @@ struct pollfd;
|
||||||
|
int poll (struct pollfd *, unsigned, int);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+// or these
|
||||||
|
+#ifndef __HAIKU__
|
||||||
|
#ifndef HAVE_IF_NAMEINDEX
|
||||||
|
#include <errno.h>
|
||||||
|
struct if_nameindex
|
||||||
|
@@ -302,6 +307,7 @@ struct if_nameindex
|
||||||
|
# define if_nameindex() (errno = ENOBUFS, NULL)
|
||||||
|
# define if_freenameindex(list) (void)0
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* search.h */
|
||||||
|
#ifndef HAVE_SEARCH_H
|
||||||
|
diff --git a/include/vlc_threads.h b/include/vlc_threads.h
|
||||||
|
index d3f021b..15c4662 100644
|
||||||
|
--- a/include/vlc_threads.h
|
||||||
|
+++ b/include/vlc_threads.h
|
||||||
|
@@ -163,7 +163,13 @@ typedef struct
|
||||||
|
#define VLC_STATIC_COND { PTHREAD_COND_INITIALIZER, 0 }
|
||||||
|
typedef semaphore_t vlc_sem_t;
|
||||||
|
typedef pthread_rwlock_t vlc_rwlock_t;
|
||||||
|
+// Haiku bug #8798
|
||||||
|
+#ifdef __HAIKU__
|
||||||
|
+#define VLC_STATIC_RWLOCK \
|
||||||
|
+ { VLC_STATIC_MUTEX, VLC_STATIC_COND, 0, 0, 0 }
|
||||||
|
+#else
|
||||||
|
#define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER
|
||||||
|
+#endif
|
||||||
|
typedef pthread_key_t vlc_threadvar_t;
|
||||||
|
typedef struct vlc_timer *vlc_timer_t;
|
||||||
|
|
||||||
|
@@ -189,7 +195,13 @@ typedef pthread_cond_t vlc_cond_t;
|
||||||
|
#define VLC_STATIC_COND PTHREAD_COND_INITIALIZER
|
||||||
|
typedef sem_t vlc_sem_t;
|
||||||
|
typedef pthread_rwlock_t vlc_rwlock_t;
|
||||||
|
+// Haiku bug #8798
|
||||||
|
+#ifdef __HAIKU__
|
||||||
|
+#define VLC_STATIC_RWLOCK \
|
||||||
|
+ { VLC_STATIC_MUTEX, VLC_STATIC_COND, 0, 0, 0 }
|
||||||
|
+#else
|
||||||
|
#define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER
|
||||||
|
+#endif
|
||||||
|
typedef pthread_key_t vlc_threadvar_t;
|
||||||
|
typedef struct vlc_timer *vlc_timer_t;
|
||||||
|
|
||||||
|
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||||
|
index a7d06cc..22348ae 100644
|
||||||
|
--- a/src/Makefile.am
|
||||||
|
+++ b/src/Makefile.am
|
||||||
|
@@ -232,6 +232,9 @@ else
|
||||||
|
if HAVE_OS2
|
||||||
|
libvlccore_la_SOURCES += $(SOURCES_libvlc_os2)
|
||||||
|
else
|
||||||
|
+if HAVE_HAIKU
|
||||||
|
+libvlccore_la_SOURCES += $(SOURCES_libvlc_haiku)
|
||||||
|
+else
|
||||||
|
libvlccore_la_SOURCES += $(SOURCES_libvlc_other)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
@@ -239,6 +242,7 @@ endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
+endif
|
||||||
|
if BUILD_HTTPD
|
||||||
|
libvlccore_la_SOURCES += $(SOURCES_libvlc_httpd)
|
||||||
|
endif
|
||||||
|
@@ -320,6 +328,18 @@ SOURCES_libvlc_os2 = \
|
||||||
|
os2/rand.c \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
+SOURCES_libvlc_haiku = \
|
||||||
|
+ posix/dirs.c \
|
||||||
|
+ posix/error.c \
|
||||||
|
+ posix/filesystem.c \
|
||||||
|
+ posix/netconf.c \
|
||||||
|
+ posix/thread.c \
|
||||||
|
+ posix/timer.c \
|
||||||
|
+ posix/plugin.c \
|
||||||
|
+ posix/rand.c \
|
||||||
|
+ haiku/specific.cpp \
|
||||||
|
+ $(NULL)
|
||||||
|
+
|
||||||
|
SOURCES_libvlc_other = \
|
||||||
|
posix/dirs.c \
|
||||||
|
posix/error.c \
|
||||||
|
diff --git a/src/modules/bank.c b/src/modules/bank.c
|
||||||
|
index 6655f00..bcbf99e 100644
|
||||||
|
--- a/src/modules/bank.c
|
||||||
|
+++ b/src/modules/bank.c
|
||||||
|
@@ -67,6 +67,7 @@ static void module_StoreBank (module_t *module)
|
||||||
|
modules.head = module;
|
||||||
|
}
|
||||||
|
|
||||||
|
+/* Haiku bug #8288
|
||||||
|
#if defined(__ELF__) || !HAVE_DYNAMIC_PLUGINS
|
||||||
|
# ifdef __GNUC__
|
||||||
|
__attribute__((weak))
|
||||||
|
@@ -86,9 +87,9 @@ static void module_InitStaticModules(void)
|
||||||
|
module_StoreBank (module);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-#else
|
||||||
|
+#else */
|
||||||
|
static void module_InitStaticModules(void) { }
|
||||||
|
-#endif
|
||||||
|
+//#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Init bank
|
||||||
|
diff --git a/src/network/io.c b/src/network/io.c
|
||||||
|
index ea1b1b9..acdd9b1 100644
|
||||||
|
--- a/src/network/io.c
|
||||||
|
+++ b/src/network/io.c
|
||||||
|
@@ -216,7 +216,9 @@ int *net_Listen (vlc_object_t *p_this, const char *psz_host,
|
||||||
|
switch (ptr->ai_socktype)
|
||||||
|
{
|
||||||
|
case SOCK_STREAM:
|
||||||
|
+#ifdef SOCK_RDM
|
||||||
|
case SOCK_RDM:
|
||||||
|
+#endif
|
||||||
|
case SOCK_SEQPACKET:
|
||||||
|
#ifdef SOCK_DCCP
|
||||||
|
case SOCK_DCCP:
|
||||||
|
diff --git a/src/posix/netconf.c b/src/posix/netconf.c
|
||||||
|
index 4dd751b..54accaa 100644
|
||||||
|
--- a/src/posix/netconf.c
|
||||||
|
+++ b/src/posix/netconf.c
|
||||||
|
@@ -29,7 +29,9 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
-#include <spawn.h>
|
||||||
|
+#ifndef __HAIKU__
|
||||||
|
+# include <spawn.h>
|
||||||
|
+#endif
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
extern char **environ;
|
||||||
|
@@ -45,6 +47,9 @@ extern char **environ;
|
||||||
|
*/
|
||||||
|
char *vlc_getProxyUrl(const char *url)
|
||||||
|
{
|
||||||
|
+#ifdef __HAIKU__
|
||||||
|
+ return NULL;
|
||||||
|
+#else
|
||||||
|
/* libproxy helper */
|
||||||
|
pid_t pid;
|
||||||
|
posix_spawn_file_actions_t actions;
|
||||||
|
@@ -115,4 +120,5 @@ char *vlc_getProxyUrl(const char *url)
|
||||||
|
if (var != NULL)
|
||||||
|
var = strdup(var);
|
||||||
|
return var;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
--- vlc-2.0.3-orig/modules/audio_output/haiku.cpp 1970-01-01 00:00:00.000000000 +0000
|
||||||
|
+++ vlc-2.0.5/modules/audio_output/haiku.cpp 2012-08-06 23:15:46.251396096 +0000
|
||||||
|
@@ -0,0 +1,196 @@
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * Haiku.cpp - Haiku Media Kit audio output
|
||||||
|
+ *****************************************************************************
|
||||||
|
+ * Copyright (C) 1999, 2000, 2001, 2012 the VideoLAN team
|
||||||
|
+ *
|
||||||
|
+ * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
|
||||||
|
+ * Samuel Hocevar <sam@zoy.org>
|
||||||
|
+ * Eric Petit <titer@videolan.org>
|
||||||
|
+ * Cian Duffy <myob87@gmail.com>
|
||||||
|
+ *
|
||||||
|
+ * This program is free software; you can redistribute it and/or modify
|
||||||
|
+ * it under the terms of the GNU General Public License as published by
|
||||||
|
+ * the Free Software Foundation; either version 2 of the License, or
|
||||||
|
+ * (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This program is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * You should have received a copy of the GNU General Public License
|
||||||
|
+ * along with this program; if not, write to the Free Software
|
||||||
|
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * Preamble
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdlib.h> /* malloc(), free() */
|
||||||
|
+#include <malloc.h>
|
||||||
|
+#include <string.h>
|
||||||
|
+
|
||||||
|
+#include <iostream>
|
||||||
|
+#include <queue>
|
||||||
|
+using namespace std;
|
||||||
|
+
|
||||||
|
+#include <SoundPlayer.h>
|
||||||
|
+#include <media/MediaDefs.h>
|
||||||
|
+
|
||||||
|
+#ifdef HAVE_CONFIG_H
|
||||||
|
+# include "config.h"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#include <vlc_aout.h>
|
||||||
|
+#include <vlc_common.h>
|
||||||
|
+#include <vlc_plugin.h>
|
||||||
|
+
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * aout_sys_t: BeOS audio output method descriptor
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+
|
||||||
|
+queue<uint8> a_queue;
|
||||||
|
+
|
||||||
|
+struct aout_sys_t
|
||||||
|
+{
|
||||||
|
+ BSoundPlayer * p_player;
|
||||||
|
+ mtime_t latency;
|
||||||
|
+ media_raw_audio_format * p_format;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * Local prototypes.
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+static void Close ( vlc_object_t * );
|
||||||
|
+static void Pause (audio_output_t *, bool, mtime_t);
|
||||||
|
+static void Play (audio_output_t *, block_t *);
|
||||||
|
+
|
||||||
|
+static void Flush (audio_output_t *, bool);static int Open ( vlc_object_t * );
|
||||||
|
+static void BufferProc ( void * p_aout, void * p_buffer, size_t size,
|
||||||
|
+ const media_raw_audio_format & format );
|
||||||
|
+
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * Module descriptor
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+vlc_module_begin ()
|
||||||
|
+ set_shortname( "haiku_aout" )
|
||||||
|
+ set_description( N_("Haiku Media Kit audio output") )
|
||||||
|
+ set_capability( "audio output", 100 )
|
||||||
|
+ set_category( CAT_AUDIO )
|
||||||
|
+ set_subcategory( SUBCAT_AUDIO_AOUT )
|
||||||
|
+ set_callbacks( Open, Close )
|
||||||
|
+vlc_module_end ()
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * OpenAudio
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+static int Open( vlc_object_t * p_this )
|
||||||
|
+{
|
||||||
|
+ audio_output_t *p_aout = (audio_output_t *)p_this;
|
||||||
|
+ p_aout->sys = (aout_sys_t*)malloc( sizeof( aout_sys_t ) );
|
||||||
|
+ if( p_aout->sys == NULL )
|
||||||
|
+ {
|
||||||
|
+ return VLC_ENOMEM;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ aout_sys_t * p_sys = p_aout->sys;
|
||||||
|
+
|
||||||
|
+ audio_format_t format = p_aout->format;
|
||||||
|
+
|
||||||
|
+ int i_nb_channels = aout_FormatNbChannels( &format );
|
||||||
|
+
|
||||||
|
+// media_raw_audio_format must be passed to BSoundPlayer
|
||||||
|
+ p_sys->p_format = (media_raw_audio_format*)
|
||||||
|
+ malloc( sizeof( media_raw_audio_format ) );
|
||||||
|
+
|
||||||
|
+ p_aout->format.i_format = VLC_CODEC_FI32;
|
||||||
|
+ p_aout->format.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
|
||||||
|
+ p_aout->format.i_rate = 44100;
|
||||||
|
+
|
||||||
|
+ p_sys->p_format->channel_count = i_nb_channels;
|
||||||
|
+ p_sys->p_format->frame_rate = p_aout->format.i_rate;
|
||||||
|
+ p_sys->p_format->format = media_raw_audio_format::B_AUDIO_INT;
|
||||||
|
+ p_sys->p_format->byte_order = B_MEDIA_LITTLE_ENDIAN;
|
||||||
|
+ // 'magic' number obtained from checking what size the buffers being
|
||||||
|
+ // passed by the callback were
|
||||||
|
+ // in theory, any buffer size should work
|
||||||
|
+ p_sys->p_format->buffer_size = 9216;
|
||||||
|
+
|
||||||
|
+ aout_VolumeSoftInit( p_aout );
|
||||||
|
+
|
||||||
|
+ //BSoundPlayer init - format, name, buffer producer, notifier, cookie
|
||||||
|
+
|
||||||
|
+ p_sys->p_player = new BSoundPlayer( p_sys->p_format, "player", BufferProc, NULL, NULL );
|
||||||
|
+ if( p_sys->p_player->InitCheck() != B_OK )
|
||||||
|
+ {
|
||||||
|
+ msg_Err( p_aout, "BSoundPlayer InitCheck failed" );
|
||||||
|
+ delete p_sys->p_player;
|
||||||
|
+ free( p_sys );
|
||||||
|
+ }
|
||||||
|
+ p_sys->latency = p_sys->p_player->Latency();
|
||||||
|
+
|
||||||
|
+ p_aout->pf_play = Play;
|
||||||
|
+ p_aout->pf_pause = Pause;
|
||||||
|
+ p_aout->pf_flush = Flush;
|
||||||
|
+
|
||||||
|
+ return VLC_SUCCESS;
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * BufferProc- buffer producer function
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+static void BufferProc( void * _p_aout, void * _p_buffer, size_t i_size,
|
||||||
|
+ const media_raw_audio_format &format )
|
||||||
|
+{
|
||||||
|
+// Load buffer
|
||||||
|
+ for (size_t i = 0; i < i_size; i++)
|
||||||
|
+ {
|
||||||
|
+ uint8 data = a_queue.front();
|
||||||
|
+ vlc_memset(_p_buffer + i, data, 1);
|
||||||
|
+ a_queue.pop();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+}
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * CloseAudio
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+static void Close( vlc_object_t * p_this )
|
||||||
|
+{
|
||||||
|
+ printf("Close Called");
|
||||||
|
+ audio_output_t *p_aout = (audio_output_t *)p_this;
|
||||||
|
+ struct aout_sys_t *p_sys;
|
||||||
|
+ p_aout->sys = p_sys;
|
||||||
|
+
|
||||||
|
+ /* Clean up */
|
||||||
|
+ p_sys->p_player->Stop();
|
||||||
|
+ delete p_sys->p_player;
|
||||||
|
+ free( p_sys );
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void Play (audio_output_t *aout, block_t *block)
|
||||||
|
+{
|
||||||
|
+ aout_sys_t * p_sys = aout->sys;
|
||||||
|
+
|
||||||
|
+// load buffer to STL queue, sample by sample
|
||||||
|
+ for (size_t i = 0; i < block->i_buffer; i++)
|
||||||
|
+ {
|
||||||
|
+ a_queue.push(block->p_buffer[i]);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ p_sys->p_player->Start();
|
||||||
|
+ p_sys->p_player->SetHasData( true );
|
||||||
|
+// release buffer
|
||||||
|
+ block_Release (block);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void Pause (audio_output_t *aout, bool pause, mtime_t date)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void Flush (audio_output_t *aout, bool wait)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
diff --git a/src/haiku/specific.cpp b/src/haiku/specific.cpp
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..3768ba5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/src/haiku/specific.cpp
|
||||||
|
@@ -0,0 +1,57 @@
|
||||||
|
+/*****************************************************************************
|
||||||
|
+ * specific.c: stubs for POSIX OS-specific initialization
|
||||||
|
+ *****************************************************************************
|
||||||
|
+ * Copyright © 2008 Rémi Denis-Courmont
|
||||||
|
+ *
|
||||||
|
+ * This program is free software; you can redistribute it and/or modify it
|
||||||
|
+ * under the terms of the GNU Lesser General Public License as published by
|
||||||
|
+ * the Free Software Foundation; either version 2.1 of the License, or
|
||||||
|
+ * (at your option) any later version.
|
||||||
|
+ *
|
||||||
|
+ * This program is distributed in the hope that it will be useful,
|
||||||
|
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
+ * GNU Lesser General Public License for more details.
|
||||||
|
+ *
|
||||||
|
+ * You should have received a copy of the GNU Lesser General Public License
|
||||||
|
+ * along with this program; if not, write to the Free Software Foundation,
|
||||||
|
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||||
|
+ *****************************************************************************/
|
||||||
|
+
|
||||||
|
+#ifdef HAVE_CONFIG_H
|
||||||
|
+# include "config.h"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#include <Application.h>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+#include <vlc_common.h>
|
||||||
|
+extern "C"
|
||||||
|
+{
|
||||||
|
+#include "../libvlc.h"
|
||||||
|
+#include <pthread.h>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void set_libvlc_path (void)
|
||||||
|
+{
|
||||||
|
+ return;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void system_Init (void)
|
||||||
|
+{
|
||||||
|
+ BApplication app("application/x-vnd.videolan-vlc");
|
||||||
|
+ pthread_once_t once = PTHREAD_ONCE_INIT;
|
||||||
|
+
|
||||||
|
+ pthread_once (&once, set_libvlc_path);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void system_Configure (libvlc_int_t *libvlc,
|
||||||
|
+ int argc, const char *const argv[])
|
||||||
|
+{
|
||||||
|
+ (void)libvlc; (void)argc; (void)argv;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void system_End (void)
|
||||||
|
+{
|
||||||
|
+}
|
||||||
|
+}
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
DESCRIPTION="vlc - media player"
|
|
||||||
HOMEPAGE="http://www.videolan.org/vlc/"
|
|
||||||
SRC_URI="http://nightlies.videolan.org/build/source/branch-20101107-0207/vlc-snapshot-branch-1.1.5-20101107.tar.bz2"
|
|
||||||
REVISION="1"
|
|
||||||
STATUS_HAIKU="broken"
|
|
||||||
DEPEND="pkgconfig >= 0.23
|
|
||||||
gettext >= 0.17
|
|
||||||
libcdio
|
|
||||||
libogg
|
|
||||||
libmodplug
|
|
||||||
libdvdread
|
|
||||||
libebml
|
|
||||||
libmad
|
|
||||||
libdvbspi
|
|
||||||
a52dec
|
|
||||||
libdca
|
|
||||||
ffmpeg >= 0.6"
|
|
||||||
CHECKSUM_MD5="9ab7d8218ff37e362f996fd7d8879dbc"
|
|
||||||
BUILD()
|
|
||||||
{
|
|
||||||
cd vlc-1.1.5
|
|
||||||
./bootstrap
|
|
||||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --disable-postproc --disable-xcb --disable-skins2 --disable-qt4 --disable-libgcrypt --disable-remoteosd
|
|
||||||
make
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTALL()
|
|
||||||
{
|
|
||||||
cd vlc-1.1.5
|
|
||||||
make install
|
|
||||||
}
|
|
||||||
|
|
||||||
LICENSE="GNU GPL v2"
|
|
||||||
COPYRIGHT="1998-2010"
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
DESCRIPTION="vlc - media player"
|
|
||||||
HOMEPAGE="http://www.videolan.org/vlc/"
|
|
||||||
SRC_URI="http://download.videolan.org/pub/videolan/vlc/2.0.5/vlc-2.0.5.tar.xz"
|
|
||||||
REVISION="1"
|
|
||||||
STATUS_HAIKU="unstable"
|
|
||||||
MESSAGE="This port only builds on gcc4 systems"
|
|
||||||
DEPEND="faad2,
|
|
||||||
libdca,
|
|
||||||
libdvdnav >= 4.2.0,
|
|
||||||
libmatroska,
|
|
||||||
libmad,
|
|
||||||
a52dec,
|
|
||||||
schroedinger,
|
|
||||||
twolame,
|
|
||||||
lua >= 5.1.4,
|
|
||||||
taglib >= 1.7,
|
|
||||||
libbluray,
|
|
||||||
lame >= 3.98.4,
|
|
||||||
libgcrypt,
|
|
||||||
libcddb,
|
|
||||||
x264,
|
|
||||||
flac,
|
|
||||||
ffmpeg = 0.10.2-vlc
|
|
||||||
libsdl
|
|
||||||
sdl-image"
|
|
||||||
CHECKSUM_MD5="4f959c0766ada8cea5a72c65fce94ebe"
|
|
||||||
BUILD()
|
|
||||||
{
|
|
||||||
cd vlc-2.0.5
|
|
||||||
bootstrap
|
|
||||||
./configure --prefix=`finddir B_COMMON_DIRECTORY` --with-kde-solid=no --disable-xcb --enable-run-as-root --enable-static
|
|
||||||
make
|
|
||||||
}
|
|
||||||
|
|
||||||
INSTALL()
|
|
||||||
{
|
|
||||||
cd vlc-2.0.5
|
|
||||||
make install
|
|
||||||
}
|
|
||||||
|
|
||||||
LICENSE="GNU GPL v2"
|
|
||||||
COPYRIGHT="1998-2012"
|
|
||||||
114
media-video/vlc/vlc-2.2.1.recipe
Normal file
114
media-video/vlc/vlc-2.2.1.recipe
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
SUMMARY="VLC Media Player"
|
||||||
|
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="http://www.videolan.org/vlc/"
|
||||||
|
SRC_URI="http://download.videolan.org/pub/videolan/vlc/2.2.1/vlc-2.2.1.tar.xz"
|
||||||
|
CHECKSUM_SHA256="543d9d7e378ec0fa1ee2e7f7f5acf8c456c7d0ecc32037171523197ef3cf1fcb"
|
||||||
|
|
||||||
|
ARCHITECTURES="x86"
|
||||||
|
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||||
|
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||||
|
# for a different secondary architecture.
|
||||||
|
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||||
|
fi
|
||||||
|
SECONDARY_ARCHITECTURES="x86"
|
||||||
|
|
||||||
|
REVISION="1"
|
||||||
|
|
||||||
|
PROVIDES="
|
||||||
|
vlc$secondaryArchSuffix = $portVersion
|
||||||
|
cmd:vlc_wrapper$secondaryArchSuffix
|
||||||
|
cmd:vlc$secondaryArchSuffix
|
||||||
|
cmd:rvlc$secondaryArchSuffix
|
||||||
|
cmd:qvlc$secondaryArchSuffix
|
||||||
|
cmd:cvlc$secondaryArchSuffix
|
||||||
|
lib:libvlc$secondaryArchSuffix
|
||||||
|
lib:libvlccore$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
DEPEND="
|
||||||
|
faad2
|
||||||
|
libdca
|
||||||
|
libdvdnav
|
||||||
|
libmatroska
|
||||||
|
libmad
|
||||||
|
a52dec
|
||||||
|
schroedinger
|
||||||
|
twolame
|
||||||
|
lua
|
||||||
|
taglib
|
||||||
|
libbluray
|
||||||
|
lame
|
||||||
|
libgcrypt
|
||||||
|
libcddb
|
||||||
|
x264
|
||||||
|
flac
|
||||||
|
ffmpeg
|
||||||
|
libsdl
|
||||||
|
sdl-image
|
||||||
|
xproto
|
||||||
|
libxau
|
||||||
|
libxcb
|
||||||
|
"
|
||||||
|
REQUIRES="
|
||||||
|
haiku${secondaryArchSuffix}
|
||||||
|
libqt4${secondaryArchSuffix} >= 4.8
|
||||||
|
lib:libiconv$secondaryArchSuffix
|
||||||
|
lib:libintl$secondaryArchSuffix
|
||||||
|
lib:libstdc++$secondaryArchSuffix
|
||||||
|
lib:libgcc_s$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
BUILD_PREREQUIRES="
|
||||||
|
cmd:aclocal
|
||||||
|
cmd:autoreconf
|
||||||
|
cmd:g++${secondaryArchSuffix}
|
||||||
|
cmd:gettext$secondaryArchSuffix
|
||||||
|
cmd:libtoolize
|
||||||
|
cmd:make
|
||||||
|
cmd:pkg_config$secondaryArchSuffix
|
||||||
|
cmd:xargs
|
||||||
|
"
|
||||||
|
BUILD_REQUIRES="
|
||||||
|
haiku${secondaryArchSuffix}_devel
|
||||||
|
libqt4${secondaryArchSuffix}_devel >= 4.8
|
||||||
|
devel:liba52$secondaryArchSuffix
|
||||||
|
devel:libgcrypt$secondaryArchSuffix
|
||||||
|
devel:libgpg_error$secondaryArchSuffix
|
||||||
|
devel:libiconv$secondaryArchSuffix
|
||||||
|
devel:libmad$secondaryArchSuffix
|
||||||
|
# devel:libpthread_stubs$secondaryArchSuffix
|
||||||
|
devel:libswscale$secondaryArchSuffix
|
||||||
|
# devel:libxcb$secondaryArchSuffix
|
||||||
|
devel:libz$secondaryArchSuffix
|
||||||
|
"
|
||||||
|
PATCH()
|
||||||
|
{
|
||||||
|
sed -i 's/-lX11//g' modules/gui/qt4/Makefile.am
|
||||||
|
}
|
||||||
|
|
||||||
|
PATCHES="vlc-2.2.1.patch"
|
||||||
|
|
||||||
|
BUILD()
|
||||||
|
{
|
||||||
|
bootstrap
|
||||||
|
runConfigure ./configure --disable-rpath --disable-lua \
|
||||||
|
--disable-avcodec --disable-xcb --enable-run-as-root
|
||||||
|
# --bindir=$appsDir/VLC --libdir=$appsDir/VLC/lib
|
||||||
|
sed -i 's/-Werror-implicit-function-declaration//g' src/Makefile
|
||||||
|
make $jobArgs
|
||||||
|
}
|
||||||
|
|
||||||
|
INSTALL()
|
||||||
|
{
|
||||||
|
make install
|
||||||
|
|
||||||
|
rm -rf $dataDir/{applications,icons,kde4,vlc}
|
||||||
|
addResourcesToBinaries $portDir/additional-files/vlc.rdef $binDir/vlc
|
||||||
|
addAppDeskbarSymlink $binDir/vlc "VLC media player"
|
||||||
|
|
||||||
|
# packageEntries devel \
|
||||||
|
# $developDir
|
||||||
|
}
|
||||||
|
|
||||||
|
LICENSE="GNU GPL v2"
|
||||||
|
COPYRIGHT="1998-2015"
|
||||||
Reference in New Issue
Block a user