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

Side by Side Diff: media/cast/transport/transport_video_sender.h

Issue 138843011: Cast: Adding helper crypto classes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ 5 #ifndef MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_
6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ 6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/threading/non_thread_safe.h" 11 #include "base/threading/non_thread_safe.h"
12 #include "base/time/tick_clock.h" 12 #include "base/time/tick_clock.h"
13 #include "media/cast/transport/cast_transport_config.h" 13 #include "media/cast/transport/cast_transport_config.h"
14 #include "media/cast/transport/rtp_sender/rtp_sender.h" 14 #include "media/cast/transport/rtp_sender/rtp_sender.h"
15 15 #include "media/cast/transport/transport_encryption_handler.h"
16 namespace crypto {
17 class Encryptor;
18 class SymmetricKey;
19 }
20 16
21 namespace media { 17 namespace media {
22 class VideoFrame; 18 class VideoFrame;
23 19
24 namespace cast { 20 namespace cast {
25 namespace transport { 21 namespace transport {
26 22
27 class PacedSender; 23 class PacedSender;
28 24
29 // Not thread safe. Only called from the main cast transport thread. 25 // Not thread safe. Only called from the main cast transport thread.
(...skipping 21 matching lines...) Expand all
51 47
52 bool initialized() const { return initialized_; } 48 bool initialized() const { return initialized_; }
53 49
54 private: 50 private:
55 // Caller must allocate the destination |encrypted_video_frame| the data 51 // Caller must allocate the destination |encrypted_video_frame| the data
56 // member will be resized to hold the encrypted size. 52 // member will be resized to hold the encrypted size.
57 bool EncryptVideoFrame(const EncodedVideoFrame& encoded_frame, 53 bool EncryptVideoFrame(const EncodedVideoFrame& encoded_frame,
58 EncodedVideoFrame* encrypted_video_frame); 54 EncodedVideoFrame* encrypted_video_frame);
59 55
60 const base::TimeDelta rtp_max_delay_; 56 const base::TimeDelta rtp_max_delay_;
61 57 TransportEncryptionHandler encryptor_;
62 RtpSender rtp_sender_; 58 RtpSender rtp_sender_;
63 scoped_ptr<crypto::SymmetricKey> key_;
64 scoped_ptr<crypto::Encryptor> encryptor_;
65 std::string iv_mask_;
66
67 bool initialized_; 59 bool initialized_;
68 60
69 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportVideoSender); 61 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportVideoSender);
70 }; 62 };
71 63
72 } // namespace transport 64 } // namespace transport
73 } // namespace cast 65 } // namespace cast
74 } // namespace media 66 } // namespace media
75 67
76 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ 68 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698