mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
add version routines to polyplib
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@139 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
ac595189fd
commit
befd734aac
5 changed files with 73 additions and 31 deletions
|
|
@ -27,6 +27,8 @@ EXTRA_DIST = polypaudio.pa depmod.py
|
||||||
bin_PROGRAMS = polypaudio pacat pactl
|
bin_PROGRAMS = polypaudio pacat pactl
|
||||||
noinst_PROGRAMS = mainloop-test mainloop-test-glib pacat-simple parec-simple
|
noinst_PROGRAMS = mainloop-test mainloop-test-glib pacat-simple parec-simple
|
||||||
|
|
||||||
|
BUILT_SOURCES=polyplib-version.h
|
||||||
|
|
||||||
polypinclude_HEADERS=polyplib.h \
|
polypinclude_HEADERS=polyplib.h \
|
||||||
polyplib-def.h \
|
polyplib-def.h \
|
||||||
polyplib-simple.h \
|
polyplib-simple.h \
|
||||||
|
|
|
||||||
|
|
@ -36,31 +36,28 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "modargs.h"
|
#include "modargs.h"
|
||||||
|
|
||||||
#ifdef USE_PROTOCOL_SIMPLE
|
#if defined(USE_PROTOCOL_SIMPLE)
|
||||||
#include "protocol-simple.h"
|
#include "protocol-simple.h"
|
||||||
#define protocol_new pa_protocol_simple_new
|
#define protocol_new pa_protocol_simple_new
|
||||||
#define protocol_free pa_protocol_simple_free
|
#define protocol_free pa_protocol_simple_free
|
||||||
#define IPV4_PORT 4711
|
#define IPV4_PORT 4711
|
||||||
#define UNIX_SOCKET "/tmp/polypaudio/simple"
|
#define UNIX_SOCKET "/tmp/polypaudio/simple"
|
||||||
#define MODULE_ARGUMENTS "rate", "format", "channels", "sink", "source", "playback", "record",
|
#define MODULE_ARGUMENTS "rate", "format", "channels", "sink", "source", "playback", "record",
|
||||||
#else
|
#elif defined(USE_PROTOCOL_CLI)
|
||||||
#ifdef USE_PROTOCOL_CLI
|
|
||||||
#include "protocol-cli.h"
|
#include "protocol-cli.h"
|
||||||
#define protocol_new pa_protocol_cli_new
|
#define protocol_new pa_protocol_cli_new
|
||||||
#define protocol_free pa_protocol_cli_free
|
#define protocol_free pa_protocol_cli_free
|
||||||
#define IPV4_PORT 4712
|
#define IPV4_PORT 4712
|
||||||
#define UNIX_SOCKET "/tmp/polypaudio/cli"
|
#define UNIX_SOCKET "/tmp/polypaudio/cli"
|
||||||
#define MODULE_ARGUMENTS
|
#define MODULE_ARGUMENTS
|
||||||
#else
|
#elif defined(USE_PROTOCOL_NATIVE)
|
||||||
#ifdef USE_PROTOCOL_NATIVE
|
|
||||||
#include "protocol-native.h"
|
#include "protocol-native.h"
|
||||||
#define protocol_new pa_protocol_native_new
|
#define protocol_new pa_protocol_native_new
|
||||||
#define protocol_free pa_protocol_native_free
|
#define protocol_free pa_protocol_native_free
|
||||||
#define IPV4_PORT 4713
|
#define IPV4_PORT 4713
|
||||||
#define UNIX_SOCKET "/tmp/polypaudio/native"
|
#define UNIX_SOCKET "/tmp/polypaudio/native"
|
||||||
#define MODULE_ARGUMENTS "public", "cookie",
|
#define MODULE_ARGUMENTS "public", "cookie",
|
||||||
#else
|
#elif defined(USE_PROTOCOL_ESOUND)
|
||||||
#ifdef USE_PROTOCOL_ESOUND
|
|
||||||
#include "protocol-esound.h"
|
#include "protocol-esound.h"
|
||||||
#include "esound.h"
|
#include "esound.h"
|
||||||
#define protocol_new pa_protocol_esound_new
|
#define protocol_new pa_protocol_esound_new
|
||||||
|
|
@ -68,11 +65,8 @@
|
||||||
#define IPV4_PORT ESD_DEFAULT_PORT
|
#define IPV4_PORT ESD_DEFAULT_PORT
|
||||||
#define UNIX_SOCKET ESD_UNIX_SOCKET_NAME
|
#define UNIX_SOCKET ESD_UNIX_SOCKET_NAME
|
||||||
#define MODULE_ARGUMENTS "sink", "source", "public", "cookie",
|
#define MODULE_ARGUMENTS "sink", "source", "public", "cookie",
|
||||||
#else
|
#else
|
||||||
#error "Broken build system"
|
#error "Broken build system"
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char* const valid_modargs[] = {
|
static const char* const valid_modargs[] = {
|
||||||
|
|
|
||||||
|
|
@ -532,3 +532,7 @@ struct pa_operation* pa_context_send_simple_command(struct pa_context *c, uint32
|
||||||
|
|
||||||
return pa_operation_ref(o);
|
return pa_operation_ref(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* pa_get_library_version(void) {
|
||||||
|
return PACKAGE_VERSION;
|
||||||
|
}
|
||||||
|
|
|
||||||
33
polyp/polyplib-version.h.in
Normal file
33
polyp/polyplib-version.h.in
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
#ifndef foopolyplibversionhfoo /*-*-C-*-*/
|
||||||
|
#define foopolyplibversionhfoo
|
||||||
|
|
||||||
|
/* $Id$ */
|
||||||
|
|
||||||
|
/***
|
||||||
|
This file is part of polypaudio.
|
||||||
|
|
||||||
|
polypaudio 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.
|
||||||
|
|
||||||
|
polypaudio 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 polypaudio; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||||
|
USA.
|
||||||
|
***/
|
||||||
|
|
||||||
|
/** \file
|
||||||
|
* Define header version */
|
||||||
|
|
||||||
|
/** Return the version of the header files. Keep in mind that this is
|
||||||
|
a macro and not a function, so it is impossible to get the pointer of
|
||||||
|
it. */
|
||||||
|
#define pa_get_headers_version() ("@PACKAGE_VERSION@")
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
USA.
|
USA.
|
||||||
***/
|
***/
|
||||||
|
|
||||||
|
#include "cdecl.h"
|
||||||
#include "mainloop-api.h"
|
#include "mainloop-api.h"
|
||||||
#include "sample.h"
|
#include "sample.h"
|
||||||
#include "polyplib-def.h"
|
#include "polyplib-def.h"
|
||||||
|
|
@ -30,11 +31,12 @@
|
||||||
#include "polyplib-introspect.h"
|
#include "polyplib-introspect.h"
|
||||||
#include "polyplib-subscribe.h"
|
#include "polyplib-subscribe.h"
|
||||||
#include "polyplib-scache.h"
|
#include "polyplib-scache.h"
|
||||||
|
#include "polyplib-version.h"
|
||||||
|
|
||||||
/** \file
|
/** \file
|
||||||
* Include all polyplib header file at once. The following files are included: \ref mainloop-api.h, \ref sample.h,
|
* Include all polyplib header file at once. The following files are included: \ref mainloop-api.h, \ref sample.h,
|
||||||
* \ref polyplib-def.h, \ref polyplib-context.h, \ref polyplib-stream.h,
|
* \ref polyplib-def.h, \ref polyplib-context.h, \ref polyplib-stream.h,
|
||||||
* \ref polyplib-introspect.h, \ref polyplib-subscribe.h and \ref polyplib-scache.h
|
* \ref polyplib-introspect.h, \ref polyplib-subscribe.h and \ref polyplib-scache.h \ref polyplib-version.h
|
||||||
* at once */
|
* at once */
|
||||||
|
|
||||||
/** \mainpage
|
/** \mainpage
|
||||||
|
|
@ -81,4 +83,11 @@
|
||||||
* synchronous API is available as "polyplib-simple".
|
* synchronous API is available as "polyplib-simple".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
PA_C_DECL_BEGIN
|
||||||
|
|
||||||
|
/** Return the version of the library the current application is linked to */
|
||||||
|
const char* pa_get_library_version(void);
|
||||||
|
|
||||||
|
PA_C_DECL_END
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue