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

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

Issue 551883004: Cast: Let the extension control if DSCP is on or off. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 3 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 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 main interface for the cast transport sender. It accepts encoded 5 // This is the main interface for the cast transport sender. It accepts encoded
6 // frames (both audio and video), encrypts their encoded data, packetizes them 6 // frames (both audio and video), encrypts their encoded data, packetizes them
7 // and feeds them into a transport (e.g., UDP). 7 // and feeds them into a transport (e.g., UDP).
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:
(...skipping 12 matching lines...) Expand all
23 #include "base/single_thread_task_runner.h" 23 #include "base/single_thread_task_runner.h"
24 #include "base/threading/non_thread_safe.h" 24 #include "base/threading/non_thread_safe.h"
25 #include "base/time/tick_clock.h" 25 #include "base/time/tick_clock.h"
26 #include "media/cast/logging/logging_defines.h" 26 #include "media/cast/logging/logging_defines.h"
27 #include "media/cast/net/cast_transport_config.h" 27 #include "media/cast/net/cast_transport_config.h"
28 #include "media/cast/net/cast_transport_defines.h" 28 #include "media/cast/net/cast_transport_defines.h"
29 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h" 29 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h"
30 #include "media/cast/net/rtcp/rtcp_defines.h" 30 #include "media/cast/net/rtcp/rtcp_defines.h"
31 #include "net/base/ip_endpoint.h" 31 #include "net/base/ip_endpoint.h"
32 32
33 namespace base {
34 class DictionaryValue;
35 } // namespace base
36
33 namespace net { 37 namespace net {
34 class NetLog; 38 class NetLog;
35 } // namespace net 39 } // namespace net
36 40
37 namespace media { 41 namespace media {
38 namespace cast { 42 namespace cast {
39 43
40 // Following the initialization of either audio or video an initialization 44 // Following the initialization of either audio or video an initialization
41 // status will be sent via this callback. 45 // status will be sent via this callback.
42 typedef base::Callback<void(CastTransportStatus status)> 46 typedef base::Callback<void(CastTransportStatus status)>
43 CastTransportStatusCallback; 47 CastTransportStatusCallback;
44 48
45 typedef base::Callback<void(const std::vector<PacketEvent>&, 49 typedef base::Callback<void(const std::vector<PacketEvent>&,
46 const std::vector<FrameEvent>&)> 50 const std::vector<FrameEvent>&)>
47 BulkRawEventsCallback; 51 BulkRawEventsCallback;
48 52
49 // The application should only trigger this class from the transport thread. 53 // The application should only trigger this class from the transport thread.
50 class CastTransportSender : public base::NonThreadSafe { 54 class CastTransportSender : public base::NonThreadSafe {
51 public: 55 public:
52 static scoped_ptr<CastTransportSender> Create( 56 static scoped_ptr<CastTransportSender> Create(
53 net::NetLog* net_log, 57 net::NetLog* net_log,
54 base::TickClock* clock, 58 base::TickClock* clock,
55 const net::IPEndPoint& remote_end_point, 59 const net::IPEndPoint& remote_end_point,
60 scoped_ptr<base::DictionaryValue> options,
56 const CastTransportStatusCallback& status_callback, 61 const CastTransportStatusCallback& status_callback,
57 const BulkRawEventsCallback& raw_events_callback, 62 const BulkRawEventsCallback& raw_events_callback,
58 base::TimeDelta raw_events_callback_interval, 63 base::TimeDelta raw_events_callback_interval,
59 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner); 64 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner);
60 65
61 virtual ~CastTransportSender() {} 66 virtual ~CastTransportSender() {}
62 67
63 // Audio/Video initialization. 68 // Audio/Video initialization.
64 // Encoded frames cannot be transmitted until the relevant initialize method 69 // Encoded frames cannot be transmitted until the relevant initialize method
65 // is called. 70 // is called.
(...skipping 28 matching lines...) Expand all
94 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) = 0; 99 virtual void ResendFrameForKickstart(uint32 ssrc, uint32 frame_id) = 0;
95 100
96 // Returns a callback for receiving packets for testing purposes. 101 // Returns a callback for receiving packets for testing purposes.
97 virtual PacketReceiverCallback PacketReceiverForTesting(); 102 virtual PacketReceiverCallback PacketReceiverForTesting();
98 }; 103 };
99 104
100 } // namespace cast 105 } // namespace cast
101 } // namespace media 106 } // namespace media
102 107
103 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_ 108 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_SENDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_udp_transport.cc ('k') | media/cast/net/cast_transport_sender_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698