Don't depend on X11 when rtc_use_x11=false.

This CL makes X11 optional for audio_device_pulse_linux.
Apply the same guards than for audio_device_alsa_linux.
Cf commit 75f18fca8eef7c27073923c46ff73be5ba0e0491.

Bug: webrtc:9569
Change-Id: Iaddbfb62112c504531376bad0db8f04caa4350c7
Reviewed-on: https://webrtc-review.googlesource.com/93030
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24274}
This commit is contained in:
Yves Gerey
2018-08-08 16:39:44 +02:00
committed by Commit Bot
parent d8661a05ff
commit ee562d874c
2 changed files with 13 additions and 0 deletions

View File

@ -19,7 +19,10 @@
#include "rtc_base/platform_thread.h"
#include "rtc_base/thread_checker.h"
#if defined(WEBRTC_USE_X11)
#include <X11/Xlib.h>
#endif
#include <pulse/pulseaudio.h>
// We define this flag if it's missing from our headers, because we want to be
@ -328,7 +331,9 @@ class AudioDeviceLinuxPulse : public AudioDeviceGeneric {
pa_buffer_attr _recBufferAttr;
char _oldKeyState[32];
#if defined(WEBRTC_USE_X11)
Display* _XDisplay;
#endif
};
} // namespace webrtc