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

Unified Diff: media/cast/audio_sender/audio_sender.h

Issue 62843002: Cast: Added support for AES-CTR crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments 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_sender.h
diff --git a/media/cast/audio_sender/audio_sender.h b/media/cast/audio_sender/audio_sender.h
index ca1fffb37f2416664f5dae8a3a6cbad7997b1287..a327a9154154b1a391acefbda9f644e86e4cc48f 100644
--- a/media/cast/audio_sender/audio_sender.h
+++ b/media/cast/audio_sender/audio_sender.h
@@ -12,6 +12,7 @@
#include "base/threading/non_thread_safe.h"
#include "base/time/tick_clock.h"
#include "base/time/time.h"
+#include "crypto/encryptor.h"
#include "media/cast/cast_config.h"
#include "media/cast/cast_environment.h"
#include "media/cast/rtcp/rtcp.h"
@@ -66,6 +67,11 @@ class AudioSender : public base::NonThreadSafe,
void ResendPackets(
const MissingFramesAndPacketsMap& missing_frames_and_packets);
+ // Caller must allocate the destination |encrypted_frame| the data member
wtc 2013/11/13 20:57:17 Nit: the first sentence should end after "the dest
pwestin 2013/11/15 19:38:17 Done.
+ // will be resized to hold the encrypted size.
+ bool EncryptAudioFrame(const EncodedAudioFrame* audio_frame,
wtc 2013/11/13 20:57:17 Nit: would it be better to make |audio_frame| a co
pwestin 2013/11/15 19:38:17 Done.
+ EncodedAudioFrame* encrypted_frame);
+
void ScheduleNextRtcpReport();
void SendRtcpReport();
@@ -78,6 +84,8 @@ class AudioSender : public base::NonThreadSafe,
scoped_ptr<LocalRtpSenderStatistics> rtp_audio_sender_statistics_;
scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_;
Rtcp rtcp_;
+ scoped_ptr<crypto::Encryptor> encryptor_;
+ std::string iv_mask_;
DISALLOW_COPY_AND_ASSIGN(AudioSender);
};

Powered by Google App Engine
This is Rietveld 408576698