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

Unified Diff: media/cast/sender/audio_sender.cc

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 5 years 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
« no previous file with comments | « media/cast/sender/audio_encoder_unittest.cc ('k') | media/cast/sender/external_video_encoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/sender/audio_sender.cc
diff --git a/media/cast/sender/audio_sender.cc b/media/cast/sender/audio_sender.cc
index 9af7791d5af592238a8bbf4a6c9411ab3edbdc5e..53b1ef672a41ed84c182ef9751c71662e3802dd0 100644
--- a/media/cast/sender/audio_sender.cc
+++ b/media/cast/sender/audio_sender.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop/message_loop.h"
+#include "media/cast/common/rtp_time.h"
#include "media/cast/net/cast_transport_config.h"
#include "media/cast/sender/audio_encoder.h"
@@ -86,7 +87,7 @@ void AudioSender::InsertAudio(scoped_ptr<AudioBus> audio_bus,
}
const base::TimeDelta next_frame_duration =
- RtpDeltaToTimeDelta(audio_bus->frames(), rtp_timebase());
+ RtpTimeDelta::FromTicks(audio_bus->frames()).ToTimeDelta(rtp_timebase());
if (ShouldDropNextFrame(next_frame_duration))
return;
@@ -104,7 +105,7 @@ int AudioSender::GetNumberOfFramesInEncoder() const {
base::TimeDelta AudioSender::GetInFlightMediaDuration() const {
const int samples_in_flight = samples_in_encoder_ +
GetUnacknowledgedFrameCount() * audio_encoder_->GetSamplesPerFrame();
- return RtpDeltaToTimeDelta(samples_in_flight, rtp_timebase());
+ return RtpTimeDelta::FromTicks(samples_in_flight).ToTimeDelta(rtp_timebase());
}
void AudioSender::OnEncodedAudioFrame(
« no previous file with comments | « media/cast/sender/audio_encoder_unittest.cc ('k') | media/cast/sender/external_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698