OLD | NEW |
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 #ifndef CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ | 5 #ifndef CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ |
6 #define CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ | 6 #define CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 const net::IPEndPoint& remote_endpoint, | 97 const net::IPEndPoint& remote_endpoint, |
98 std::unique_ptr<base::DictionaryValue> options, | 98 std::unique_ptr<base::DictionaryValue> options, |
99 const ErrorCallback& error_callback); | 99 const ErrorCallback& error_callback); |
100 | 100 |
101 // After calling StartAudio() or StartVideo() encoding of that media will | 101 // After calling StartAudio() or StartVideo() encoding of that media will |
102 // begin as soon as data is delivered to its sink, if the second method is | 102 // begin as soon as data is delivered to its sink, if the second method is |
103 // called the first media will be restarted. It is strongly recommended not to | 103 // called the first media will be restarted. It is strongly recommended not to |
104 // deliver any data between calling the two methods. | 104 // deliver any data between calling the two methods. |
105 // It's OK to call only one of the two methods. | 105 // It's OK to call only one of the two methods. |
106 // StartUDP must be called before these methods. | 106 // StartUDP must be called before these methods. |
107 void StartAudio(const media::cast::AudioSenderConfig& config, | 107 void StartAudio(const media::cast::FrameSenderConfig& config, |
108 const AudioFrameInputAvailableCallback& callback, | 108 const AudioFrameInputAvailableCallback& callback, |
109 const ErrorCallback& error_callback); | 109 const ErrorCallback& error_callback); |
110 | 110 |
111 void StartVideo(const media::cast::VideoSenderConfig& config, | 111 void StartVideo( |
112 const VideoFrameInputAvailableCallback& callback, | 112 const media::cast::FrameSenderConfig& config, |
113 const ErrorCallback& error_callback, | 113 const VideoFrameInputAvailableCallback& callback, |
114 const media::cast::CreateVideoEncodeAcceleratorCallback& | 114 const ErrorCallback& error_callback, |
115 create_vea_cb, | 115 const media::cast::CreateVideoEncodeAcceleratorCallback& create_vea_cb, |
116 const media::cast::CreateVideoEncodeMemoryCallback& | 116 const media::cast::CreateVideoEncodeMemoryCallback& |
117 create_video_encode_mem_cb); | 117 create_video_encode_mem_cb); |
118 | 118 |
119 void ToggleLogging(bool is_audio, bool enable); | 119 void ToggleLogging(bool is_audio, bool enable); |
120 void GetEventLogsAndReset(bool is_audio, | 120 void GetEventLogsAndReset(bool is_audio, |
121 const std::string& extra_data, const EventLogsCallback& callback); | 121 const std::string& extra_data, const EventLogsCallback& callback); |
122 void GetStatsAndReset(bool is_audio, const StatsCallback& callback); | 122 void GetStatsAndReset(bool is_audio, const StatsCallback& callback); |
123 | 123 |
124 protected: | 124 protected: |
125 // Called to report back operational status changes. The first time this is | 125 // Called to report back operational status changes. The first time this is |
126 // called with STATUS_INITIALIZED will result in running the "frame input | 126 // called with STATUS_INITIALIZED will result in running the "frame input |
127 // available" callback, to indicate the session is ready to accept incoming | 127 // available" callback, to indicate the session is ready to accept incoming |
(...skipping 15 matching lines...) Expand all Loading... |
143 VideoFrameInputAvailableCallback video_frame_input_available_callback_; | 143 VideoFrameInputAvailableCallback video_frame_input_available_callback_; |
144 | 144 |
145 std::unique_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_; | 145 std::unique_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_; |
146 | 146 |
147 base::WeakPtrFactory<CastSessionDelegate> weak_factory_; | 147 base::WeakPtrFactory<CastSessionDelegate> weak_factory_; |
148 | 148 |
149 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); | 149 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); |
150 }; | 150 }; |
151 | 151 |
152 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ | 152 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ |
OLD | NEW |