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

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

Issue 252923007: Cast: Fix two video freezing problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac fix 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
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 is the main interface for the cast transport sender. The cast sender 5 // This is the main interface for the cast transport sender. The cast sender
6 // handles the cast pipeline from encoded frames (both audio and video), to 6 // handles the cast pipeline from encoded frames (both audio and video), to
7 // encryption, packetization and transport. 7 // encryption, packetization and transport.
8 8
9 // Construction of the Cast Sender and the Cast Transport Sender should be done 9 // Construction of the Cast Sender and the Cast Transport Sender should be done
10 // in the following order: 10 // in the following order:
11 // 1. Create CastTransportSender. 11 // 1. Create CastTransportSender.
12 // 2. Create CastSender (accepts CastTransportSender as an input). 12 // 2. Create CastSender (accepts CastTransportSender as an input).
13 // 3. Call CastTransportSender::SetPacketReceiver to ensure that the packets 13 // 3. Call CastTransportSender::SetPacketReceiver to ensure that the packets
14 // received by the CastTransportSender will be sent to the CastSender. 14 // received by the CastTransportSender will be sent to the CastSender.
15 // 4. Initialize audio and/or video. 15 // Steps 3 can be done interchangeably.
16 // Steps 3 & 4 can be done interchangeably.
17 16
18 // Destruction: The CastTransportSender is assumed to be valid as long as the 17 // Destruction: The CastTransportSender is assumed to be valid as long as the
19 // CastSender is alive. Therefore the CastSender should be destructed before the 18 // CastSender is alive. Therefore the CastSender should be destructed before the
20 // CastTransportSender. 19 // CastTransportSender.
21 // This also works when the CastSender acts as a receiver for the RTCP packets 20 // This also works when the CastSender acts as a receiver for the RTCP packets
22 // due to the weak pointers in the ReceivedPacket method in cast_sender_impl.cc. 21 // due to the weak pointers in the ReceivedPacket method in cast_sender_impl.cc.
23 22
24 #ifndef MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_ 23 #ifndef MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_
25 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_ 24 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_
26 25
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 const net::IPEndPoint& remote_end_point, 61 const net::IPEndPoint& remote_end_point,
63 const CastTransportStatusCallback& status_callback, 62 const CastTransportStatusCallback& status_callback,
64 const BulkRawEventsCallback& raw_events_callback, 63 const BulkRawEventsCallback& raw_events_callback,
65 base::TimeDelta raw_events_callback_interval, 64 base::TimeDelta raw_events_callback_interval,
66 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner); 65 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner);
67 66
68 virtual ~CastTransportSender() {} 67 virtual ~CastTransportSender() {}
69 68
70 // Audio/Video initialization. 69 // Audio/Video initialization.
71 // Encoded frames cannot be transmitted until the relevant initialize method 70 // Encoded frames cannot be transmitted until the relevant initialize method
72 // is called. 71 // is called. Usually called by CastSender.
73 virtual void InitializeAudio(const CastTransportAudioConfig& config) = 0; 72 virtual void InitializeAudio(const CastTransportAudioConfig& config) = 0;
74 73
75 virtual void InitializeVideo(const CastTransportVideoConfig& config) = 0; 74 virtual void InitializeVideo(const CastTransportVideoConfig& config) = 0;
76 75
77 // Sets the Cast packet receiver. Should be called after creation on the 76 // Sets the Cast packet receiver. Should be called after creation on the
78 // Cast sender. Packets won't be received until this function is called. 77 // Cast sender. Packets won't be received until this function is called.
79 virtual void SetPacketReceiver( 78 virtual void SetPacketReceiver(
80 const PacketReceiverCallback& packet_receiver) = 0; 79 const PacketReceiverCallback& packet_receiver) = 0;
81 80
82 // The following two functions handle the encoded media frames (audio and 81 // The following two functions handle the encoded media frames (audio and
(...skipping 26 matching lines...) Expand all
109 108
110 virtual void SubscribeVideoRtpStatsCallback( 109 virtual void SubscribeVideoRtpStatsCallback(
111 const CastTransportRtpStatistics& callback) = 0; 110 const CastTransportRtpStatistics& callback) = 0;
112 }; 111 };
113 112
114 } // namespace transport 113 } // namespace transport
115 } // namespace cast 114 } // namespace cast
116 } // namespace media 115 } // namespace media
117 116
118 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_ 117 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_SENDER_H_
OLDNEW
« no previous file with comments | « media/cast/transport/cast_transport_config.cc ('k') | media/cast/transport/cast_transport_sender_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698