From c1edaafa47484d8ae75818786dcfcea3c91e7674 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 20 May 2012 11:50:40 +0000 Subject: [PATCH] - merged pulse patches from crbug 111392, builds now Changed files: chromium-browser-pulse.patch -> 1.3 chromium-browser.spec -> 1.196 --- chromium-browser-pulse.patch | 64 +++++++++++++++++++++++++++++++----- chromium-browser.spec | 7 ++-- 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/chromium-browser-pulse.patch b/chromium-browser-pulse.patch index 19f0da3..57483c3 100644 --- a/chromium-browser-pulse.patch +++ b/chromium-browser-pulse.patch @@ -1,8 +1,14 @@ +https://chromiumcodereview.appspot.com/10332119 +https://src.chromium.org/viewvc/chrome?view=rev&revision=136602 +https://code.google.com/p/chromium/issues/detail?id=111392 +https://code.google.com/p/chromium/issues/detail?id=119903 + +Index: media/audio/pulse/pulse_output.cc diff --git a/media/audio/pulse/pulse_output.cc b/media/audio/pulse/pulse_output.cc -index c58d5bf..55ce3d2 100644 +index df4b5be979c6937b949f0c9dc8822236b92c6c6a..98f1f58391cd3faf615da999affe4d29a56876c8 100644 --- a/media/audio/pulse/pulse_output.cc +++ b/media/audio/pulse/pulse_output.cc -@@ -126,7 +126,7 @@ void PulseAudioOutputStream::WriteRequestCallback(pa_stream* playback_handle, +@@ -128,7 +128,7 @@ void PulseAudioOutputStream::WriteRequestCallback(pa_stream* playback_handle, PulseAudioOutputStream* stream = reinterpret_cast(stream_addr); @@ -11,7 +17,29 @@ index c58d5bf..55ce3d2 100644 stream->write_callback_handled_ = true; -@@ -153,7 +153,7 @@ PulseAudioOutputStream::PulseAudioOutputStream(const AudioParameters& params, +@@ -138,16 +138,16 @@ void PulseAudioOutputStream::WriteRequestCallback(pa_stream* playback_handle, + + PulseAudioOutputStream::PulseAudioOutputStream(const AudioParameters& params, + AudioManagerPulse* manager) +- : channel_layout_(params.channel_layout), ++ : channel_layout_(params.channel_layout()), + channel_count_(ChannelLayoutToChannelCount(channel_layout_)), +- sample_format_(BitsToPASampleFormat(params.bits_per_sample)), +- sample_rate_(params.sample_rate), +- bytes_per_frame_(params.channels * params.bits_per_sample / 8), ++ sample_format_(BitsToPASampleFormat(params.bits_per_sample())), ++ sample_rate_(params.sample_rate()), ++ bytes_per_frame_(params.GetBytesPerFrame()), + manager_(manager), + pa_context_(NULL), + pa_mainloop_(NULL), + playback_handle_(NULL), +- packet_size_(params.GetPacketSize()), ++ packet_size_(params.GetBytesPerBuffer()), + frames_per_packet_(packet_size_ / bytes_per_frame_), + client_buffer_(NULL), + volume_(1.0f), +@@ -155,7 +155,7 @@ PulseAudioOutputStream::PulseAudioOutputStream(const AudioParameters& params, write_callback_handled_(false), ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), source_callback_(NULL) { @@ -20,7 +48,7 @@ index c58d5bf..55ce3d2 100644 // TODO(slock): Sanity check input values. } -@@ -167,7 +167,7 @@ PulseAudioOutputStream::~PulseAudioOutputStream() { +@@ -169,7 +169,7 @@ PulseAudioOutputStream::~PulseAudioOutputStream() { } bool PulseAudioOutputStream::Open() { @@ -29,7 +57,7 @@ index c58d5bf..55ce3d2 100644 // 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::Reset() { +@@ -272,7 +272,7 @@ void PulseAudioOutputStream::Reset() { } void PulseAudioOutputStream::Close() { @@ -38,7 +66,7 @@ index c58d5bf..55ce3d2 100644 Reset(); -@@ -280,7 +280,7 @@ void PulseAudioOutputStream::Close() { +@@ -282,7 +282,7 @@ void PulseAudioOutputStream::Close() { } void PulseAudioOutputStream::WaitForWriteRequest() { @@ -47,7 +75,27 @@ index c58d5bf..55ce3d2 100644 if (stream_stopped_) return; -@@ -382,7 +382,7 @@ void PulseAudioOutputStream::WriteToStream(size_t bytes_to_write, +@@ -337,8 +337,8 @@ void PulseAudioOutputStream::FulfillWriteRequest(size_t requested_bytes) { + // Request more data from the source until we can fulfill the request or + // fail to receive anymore data. + bool buffering_successful = true; +- while (client_buffer_->forward_bytes() < requested_bytes && +- buffering_successful) { ++ size_t forward_bytes = static_cast(client_buffer_->forward_bytes()); ++ while (forward_bytes < requested_bytes && buffering_successful) { + buffering_successful = BufferPacketFromSource(); + } + +@@ -369,7 +369,7 @@ void PulseAudioOutputStream::WriteToStream(size_t bytes_to_write, + *bytes_written = 0; + while (*bytes_written < bytes_to_write) { + const uint8* chunk; +- size_t chunk_size; ++ int chunk_size; + + // Stop writing if there is no more data available. + if (!client_buffer_->GetCurrentChunk(&chunk, &chunk_size)) +@@ -384,7 +384,7 @@ void PulseAudioOutputStream::WriteToStream(size_t bytes_to_write, } void PulseAudioOutputStream::Start(AudioSourceCallback* callback) { @@ -56,7 +104,7 @@ index c58d5bf..55ce3d2 100644 CHECK(callback); DLOG_IF(ERROR, !playback_handle_) << "Open() has not been called successfully"; -@@ -402,19 +402,19 @@ void PulseAudioOutputStream::Start(AudioSourceCallback* callback) { +@@ -404,19 +404,19 @@ void PulseAudioOutputStream::Start(AudioSourceCallback* callback) { } void PulseAudioOutputStream::Stop() { diff --git a/chromium-browser.spec b/chromium-browser.spec index da39626..7300913 100644 --- a/chromium-browser.spec +++ b/chromium-browser.spec @@ -51,7 +51,7 @@ Summary: A WebKit powered web browser Name: chromium-browser Version: 19.0.1084.46 -Release: 0.1 +Release: 1 License: BSD, LGPL v2+ (ffmpeg) Group: X11/Applications/Networking Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/beta/%{name}-%{version}.tar.xz @@ -76,8 +76,6 @@ Patch10: %{name}-pulse.patch # libjpeg-turbo >= 1.1.90 supports that feature Patch11: chromium-revert-jpeg-swizzle-r2.patch # https://code.google.com/p/chromium/issues/detail?id=119903 -Patch12: http://archrepo.jeago.com/sources/chromium-dev/pulse_output_fix.diff -# Patch12-md5: e3a9539e16fc6c2336b8e709ac76b0f2 URL: http://www.chromium.org/Home %{?with_gconf:BuildRequires: GConf2-devel} BuildRequires: OpenGL-GLU-devel @@ -138,9 +136,9 @@ BuildRequires: xz Requires: browser-plugins >= 2.0 Requires: desktop-file-utils Requires: hicolor-icon-theme +%{?with_libjpegturbo:Requires: libjpeg-turbo >= 1.2.0} %{?with_system_vpx:Requires: libvpx >= 0.9.5-2} Requires: xdg-utils >= 1.0.2-4 -%{?with_libjpegturbo:Requires: libjpeg-turbo >= 1.2.0} Provides: wwwbrowser Obsoletes: chromium-browser-bookmark_manager < 5.0.388.0 Obsoletes: chromium-browser-inspector < 15.0.863.0 @@ -219,7 +217,6 @@ cd src %patch9 -p1 %patch10 -p1 %{!?with_libjpegturbo:%patch11 -p0} -%patch12 -p0 cd .. cd src -- 2.44.0