OLD | NEW |
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 // This is the base class for an object that send frames to a receiver. | 5 // This is the base class for an object that send frames to a receiver. |
6 // TODO(hclam): Refactor such that there is no separate AudioSender vs. | 6 // TODO(hclam): Refactor such that there is no separate AudioSender vs. |
7 // VideoSender, and the functionality of both is rolled into this class. | 7 // VideoSender, and the functionality of both is rolled into this class. |
8 | 8 |
9 #ifndef MEDIA_CAST_SENDER_FRAME_SENDER_H_ | 9 #ifndef MEDIA_CAST_SENDER_FRAME_SENDER_H_ |
10 #define MEDIA_CAST_SENDER_FRAME_SENDER_H_ | 10 #define MEDIA_CAST_SENDER_FRAME_SENDER_H_ |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 const scoped_refptr<CastEnvironment> cast_environment_; | 44 const scoped_refptr<CastEnvironment> cast_environment_; |
45 | 45 |
46 // Sends encoded frames over the configured transport (e.g., UDP). In | 46 // Sends encoded frames over the configured transport (e.g., UDP). In |
47 // Chromium, this could be a proxy that first sends the frames from a renderer | 47 // Chromium, this could be a proxy that first sends the frames from a renderer |
48 // process to the browser process over IPC, with the browser process being | 48 // process to the browser process over IPC, with the browser process being |
49 // responsible for "packetizing" the frames and pushing packets into the | 49 // responsible for "packetizing" the frames and pushing packets into the |
50 // network layer. | 50 // network layer. |
51 CastTransportSender* const transport_sender_; | 51 CastTransportSender* const transport_sender_; |
52 | 52 |
| 53 const uint32 ssrc_; |
| 54 |
53 // Records lip-sync (i.e., mapping of RTP <--> NTP timestamps), and | 55 // Records lip-sync (i.e., mapping of RTP <--> NTP timestamps), and |
54 // extrapolates this mapping to any other point in time. | 56 // extrapolates this mapping to any other point in time. |
55 RtpTimestampHelper rtp_timestamp_helper_; | 57 RtpTimestampHelper rtp_timestamp_helper_; |
56 | 58 |
57 // RTT information from RTCP. | 59 // RTT information from RTCP. |
58 bool rtt_available_; | 60 bool rtt_available_; |
59 base::TimeDelta rtt_; | 61 base::TimeDelta rtt_; |
60 base::TimeDelta avg_rtt_; | 62 base::TimeDelta avg_rtt_; |
61 base::TimeDelta min_rtt_; | 63 base::TimeDelta min_rtt_; |
62 base::TimeDelta max_rtt_; | 64 base::TimeDelta max_rtt_; |
63 | 65 |
64 private: | 66 private: |
65 const base::TimeDelta rtcp_interval_; | 67 const base::TimeDelta rtcp_interval_; |
66 const uint32 ssrc_; | |
67 | 68 |
68 // NOTE: Weak pointers must be invalidated before all other member variables. | 69 // NOTE: Weak pointers must be invalidated before all other member variables. |
69 base::WeakPtrFactory<FrameSender> weak_factory_; | 70 base::WeakPtrFactory<FrameSender> weak_factory_; |
70 | 71 |
71 DISALLOW_COPY_AND_ASSIGN(FrameSender); | 72 DISALLOW_COPY_AND_ASSIGN(FrameSender); |
72 }; | 73 }; |
73 | 74 |
74 } // namespace cast | 75 } // namespace cast |
75 } // namespace media | 76 } // namespace media |
76 | 77 |
77 #endif // MEDIA_CAST_SENDER_FRAME_SENDER_H_ | 78 #endif // MEDIA_CAST_SENDER_FRAME_SENDER_H_ |
OLD | NEW |