Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: media/audio/audio_input_device.cc

Issue 2437863004: Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_input_device.cc
diff --git a/media/audio/audio_input_device.cc b/media/audio/audio_input_device.cc
index cee639bb68073055d8dab39ff8306086e9c2cfbb..bb80ba5acc90b837f2f226f392740f9a496574ac 100644
--- a/media/audio/audio_input_device.cc
+++ b/media/audio/audio_input_device.cc
@@ -41,7 +41,7 @@ class AudioInputDevice::AudioThreadCallback
void MapSharedMemory() override;
// Called whenever we receive notifications about pending data.
- void Process(uint32_t pending_data) override;
+ void Process(int64_t pending_data, base::TimeTicks data_timestamp) override;
private:
const double bytes_per_ms_;
@@ -307,7 +307,9 @@ void AudioInputDevice::AudioThreadCallback::MapSharedMemory() {
}
}
-void AudioInputDevice::AudioThreadCallback::Process(uint32_t pending_data) {
+void AudioInputDevice::AudioThreadCallback::Process(
+ int64_t pending_data,
+ base::TimeTicks data_timestamp) {
// The shared memory represents parameters, size of the data buffer and the
// actual data buffer containing audio data. Map the memory into this
// structure and parse out parameters and the data area.
@@ -329,9 +331,9 @@ void AudioInputDevice::AudioThreadCallback::Process(uint32_t pending_data) {
capture_callback_->OnCaptureError(message);
}
if (current_segment_id_ != static_cast<int>(pending_data)) {
- std::string message = base::StringPrintf(
- "Segment id not matching. Remote = %u. Local = %d.",
- pending_data, current_segment_id_);
+ std::string message =
+ base::StringPrintf("Segment id not matching. Remote = %ld. Local = %d.",
+ pending_data, current_segment_id_);
LOG(ERROR) << message;
capture_callback_->OnCaptureError(message);
}

Powered by Google App Engine
This is Rietveld 408576698