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

Side by Side Diff: media/cast/video_receiver/video_receiver.h

Issue 62843002: Cast: Added support for AES-CTR crypto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync TOT 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ 5 #ifndef MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_
6 #define MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ 6 #define MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
14 #include "base/time/tick_clock.h" 14 #include "base/time/tick_clock.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/cast/cast_config.h" 16 #include "media/cast/cast_config.h"
17 #include "media/cast/cast_environment.h" 17 #include "media/cast/cast_environment.h"
18 #include "media/cast/cast_receiver.h" 18 #include "media/cast/cast_receiver.h"
19 #include "media/cast/rtcp/rtcp.h" 19 #include "media/cast/rtcp/rtcp.h"
20 #include "media/cast/rtp_common/rtp_defines.h" 20 #include "media/cast/rtp_common/rtp_defines.h"
21 #include "media/cast/rtp_receiver/rtp_receiver.h" 21 #include "media/cast/rtp_receiver/rtp_receiver.h"
22 22
23 namespace crypto {
24 class Encryptor;
25 }
26
23 namespace media { 27 namespace media {
24 namespace cast { 28 namespace cast {
25 29
26 class Framer; 30 class Framer;
27 class LocalRtpVideoData; 31 class LocalRtpVideoData;
28 class LocalRtpVideoFeedback; 32 class LocalRtpVideoFeedback;
29 class PacedPacketSender; 33 class PacedPacketSender;
30 class PeerVideoReceiver; 34 class PeerVideoReceiver;
31 class Rtcp; 35 class Rtcp;
32 class RtpReceiverStatistics; 36 class RtpReceiverStatistics;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 private: 69 private:
66 friend class LocalRtpVideoData; 70 friend class LocalRtpVideoData;
67 friend class LocalRtpVideoFeedback; 71 friend class LocalRtpVideoFeedback;
68 72
69 void CastFeedback(const RtcpCastMessage& cast_message); 73 void CastFeedback(const RtcpCastMessage& cast_message);
70 74
71 void DecodeVideoFrame(const VideoFrameDecodedCallback& callback, 75 void DecodeVideoFrame(const VideoFrameDecodedCallback& callback,
72 scoped_ptr<EncodedVideoFrame> encoded_frame, 76 scoped_ptr<EncodedVideoFrame> encoded_frame,
73 const base::TimeTicks& render_time); 77 const base::TimeTicks& render_time);
74 78
79 bool DecryptVideoFrame(scoped_ptr<EncodedVideoFrame>* video_frame);
80
75 bool PullEncodedVideoFrame(uint32 rtp_timestamp, 81 bool PullEncodedVideoFrame(uint32 rtp_timestamp,
76 bool next_frame, 82 bool next_frame,
77 scoped_ptr<EncodedVideoFrame>* encoded_frame, 83 scoped_ptr<EncodedVideoFrame>* encoded_frame,
78 base::TimeTicks* render_time); 84 base::TimeTicks* render_time);
79 85
80 void PlayoutTimeout(); 86 void PlayoutTimeout();
81 87
82 // Returns Render time based on current time and the rtp timestamp. 88 // Returns Render time based on current time and the rtp timestamp.
83 base::TimeTicks GetRenderTime(base::TimeTicks now, uint32 rtp_timestamp); 89 base::TimeTicks GetRenderTime(base::TimeTicks now, uint32 rtp_timestamp);
84 90
(...skipping 17 matching lines...) Expand all
102 const VideoCodec codec_; 108 const VideoCodec codec_;
103 base::TimeDelta target_delay_delta_; 109 base::TimeDelta target_delay_delta_;
104 base::TimeDelta frame_delay_; 110 base::TimeDelta frame_delay_;
105 scoped_ptr<LocalRtpVideoData> incoming_payload_callback_; 111 scoped_ptr<LocalRtpVideoData> incoming_payload_callback_;
106 scoped_ptr<LocalRtpVideoFeedback> incoming_payload_feedback_; 112 scoped_ptr<LocalRtpVideoFeedback> incoming_payload_feedback_;
107 RtpReceiver rtp_receiver_; 113 RtpReceiver rtp_receiver_;
108 scoped_ptr<Rtcp> rtcp_; 114 scoped_ptr<Rtcp> rtcp_;
109 scoped_ptr<RtpReceiverStatistics> rtp_video_receiver_statistics_; 115 scoped_ptr<RtpReceiverStatistics> rtp_video_receiver_statistics_;
110 base::TimeTicks time_last_sent_cast_message_; 116 base::TimeTicks time_last_sent_cast_message_;
111 base::TimeDelta time_offset_; // Sender-receiver offset estimation. 117 base::TimeDelta time_offset_; // Sender-receiver offset estimation.
112 118 scoped_ptr<crypto::Encryptor> decryptor_;
119 std::string iv_mask_;
113 std::list<VideoFrameEncodedCallback> queued_encoded_callbacks_; 120 std::list<VideoFrameEncodedCallback> queued_encoded_callbacks_;
114
115 bool time_incoming_packet_updated_; 121 bool time_incoming_packet_updated_;
116 base::TimeTicks time_incoming_packet_; 122 base::TimeTicks time_incoming_packet_;
117 uint32 incoming_rtp_timestamp_; 123 uint32 incoming_rtp_timestamp_;
118 124
119 base::WeakPtrFactory<VideoReceiver> weak_factory_; 125 base::WeakPtrFactory<VideoReceiver> weak_factory_;
120 126
121 DISALLOW_COPY_AND_ASSIGN(VideoReceiver); 127 DISALLOW_COPY_AND_ASSIGN(VideoReceiver);
122 }; 128 };
123 129
124 } // namespace cast 130 } // namespace cast
125 } // namespace media 131 } // namespace media
126 132
127 #endif // MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_ 133 #endif // MEDIA_CAST_VIDEO_RECEIVER_VIDEO_RECEIVER_H_
OLDNEW
« no previous file with comments | « media/cast/video_receiver/codecs/vp8/vp8_decoder.cc ('k') | media/cast/video_receiver/video_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698