aboutsummaryrefslogtreecommitdiffstats
path: root/www/chromium
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2012-04-30 23:26:00 +0800
committerrene <rene@FreeBSD.org>2012-04-30 23:26:00 +0800
commit4dc6f06d23b9de9305a6569abe0c18837f470f91 (patch)
tree2a4ff3b94836d312f0425792b7d9dcd6905d18f0 /www/chromium
parenteec511f9e6a6b3d796ff3e1b1cbedf36699af898 (diff)
downloadfreebsd-ports-gnome-4dc6f06d23b9de9305a6569abe0c18837f470f91.tar.gz
freebsd-ports-gnome-4dc6f06d23b9de9305a6569abe0c18837f470f91.tar.zst
freebsd-ports-gnome-4dc6f06d23b9de9305a6569abe0c18837f470f91.zip
Fix build with pulseaudio.
Obtained from: http://code.google.com/p/chromium/issues/detail?id=111392 via Meowthink
Diffstat (limited to 'www/chromium')
-rw-r--r--www/chromium/files/patch-media__audio__pulse__pulse_output.cc77
1 files changed, 77 insertions, 0 deletions
diff --git a/www/chromium/files/patch-media__audio__pulse__pulse_output.cc b/www/chromium/files/patch-media__audio__pulse__pulse_output.cc
index 3681ab4efc54..6e20f6056399 100644
--- a/www/chromium/files/patch-media__audio__pulse__pulse_output.cc
+++ b/www/chromium/files/patch-media__audio__pulse__pulse_output.cc
@@ -9,3 +9,80 @@
#include "media/audio/linux/audio_manager_linux.h"
#elif defined(OS_OPENBSD)
#include "media/audio/openbsd/audio_manager_openbsd.h"
+@@ -126,7 +126,7 @@
+ PulseAudioOutputStream* stream =
+ reinterpret_cast<PulseAudioOutputStream*>(stream_addr);
+
+- DCHECK_EQ(stream->manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(stream->manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ stream->write_callback_handled_ = true;
+
+@@ -153,7 +153,7 @@
+ write_callback_handled_(false),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
+ source_callback_(NULL) {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ // TODO(slock): Sanity check input values.
+ }
+@@ -167,7 +167,7 @@
+ }
+
+ bool PulseAudioOutputStream::Open() {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ // TODO(slock): Possibly move most of this to an OpenPlaybackDevice function
+ // in a new class 'pulse_util', like alsa_util.
+@@ -270,7 +270,7 @@
+ }
+
+ void PulseAudioOutputStream::Close() {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ Reset();
+
+@@ -280,7 +280,7 @@
+ }
+
+ void PulseAudioOutputStream::WaitForWriteRequest() {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ if (stream_stopped_)
+ return;
+@@ -382,7 +382,7 @@
+ }
+
+ void PulseAudioOutputStream::Start(AudioSourceCallback* callback) {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+ CHECK(callback);
+ DLOG_IF(ERROR, !playback_handle_)
+ << "Open() has not been called successfully";
+@@ -402,19 +402,19 @@
+ }
+
+ void PulseAudioOutputStream::Stop() {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ stream_stopped_ = true;
+ }
+
+ void PulseAudioOutputStream::SetVolume(double volume) {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ volume_ = static_cast<float>(volume);
+ }
+
+ void PulseAudioOutputStream::GetVolume(double* volume) {
+- DCHECK_EQ(manager_->GetMessageLoop(), MessageLoop::current());
++ DCHECK(manager_->GetMessageLoop()->BelongsToCurrentThread());
+
+ *volume = volume_;
+ }