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

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

Issue 281453003: Cast: Simplify code path for RTCP sender report (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 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 // This file contains the interface to the cast RTP sender. 5 // This file contains the interface to the cast RTP sender.
6 6
7 #ifndef MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ 7 #ifndef MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_
8 #define MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ 8 #define MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // The video_frame objects ownership is handled by the main cast thread. 51 // The video_frame objects ownership is handled by the main cast thread.
52 void IncomingEncodedVideoFrame(const EncodedVideoFrame* video_frame, 52 void IncomingEncodedVideoFrame(const EncodedVideoFrame* video_frame,
53 const base::TimeTicks& capture_time); 53 const base::TimeTicks& capture_time);
54 54
55 // The audio_frame objects ownership is handled by the main cast thread. 55 // The audio_frame objects ownership is handled by the main cast thread.
56 void IncomingEncodedAudioFrame(const EncodedAudioFrame* audio_frame, 56 void IncomingEncodedAudioFrame(const EncodedAudioFrame* audio_frame,
57 const base::TimeTicks& recorded_time); 57 const base::TimeTicks& recorded_time);
58 58
59 void ResendPackets(const MissingFramesAndPacketsMap& missing_packets); 59 void ResendPackets(const MissingFramesAndPacketsMap& missing_packets);
60 60
61 // Set the callback on which RTP statistics data will be returned. Calling 61 size_t send_packet_count() const { return packetizer_->send_packet_count(); }
62 // this function would start a timer that would schedule the callback in 62 size_t send_octet_count() const { return packetizer_->send_octet_count(); }
63 // a constant interval. 63 uint32 ssrc() const { return config_.ssrc; }
64 void SubscribeRtpStatsCallback(const CastTransportRtpStatistics& callback);
65 64
66 private: 65 private:
67 void ScheduleNextStatsReport();
68 void RtpStatistics();
69 void UpdateSequenceNumber(Packet* packet); 66 void UpdateSequenceNumber(Packet* packet);
70 67
71 base::TickClock* clock_; // Not owned by this class. 68 base::TickClock* clock_; // Not owned by this class.
72 RtpPacketizerConfig config_; 69 RtpPacketizerConfig config_;
73 scoped_ptr<RtpPacketizer> packetizer_; 70 scoped_ptr<RtpPacketizer> packetizer_;
74 scoped_ptr<PacketStorage> storage_; 71 scoped_ptr<PacketStorage> storage_;
75 PacedSender* const transport_; 72 PacedSender* const transport_;
76 CastTransportRtpStatistics stats_callback_;
77 scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_; 73 scoped_refptr<base::SingleThreadTaskRunner> transport_task_runner_;
78 74
79 // NOTE: Weak pointers must be invalidated before all other member variables. 75 // NOTE: Weak pointers must be invalidated before all other member variables.
80 base::WeakPtrFactory<RtpSender> weak_factory_; 76 base::WeakPtrFactory<RtpSender> weak_factory_;
81 77
82 DISALLOW_COPY_AND_ASSIGN(RtpSender); 78 DISALLOW_COPY_AND_ASSIGN(RtpSender);
83 }; 79 };
84 80
85 } // namespace transport 81 } // namespace transport
86 } // namespace cast 82 } // namespace cast
87 } // namespace media 83 } // namespace media
88 84
89 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_ 85 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698