mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-23 06:59:53 -05:00
A lot of updates, all necessary to get the native protocol ported:
* add an int64_t argument to pa_asyncmsgq because it is very difficult to pass 64 values otherwise * simplify subclassing in pa_object * s/drop/unlink/ at some places * port the native protocol to the lock-free core (not tested, compiles fine) * move synchronisation of playback streams into pa_sink_input * add "start_corked" field to pa_sink_input_new_data * allow casting of NULL values in pa_object git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1562 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
a82505e72f
commit
0defdfb560
27 changed files with 1229 additions and 770 deletions
|
|
@ -28,17 +28,23 @@
|
|||
|
||||
#include "object.h"
|
||||
|
||||
pa_object *pa_object_new_internal(size_t size, const char *type_name, int (*check_type)(pa_object *o, const char *type_name)) {
|
||||
pa_object *pa_object_new_internal(size_t size, const char *type_name, int (*check_type)(const char *type_name)) {
|
||||
pa_object *o;
|
||||
|
||||
pa_assert(size > sizeof(pa_object));
|
||||
pa_assert(type_name);
|
||||
|
||||
if (!check_type)
|
||||
check_type = pa_object_check_type;
|
||||
|
||||
pa_assert(check_type(type_name));
|
||||
pa_assert(check_type("pa_object"));
|
||||
|
||||
o = pa_xmalloc(size);
|
||||
PA_REFCNT_INIT(o);
|
||||
o->type_name = type_name;
|
||||
o->free = pa_object_free;
|
||||
o->check_type = check_type ? check_type : pa_object_check_type;
|
||||
o->check_type = check_type;
|
||||
|
||||
return o;
|
||||
}
|
||||
|
|
@ -59,8 +65,7 @@ void pa_object_unref(pa_object *o) {
|
|||
}
|
||||
}
|
||||
|
||||
int pa_object_check_type(pa_object *o, const char *type_name) {
|
||||
pa_assert(o);
|
||||
int pa_object_check_type(const char *type_name) {
|
||||
pa_assert(type_name);
|
||||
|
||||
return type_name == "pa_object" || strcmp(type_name, "pa_object") == 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue