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

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

Issue 314593002: [Cast] Cleanup: Remove TransportXXXXXSender, an unnecessary layer of indirection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restored/Improved CastSenderImpl VLOGging. Created 6 years, 7 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
« no previous file with comments | « no previous file | media/cast/audio_sender/audio_sender.cc » ('j') | media/cast/video_sender/video_sender.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c633b076c8a7edff836f85de206784c45b3e1e98..0ac619df6855c902cfdd7497be7ed6d8efd0c136 100644
--- a/media/cast/audio_sender/audio_sender.h
+++ b/media/cast/audio_sender/audio_sender.h
@@ -16,7 +16,7 @@
#include "media/cast/cast_config.h"
#include "media/cast/rtcp/rtcp.h"
#include "media/cast/rtp_timestamp_helper.h"
-#include "media/cast/transport/rtp_sender/rtp_sender.h"
+#include "media/cast/transport/utility/transport_encryption_handler.h"
namespace media {
namespace cast {
@@ -36,18 +36,17 @@ class AudioSender : public RtcpSenderFeedback,
virtual ~AudioSender();
CastInitializationStatus InitializationResult() const {
- return cast_initialization_cb_;
+ return cast_initialization_status_;
}
+ // Note: It is invalid to call this method if InitializationResult() returns
+ // anything but STATUS_AUDIO_INITIALIZED.
void InsertAudio(scoped_ptr<AudioBus> audio_bus,
const base::TimeTicks& recorded_time);
// Only called from the main cast thread.
void IncomingRtcpPacket(scoped_ptr<Packet> packet);
- protected:
- void SendEncodedAudioFrame(scoped_ptr<transport::EncodedFrame> audio_frame);
-
private:
void ResendPackets(
const MissingFramesAndPacketsMap& missing_frames_and_packets);
@@ -55,6 +54,11 @@ class AudioSender : public RtcpSenderFeedback,
void ScheduleNextRtcpReport();
void SendRtcpReport(bool schedule_future_reports);
+ // Called by the |audio_encoder_| with the next EncodedFrame to send. If
+ // encryption is enabled, |encoded_frame->data| is encrypted before sending
+ // using |transport_sender_|.
+ void SendEncodedAudioFrame(scoped_ptr<transport::EncodedFrame> audio_frame);
+
virtual void OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback)
OVERRIDE;
@@ -64,7 +68,12 @@ class AudioSender : public RtcpSenderFeedback,
RtpTimestampHelper rtp_timestamp_helper_;
Rtcp rtcp_;
int num_aggressive_rtcp_reports_sent_;
- CastInitializationStatus cast_initialization_cb_;
+
+ // Encrypts data in EncodedFrames before they are sent.
+ transport::TransportEncryptionHandler encryptor_;
Alpha Left Google 2014/06/03 20:01:52 It is by design to have encryption done in the tra
miu 2014/06/03 21:55:15 Done.
+
+ // If this sender is ready for use, this is STATUS_AUDIO_INITIALIZED.
+ CastInitializationStatus cast_initialization_status_;
// Used to map the lower 8 bits of the frame id to a RTP timestamp. This is
// good enough as we only use it for logging.
« no previous file with comments | « no previous file | media/cast/audio_sender/audio_sender.cc » ('j') | media/cast/video_sender/video_sender.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698