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

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

Issue 62843002: Cast: Added support for AES-CTR crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes Created 7 years, 1 month 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/cast/audio_sender/audio_encoder.cc
diff --git a/media/cast/audio_sender/audio_encoder.cc b/media/cast/audio_sender/audio_encoder.cc
index 3cfca0dfc82150f3e4ec5bf9bfec84337a1ad152..673b74434eec55c9eba3ae78bf32def8e1316ea2 100644
--- a/media/cast/audio_sender/audio_encoder.cc
+++ b/media/cast/audio_sender/audio_encoder.cc
@@ -27,7 +27,8 @@ class WebrtEncodedDataCallback : public webrtc::AudioPacketizationCallback {
: codec_(codec),
frequency_(frequency),
cast_environment_(cast_environment),
- last_timestamp_(0) {}
+ last_timestamp_(0),
+ frame_id_(0) {}
virtual int32 SendData(
webrtc::FrameType /*frame_type*/,
@@ -38,6 +39,7 @@ class WebrtEncodedDataCallback : public webrtc::AudioPacketizationCallback {
const webrtc::RTPFragmentationHeader* /*fragmentation*/) OVERRIDE {
scoped_ptr<EncodedAudioFrame> audio_frame(new EncodedAudioFrame());
audio_frame->codec = codec_;
+ audio_frame->frame_id = frame_id_++;
audio_frame->samples = timestamp - last_timestamp_;
DCHECK(audio_frame->samples <= kMaxNumberOfSamples);
last_timestamp_ = timestamp;
@@ -63,6 +65,7 @@ class WebrtEncodedDataCallback : public webrtc::AudioPacketizationCallback {
const int frequency_;
scoped_refptr<CastEnvironment> cast_environment_;
uint32 last_timestamp_;
+ uint32 frame_id_;
base::TimeTicks recorded_time_;
const AudioEncoder::FrameEncodedCallback* frame_encoded_callback_;
};

Powered by Google App Engine
This is Rietveld 408576698