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

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

Issue 288103002: [Cast] EncodedAudioFrame+EncodedVideoFrame+reference_time --> EncodedFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed hclam@'s first round comments. Fixed chrome unit_tests compiles. 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 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"
(...skipping 19 matching lines...) Expand all
30 TransportVideoSender( 30 TransportVideoSender(
31 const CastTransportVideoConfig& config, 31 const CastTransportVideoConfig& config,
32 base::TickClock* clock, 32 base::TickClock* clock,
33 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, 33 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner,
34 PacedSender* const paced_packet_sender); 34 PacedSender* const paced_packet_sender);
35 35
36 virtual ~TransportVideoSender(); 36 virtual ~TransportVideoSender();
37 37
38 // Handles the encoded video frames to be processed. 38 // Handles the encoded video frames to be processed.
39 // Frames will be encrypted, packetized and transmitted to the network. 39 // Frames will be encrypted, packetized and transmitted to the network.
40 void InsertCodedVideoFrame(const EncodedVideoFrame* coded_frame, 40 void SendFrame(const EncodedFrame& video_frame);
41 const base::TimeTicks& capture_time);
42 41
43 // Retransmision request. 42 // Retransmision request.
44 void ResendPackets( 43 void ResendPackets(
45 const MissingFramesAndPacketsMap& missing_frames_and_packets); 44 const MissingFramesAndPacketsMap& missing_frames_and_packets);
46 45
47 bool initialized() const { return initialized_; } 46 bool initialized() const { return initialized_; }
48 47
49 // Subscribe callback to get RTP Audio stats. 48 // Subscribe callback to get RTP Audio stats.
50 void SubscribeVideoRtpStatsCallback( 49 void SubscribeVideoRtpStatsCallback(
51 const CastTransportRtpStatistics& callback); 50 const CastTransportRtpStatistics& callback);
52 51
53 private: 52 private:
54 // Caller must allocate the destination |encrypted_video_frame| the data 53 // Caller must allocate the destination |encrypted_video_frame| the data
55 // member will be resized to hold the encrypted size. 54 // member will be resized to hold the encrypted size.
56 bool EncryptVideoFrame(const EncodedVideoFrame& encoded_frame, 55 bool EncryptVideoFrame(const EncodedFrame& encoded_frame,
57 EncodedVideoFrame* encrypted_video_frame); 56 EncodedFrame* encrypted_video_frame);
58 57
59 const base::TimeDelta rtp_max_delay_; 58 const base::TimeDelta rtp_max_delay_;
60 TransportEncryptionHandler encryptor_; 59 TransportEncryptionHandler encryptor_;
61 RtpSender rtp_sender_; 60 RtpSender rtp_sender_;
62 bool initialized_; 61 bool initialized_;
63 62
64 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportVideoSender); 63 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportVideoSender);
65 }; 64 };
66 65
67 } // namespace transport 66 } // namespace transport
68 } // namespace cast 67 } // namespace cast
69 } // namespace media 68 } // namespace media
70 69
71 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_ 70 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_VIDEO_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698