]>
Commit | Line | Data |
---|---|---|
6af121ab JP |
1 | From 7ac85fb4cc6f44a21761a591ac497ae3d6bf966d Mon Sep 17 00:00:00 2001 |
2 | From: Allan Sandfeld Jensen <allan.jensen@qt.io> | |
3 | Date: Mon, 23 Sep 2019 13:49:53 +0200 | |
4 | Subject: [PATCH] Fix building with pulseaudio 13 | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=utf8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | The function signature changed though the ABI stayed the same. | |
10 | ||
11 | Change-Id: I86ca361b5e4f0c523e1031910df438c23beee876 | |
12 | Fixes: QTBUG-77037 | |
13 | Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> | |
14 | --- | |
15 | chromium/media/audio/pulse/pulse.sigs | 16 ++++++++-------- | |
16 | chromium/media/audio/pulse/pulse_stub_header.fragment | 11 +++++++++++ | |
17 | 2 files changed, 19 insertions(+), 8 deletions(-) | |
18 | ||
19 | diff --git a/chromium/media/audio/pulse/pulse.sigs b/chromium/media/audio/pulse/pulse.sigs | |
20 | index 8b5888786a9..daaeb149c13 100644 | |
21 | --- a/chromium/media/audio/pulse/pulse.sigs | |
22 | +++ b/chromium/media/audio/pulse/pulse.sigs | |
23 | @@ -24,11 +24,11 @@ pa_operation* pa_context_get_source_info_by_index(pa_context* c, uint32_t idx, p | |
24 | pa_operation* pa_context_get_source_info_by_name(pa_context* c, const char* name, pa_source_info_cb_t cb, void *userdata); | |
25 | pa_operation* pa_context_get_source_info_list(pa_context* c, pa_source_info_cb_t cb, void* userdata); | |
26 | pa_operation* pa_context_get_sink_info_list(pa_context* c, pa_sink_info_cb_t cb, void* userdata); | |
27 | -pa_context_state_t pa_context_get_state(pa_context* c); | |
28 | +pa_context_state_t pa_context_get_state(const_pa_context_ptr c); | |
29 | pa_context* pa_context_new(pa_mainloop_api* mainloop, const char* name); | |
30 | pa_operation* pa_context_set_source_volume_by_index(pa_context* c, uint32_t idx, const pa_cvolume* volume, pa_context_success_cb_t cb, void* userdata); | |
31 | void pa_context_set_state_callback(pa_context* c, pa_context_notify_cb_t cb, void* userdata); | |
32 | -pa_operation_state_t pa_operation_get_state(pa_operation* o); | |
33 | +pa_operation_state_t pa_operation_get_state(const_pa_operation_ptr o); | |
34 | void pa_context_unref(pa_context* c); | |
35 | void pa_operation_unref(pa_operation* o); | |
36 | int pa_stream_begin_write(pa_stream* p, void** data, size_t* nbytes); | |
37 | @@ -38,23 +38,23 @@ pa_operation* pa_stream_cork(pa_stream* s, int b, pa_stream_success_cb_t cb, voi | |
38 | int pa_stream_disconnect(pa_stream* s); | |
39 | int pa_stream_drop(pa_stream *p); | |
40 | pa_operation* pa_stream_flush(pa_stream* s, pa_stream_success_cb_t cb, void* userdata); | |
41 | -uint32_t pa_stream_get_device_index(pa_stream* s); | |
42 | +uint32_t pa_stream_get_device_index(const_pa_stream_ptr s); | |
43 | int pa_stream_get_latency(pa_stream* s, pa_usec_t* r_usec, int* negative); | |
44 | -pa_stream_state_t pa_stream_get_state(pa_stream* p); | |
45 | +pa_stream_state_t pa_stream_get_state(const_pa_stream_ptr p); | |
46 | pa_stream* pa_stream_new(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map * map); | |
47 | pa_stream* pa_stream_new_with_proplist(pa_context* c, const char* name, const pa_sample_spec* ss, const pa_channel_map* map, pa_proplist* p); | |
48 | pa_proplist* pa_proplist_new(void); | |
49 | -int pa_proplist_contains(pa_proplist* p, const char* key); | |
50 | +int pa_proplist_contains(const_pa_proplist_ptr p, const char* key); | |
51 | void pa_proplist_free(pa_proplist* p); | |
52 | -const char* pa_proplist_gets(pa_proplist* p, const char* key); | |
53 | +const char* pa_proplist_gets(const_pa_proplist_ptr p, const char* key); | |
54 | int pa_proplist_sets(pa_proplist* p, const char* key, const char* value); | |
55 | -size_t pa_stream_readable_size(pa_stream *p); | |
56 | +size_t pa_stream_readable_size(const_pa_stream_ptr p); | |
57 | int pa_stream_peek(pa_stream* p, const void** data, size_t* nbytes); | |
58 | void pa_stream_set_read_callback(pa_stream* p, pa_stream_request_cb_t cb, void* userdata); | |
59 | void pa_stream_set_state_callback(pa_stream* s, pa_stream_notify_cb_t cb, void* userdata); | |
60 | int pa_stream_write(pa_stream* p, const void* data, size_t nbytes, pa_free_cb_t free_cb, int64_t offset, pa_seek_mode_t seek); | |
61 | void pa_stream_set_write_callback(pa_stream *p, pa_stream_request_cb_t cb, void *userdata); | |
62 | void pa_stream_unref(pa_stream* s); | |
63 | -int pa_context_errno(pa_context *c); | |
64 | +int pa_context_errno(const_pa_context_ptr c); | |
65 | const char* pa_strerror(int error); | |
66 | pa_cvolume* pa_cvolume_set(pa_cvolume* a, unsigned channels, pa_volume_t v); | |
67 | diff --git a/chromium/media/audio/pulse/pulse_stub_header.fragment b/chromium/media/audio/pulse/pulse_stub_header.fragment | |
68 | index 2a2d3e7552b..cdaa841b29f 100644 | |
69 | --- a/chromium/media/audio/pulse/pulse_stub_header.fragment | |
70 | +++ b/chromium/media/audio/pulse/pulse_stub_header.fragment | |
71 | @@ -5,4 +5,15 @@ extern "C" { | |
72 | ||
73 | #include <pulse/pulseaudio.h> | |
74 | ||
75 | +#if PA_MAJOR > 12 | |
76 | +typedef const pa_context* const_pa_context_ptr; | |
77 | +typedef const pa_operation* const_pa_operation_ptr; | |
78 | +typedef const pa_proplist* const_pa_proplist_ptr; | |
79 | +typedef const pa_stream* const_pa_stream_ptr; | |
80 | +#else | |
81 | +typedef pa_context* const_pa_context_ptr; | |
82 | +typedef pa_operation* const_pa_operation_ptr; | |
83 | +typedef pa_proplist* const_pa_proplist_ptr; | |
84 | +typedef pa_stream* const_pa_stream_ptr; | |
85 | +#endif | |
86 | } | |
87 | -- | |
88 | 2.16.3 | |
89 |