Commit c9f95c80 authored by Thomas Guillem's avatar Thomas Guillem

WIP: hack to have pulse audio

parent e60fdfd9
......@@ -117,7 +117,7 @@ VLC_CONFIGURE_ARGS="\
--enable-zvbi \
--disable-fluidsynth \
--disable-jack \
--disable-pulse \
--enable-pulse \
--disable-alsa \
--disable-samplerate \
--disable-sdl \
......@@ -286,12 +286,35 @@ cd ../../
###################
VLC_BUILD_DIR=build-tizen-${TARGET_TUPLE}
mkdir -p $VLC_BUILD_DIR && cd $VLC_BUILD_DIR
mkdir -p ${PROJECTPATH}/vlc/${VLC_BUILD_DIR}
#####################
# FAKE VLC DEPS #
#####################
VLC_HACK_PREFIX=${PROJECTPATH}/vlc/${VLC_BUILD_DIR}/prefix
VLC_HACK_INCLUDES="${PROJECTPATH}/hacks/vlc/include"
VLC_HACK_LIB="${VLC_HACK_PREFIX}/lib"
mkdir -p ${VLC_HACK_LIB}
echo ${VLC_HACK_PREFIX}
cd ${PROJECTPATH}/hacks/vlc
for symbols in *.symbols; do
so_file="`basename $symbols .symbols`"
c_file="`basename $so_file .so`.c"
rm -f ${VLC_HACK_PREFIX}/$c_file ${VLC_HACK_LIB}/$so_file
for s in `cat $symbols`; do echo "void $s() {}" >> ${VLC_HACK_PREFIX}/$c_file; done
${CC} ${VLC_HACK_PREFIX}/$c_file -shared -o ${VLC_HACK_LIB}/$so_file -fPIC
done
#############
# CONFIGURE #
#############
cd ${PROJECTPATH}/vlc/${VLC_BUILD_DIR}
if [ ! -e ./config.h -o "$RELEASE" = 1 ]; then
CPPFLAGS="$CPPFLAGS" \
CFLAGS="$CFLAGS ${EXTRA_CFLAGS}" \
......@@ -303,6 +326,8 @@ NM="${CROSS_COMPILE}nm" \
STRIP="${CROSS_COMPILE}strip" \
RANLIB="${CROSS_COMPILE}ranlib" \
AR="${CROSS_COMPILE}ar" \
PULSE_CFLAGS="-I${VLC_HACK_INCLUDES}" \
PULSE_LIBS="-L${VLC_HACK_LIB} -lpulse" \
PKG_CONFIG_LIBDIR=../contrib/$TARGET_TUPLE/lib/pkgconfig \
sh ../configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux \
${EXTRA_PARAMS} ${VLC_CONFIGURE_ARGS} ${OPTS}
......
#!/bin/sh
for i in *.so; do
nm -D --defined-only $i | awk '{print $3}' \
| grep -vE "^(__aeabi|__bss_start|__bss_end__|_bss_end__|_edata|__end__|_init|_fini|_end)" > $i.symbols
done
#ifndef foopulsecdeclhfoo
#define foopulsecdeclhfoo
/***
This file is part of PulseAudio.
Copyright 2004-2006 Lennart Poettering
PulseAudio 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.
PulseAudio 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 Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
/** \file
* C++ compatibility support */
#ifdef __cplusplus
/** If using C++ this macro enables C mode, otherwise does nothing */
#define PA_C_DECL_BEGIN extern "C" {
/** If using C++ this macros switches back to C++ mode, otherwise does nothing */
#define PA_C_DECL_END }
#else
/** If using C++ this macro enables C mode, otherwise does nothing */
#define PA_C_DECL_BEGIN
/** If using C++ this macros switches back to C++ mode, otherwise does nothing */
#define PA_C_DECL_END
#endif
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#ifndef fooerrorhfoo
#define fooerrorhfoo
/***
This file is part of PulseAudio.
Copyright 2004-2006 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio 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.
PulseAudio 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 Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
#include <pulse/cdecl.h>
#include <pulse/version.h>
/** \file
* Error management */
PA_C_DECL_BEGIN
/** Return a human readable error message for the specified numeric error code */
const char* pa_strerror(int error);
PA_C_DECL_END
#endif
#ifndef foopulseextdevicemanagerhfoo
#define foopulseextdevicemanagerhfoo
/***
This file is part of PulseAudio.
Copyright 2008 Lennart Poettering
Copyright 2009 Colin Guthrie
PulseAudio 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.
PulseAudio 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 Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
#include <pulse/cdecl.h>
#include <pulse/context.h>
#include <pulse/version.h>
/** \file
*
* Routines for controlling module-device-manager
*/
PA_C_DECL_BEGIN
typedef struct pa_ext_device_manager_role_priority_info {
const char *role;
uint32_t priority;
} pa_ext_device_manager_role_priority_info;
/** Stores information about one device in the device database that is
* maintained by module-device-manager. \since 0.9.21 */
typedef struct pa_ext_device_manager_info {
const char *name; /**< Identifier string of the device. A string like "sink:" or similar followed by the name of the device. */
const char *description; /**< The description of the device when it was last seen, if applicable and saved */
const char *icon; /**< The icon given to the device */
uint32_t index; /**< The device index if it is currently available or PA_INVALID_INDEX */
uint32_t n_role_priorities; /**< How many role priorities do we have? */
pa_ext_device_manager_role_priority_info *role_priorities; /**< An array of role priority structures or NULL */
} pa_ext_device_manager_info;
/** Callback prototype for pa_ext_device_manager_test(). \since 0.9.21 */
typedef void (*pa_ext_device_manager_test_cb_t)(
pa_context *c,
uint32_t version,
void *userdata);
/** Test if this extension module is available in the server. \since 0.9.21 */
pa_operation *pa_ext_device_manager_test(
pa_context *c,
pa_ext_device_manager_test_cb_t cb,
void *userdata);
/** Callback prototype for pa_ext_device_manager_read(). \since 0.9.21 */
typedef void (*pa_ext_device_manager_read_cb_t)(
pa_context *c,
const pa_ext_device_manager_info *info,
int eol,
void *userdata);
/** Read all entries from the device database. \since 0.9.21 */
pa_operation *pa_ext_device_manager_read(
pa_context *c,
pa_ext_device_manager_read_cb_t cb,
void *userdata);
/** Sets the description for a device. \since 0.9.21 */
pa_operation *pa_ext_device_manager_set_device_description(
pa_context *c,
const char* device,
const char* description,
pa_context_success_cb_t cb,
void *userdata);
/** Delete entries from the device database. \since 0.9.21 */
pa_operation *pa_ext_device_manager_delete(
pa_context *c,
const char *const s[],
pa_context_success_cb_t cb,
void *userdata);
/** Enable the role-based device-priority routing mode. \since 0.9.21 */
pa_operation *pa_ext_device_manager_enable_role_device_priority_routing(
pa_context *c,
int enable,
pa_context_success_cb_t cb,
void *userdata);
/** Prefer a given device in the priority list. \since 0.9.21 */
pa_operation *pa_ext_device_manager_reorder_devices_for_role(
pa_context *c,
const char* role,
const char** devices,
pa_context_success_cb_t cb,
void *userdata);
/** Subscribe to changes in the device database. \since 0.9.21 */
pa_operation *pa_ext_device_manager_subscribe(
pa_context *c,
int enable,
pa_context_success_cb_t cb,
void *userdata);
/** Callback prototype for pa_ext_device_manager_set_subscribe_cb(). \since 0.9.21 */
typedef void (*pa_ext_device_manager_subscribe_cb_t)(
pa_context *c,
void *userdata);
/** Set the subscription callback that is called when
* pa_ext_device_manager_subscribe() was called. \since 0.9.21 */
void pa_ext_device_manager_set_subscribe_cb(
pa_context *c,
pa_ext_device_manager_subscribe_cb_t cb,
void *userdata);
PA_C_DECL_END
#endif
#ifndef foopulseextdevicerestorehfoo
#define foopulseextdevicerestorehfoo
/***
This file is part of PulseAudio.
Copyright 2008 Lennart Poettering
Copyright 2011 Colin Guthrie
PulseAudio 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.
PulseAudio 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 Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
#include <pulse/context.h>
#include <pulse/format.h>
#include <pulse/version.h>
/** \file
*
* Routines for controlling module-device-restore
*/
PA_C_DECL_BEGIN
/** Stores information about one device in the device database that is
* maintained by module-device-manager. \since 1.0 */
typedef struct pa_ext_device_restore_info {
pa_device_type_t type; /**< Device type sink or source? */
uint32_t index; /**< The device index */
uint8_t n_formats; /**< How many formats do we have? */
pa_format_info **formats; /**< An array of formats (may be NULL if n_formats == 0) */
} pa_ext_device_restore_info;
/** Callback prototype for pa_ext_device_restore_test(). \since 1.0 */
typedef void (*pa_ext_device_restore_test_cb_t)(
pa_context *c,
uint32_t version,
void *userdata);
/** Test if this extension module is available in the server. \since 1.0 */
pa_operation *pa_ext_device_restore_test(
pa_context *c,
pa_ext_device_restore_test_cb_t cb,
void *userdata);
/** Subscribe to changes in the device database. \since 1.0 */
pa_operation *pa_ext_device_restore_subscribe(
pa_context *c,
int enable,
pa_context_success_cb_t cb,
void *userdata);
/** Callback prototype for pa_ext_device_restore_set_subscribe_cb(). \since 1.0 */
typedef void (*pa_ext_device_restore_subscribe_cb_t)(
pa_context *c,
pa_device_type_t type,
uint32_t idx,
void *userdata);
/** Set the subscription callback that is called when
* pa_ext_device_restore_subscribe() was called. \since 1.0 */
void pa_ext_device_restore_set_subscribe_cb(
pa_context *c,
pa_ext_device_restore_subscribe_cb_t cb,
void *userdata);
/** Callback prototype for pa_ext_device_restore_read_formats(). \since 1.0 */
typedef void (*pa_ext_device_restore_read_device_formats_cb_t)(
pa_context *c,
const pa_ext_device_restore_info *info,
int eol,
void *userdata);
/** Read the formats for all present devices from the device database. \since 1.0 */
pa_operation *pa_ext_device_restore_read_formats_all(
pa_context *c,
pa_ext_device_restore_read_device_formats_cb_t cb,
void *userdata);
/** Read an entry from the device database. \since 1.0 */
pa_operation *pa_ext_device_restore_read_formats(
pa_context *c,
pa_device_type_t type,
uint32_t idx,
pa_ext_device_restore_read_device_formats_cb_t cb,
void *userdata);
/** Read an entry from the device database. \since 1.0 */
pa_operation *pa_ext_device_restore_save_formats(
pa_context *c,
pa_device_type_t type,
uint32_t idx,
uint8_t n_formats,
pa_format_info **formats,
pa_context_success_cb_t cb,
void *userdata);
PA_C_DECL_END
#endif
#ifndef foopulseextstreamrestorehfoo
#define foopulseextstreamrestorehfoo
/***
This file is part of PulseAudio.
Copyright 2008 Lennart Poettering
PulseAudio 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.
PulseAudio 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 Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
#include <pulse/cdecl.h>
#include <pulse/context.h>
#include <pulse/version.h>
#include <pulse/volume.h>
#include <pulse/channelmap.h>
/** \file
*
* Routines for controlling module-stream-restore
*/
PA_C_DECL_BEGIN
/** Stores information about one entry in the stream database that is
* maintained by module-stream-restore. \since 0.9.12 */
typedef struct pa_ext_stream_restore_info {
const char *name; /**< Identifier string of the stream. A string like "sink-input-by-role:" or similar followed by some arbitrary property value. */
pa_channel_map channel_map; /**< The channel map for the volume field, if applicable */
pa_cvolume volume; /**< The volume of the stream when it was seen last, if applicable and saved */
const char *device; /**< The sink/source of the stream when it was last seen, if applicable and saved */
int mute; /**< The boolean mute state of the stream when it was last seen, if applicable and saved */
} pa_ext_stream_restore_info;
/** Callback prototype for pa_ext_stream_restore_test(). \since 0.9.12 */
typedef void (*pa_ext_stream_restore_test_cb_t)(
pa_context *c,
uint32_t version,
void *userdata);
/** Test if this extension module is available in the server. \since 0.9.12 */
pa_operation *pa_ext_stream_restore_test(
pa_context *c,
pa_ext_stream_restore_test_cb_t cb,
void *userdata);
/** Callback prototype for pa_ext_stream_restore_read(). \since 0.9.12 */
typedef void (*pa_ext_stream_restore_read_cb_t)(
pa_context *c,
const pa_ext_stream_restore_info *info,
int eol,
void *userdata);
/** Read all entries from the stream database. \since 0.9.12 */
pa_operation *pa_ext_stream_restore_read(
pa_context *c,
pa_ext_stream_restore_read_cb_t cb,
void *userdata);
/** Store entries in the stream database. \since 0.9.12 */
pa_operation *pa_ext_stream_restore_write(
pa_context *c,
pa_update_mode_t mode,
const pa_ext_stream_restore_info data[],
unsigned n,
int apply_immediately,
pa_context_success_cb_t cb,
void *userdata);
/** Delete entries from the stream database. \since 0.9.12 */
pa_operation *pa_ext_stream_restore_delete(
pa_context *c,
const char *const s[],
pa_context_success_cb_t cb,
void *userdata);
/** Subscribe to changes in the stream database. \since 0.9.12 */
pa_operation *pa_ext_stream_restore_subscribe(
pa_context *c,
int enable,
pa_context_success_cb_t cb,
void *userdata);
/** Callback prototype for pa_ext_stream_restore_set_subscribe_cb(). \since 0.9.12 */
typedef void (*pa_ext_stream_restore_subscribe_cb_t)(
pa_context *c,
void *userdata);
/** Set the subscription callback that is called when
* pa_ext_stream_restore_subscribe() was called. \since 0.9.12 */
void pa_ext_stream_restore_set_subscribe_cb(
pa_context *c,
pa_ext_stream_restore_subscribe_cb_t cb,
void *userdata);
PA_C_DECL_END
#endif
This diff is collapsed.
#ifndef foopulsegccmacrohfoo
#define foopulsegccmacrohfoo
/***
This file is part of PulseAudio.
Copyright 2004-2006 Lennart Poettering
PulseAudio 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.
PulseAudio 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 Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
/** \file
* GCC attribute macros */
#if defined(__GNUC__)
#ifdef __MINGW32__
/* libintl overrides printf with a #define. As this breaks this attribute,
* it has a workaround. However the workaround isn't enabled for MINGW
* builds (only cygwin) */
#define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (__printf__, a, b)))
#else
#define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
#endif
#else
/** If we're in GNU C, use some magic for detecting invalid format strings */
#define PA_GCC_PRINTF_ATTR(a,b)
#endif
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define PA_GCC_SENTINEL __attribute__ ((sentinel))
#else
/** Macro for usage of GCC's sentinel compilation warnings */
#define PA_GCC_SENTINEL
#endif
#ifdef __GNUC__
#define PA_GCC_NORETURN __attribute__((noreturn))
#else
/** Macro for no-return functions */
#define PA_GCC_NORETURN
#endif
#ifdef __GNUC__
#define PA_GCC_UNUSED __attribute__ ((unused))
#else
/** Macro for not used function, variable or parameter */
#define PA_GCC_UNUSED
#endif
#ifdef __GNUC__
#define PA_GCC_DESTRUCTOR __attribute__ ((destructor))
#else
/** Call this function when process terminates */
#define PA_GCC_DESTRUCTOR
#endif
#ifndef PA_GCC_PURE
#ifdef __GNUC__
#define PA_GCC_PURE __attribute__ ((pure))
#else
/** This function's return value depends only the arguments list and global state **/
#define PA_GCC_PURE
#endif
#endif
#ifndef PA_GCC_CONST
#ifdef __GNUC__
#define PA_GCC_CONST __attribute__ ((const))
#else
/** This function's return value depends only the arguments list (stricter version of PA_GCC_PURE) **/
#define PA_GCC_CONST
#endif
#endif
#ifndef PA_GCC_DEPRECATED
#ifdef __GNUC__
#define PA_GCC_DEPRECATED __attribute__ ((deprecated))
#else
/** This function is deprecated **/
#define PA_GCC_DEPRECATED
#endif
#endif
#ifndef PA_GCC_PACKED
#ifdef __GNUC__
#define PA_GCC_PACKED __attribute__ ((packed))
#else
/** Structure shall be packed in memory **/
#define PA_GCC_PACKED
#endif
#endif
#ifndef PA_GCC_ALLOC_SIZE
#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
#define PA_GCC_ALLOC_SIZE(x) __attribute__ ((__alloc_size__(x)))
#define PA_GCC_ALLOC_SIZE2(x,y) __attribute__ ((__alloc_size__(x,y)))
#else
/** Macro for usage of GCC's alloc_size attribute */
#define PA_GCC_ALLOC_SIZE(x)
/** Macro for usage of GCC's alloc_size attribute */
#define PA_GCC_ALLOC_SIZE2(x,y)
#endif
#endif
#ifndef PA_GCC_MALLOC
#ifdef __GNUC__
#define PA_GCC_MALLOC __attribute__ ((malloc))
#else
/** Macro for usage of GCC's malloc attribute */
#define PA_GCC_MALLOC
#endif
#endif
#ifndef PA_GCC_WEAKREF
#if defined(__GNUC__) && defined(__ELF__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ > 1)) || (__GNUC__ > 4))
/** Macro for usage of GCC's weakref attribute */
#define PA_GCC_WEAKREF(x) __attribute__((weakref(#x)))
#endif
#endif
#endif
#ifndef fooglibmainloophfoo
#define fooglibmainloophfoo
/***
This file is part of PulseAudio.
Copyright 2004-2006 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio 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.
PulseAudio 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 Lesser General Public License
along with PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/
#include <glib.h>
#include <pulse/mainloop-api.h>
#include <pulse/cdecl.h>
#include <pulse/version.h>
/** \page glib-mainloop GLIB Main Loop Bindings
*
* \section overv_sec Overview
*
* The GLIB main loop bindings are extremely easy to use. All that is
* required is to create a pa_glib_mainloop object using
* pa_glib_mainloop_new(). When the main loop abstraction is needed, it is
* provided by pa_glib_mainloop_get_api().
*
*/
/** \file
* GLIB main loop support
*
* See also \subpage glib-mainloop
*/
PA_C_DECL_BEGIN
/** An opaque GLIB main loop object */
typedef struct pa_glib_mainloop pa_glib_mainloop;
/** Create a new GLIB main loop object for the specified GLIB main
* loop context. Takes an argument c for the
* GMainContext to use. If c is NULL the default context is used. */
pa_glib_mainloop *pa_glib_mainloop_new(GMainContext *c);
/** Free the GLIB main loop object */
void pa_glib_mainloop_free(pa_glib_mainloop* g);
/** Return the abstract main loop API vtable for the GLIB main loop
object. No need to free the API as it is owned by the loop
and is destroyed when the loop is freed. */
pa_mainloop_api* pa_glib_mainloop_get_api(pa_glib_mainloop *g);
PA_C_DECL_END
#endif
This diff is collapsed.
#ifndef foomainloopapihfoo
#define foomainloopapihfoo
/***
This file is part of PulseAudio.
Copyright 2004-2006 Lennart Poettering
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
PulseAudio 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.
PulseAudio 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 PulseAudio; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
***/