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

Unified Diff: content/browser/renderer_host/media/audio_input_sync_writer.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: content/browser/renderer_host/media/audio_input_sync_writer.cc
diff --git a/content/browser/renderer_host/media/audio_input_sync_writer.cc b/content/browser/renderer_host/media/audio_input_sync_writer.cc
index e706934dfbcd52e3a517def4bfb8e41bfacb0520..961de95242aa72d28df1a98447100f2605d2ec02 100644
--- a/content/browser/renderer_host/media/audio_input_sync_writer.cc
+++ b/content/browser/renderer_host/media/audio_input_sync_writer.cc
@@ -12,10 +12,12 @@
#include "build/build_config.h"
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/public/browser/browser_thread.h"
+#include "media/audio/audio_device_thread.h"
using media::AudioBus;
using media::AudioInputBuffer;
using media::AudioInputBufferParameters;
+using Packet = media::AudioDeviceThread::Packet;
namespace content {
@@ -325,8 +327,9 @@ void AudioInputSyncWriter::WriteParametersToCurrentSegment(
}
bool AudioInputSyncWriter::SignalDataWrittenAndUpdateCounters() {
- if (socket_->Send(&current_segment_id_, sizeof(current_segment_id_)) !=
- sizeof(current_segment_id_)) {
+ Packet packet = {current_segment_id_,
+ base::TimeTicks::Now().ToInternalValue()};
miu 2016/10/23 01:19:15 Please don't use ToInternalValue() (per http://crb
Mikhail 2016/10/24 19:50:23 Done. Even though IMO in this particular case usin
miu 2016/10/24 22:45:52 Your use was appropriate here. :) As the base/tim
+ if (socket_->Send(&packet, sizeof(Packet)) != sizeof(Packet)) {
const std::string error_message = "AISW: No room in socket buffer.";
LOG(WARNING) << error_message;
AddToNativeLog(error_message);

Powered by Google App Engine
This is Rietveld 408576698