| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void ToggleLogging(bool is_audio, bool enable); | 82 void ToggleLogging(bool is_audio, bool enable); |
| 83 void GetEventLogsAndReset(bool is_audio, | 83 void GetEventLogsAndReset(bool is_audio, |
| 84 const std::string& extra_data, const EventLogsCallback& callback); | 84 const std::string& extra_data, const EventLogsCallback& callback); |
| 85 void GetStatsAndReset(bool is_audio, const StatsCallback& callback); | 85 void GetStatsAndReset(bool is_audio, const StatsCallback& callback); |
| 86 | 86 |
| 87 protected: | 87 protected: |
| 88 // Callback with the result of the initialization. | 88 // Callback with the result of the initialization. |
| 89 // If this callback is called with STATUS_INITIALIZED it will report back | 89 // If this callback is called with STATUS_INITIALIZED it will report back |
| 90 // to the sinks that it's ready to accept incoming audio / video frames. | 90 // to the sinks that it's ready to accept incoming audio / video frames. |
| 91 void InitializationResultCB( | 91 void InitializationResultCB( |
| 92 const ErrorCallback& error_callback, |
| 92 media::cast::CastInitializationStatus result) const; | 93 media::cast::CastInitializationStatus result) const; |
| 93 | 94 |
| 94 private: | 95 private: |
| 95 void StatusNotificationCB( | 96 void StatusNotificationCB( |
| 96 media::cast::CastTransportStatus status); | 97 media::cast::CastTransportStatus status); |
| 97 | 98 |
| 98 // Adds logs collected from transport on browser side. | 99 // Adds logs collected from transport on browser side. |
| 99 void LogRawEvents(const std::vector<media::cast::PacketEvent>& packet_events, | 100 void LogRawEvents(const std::vector<media::cast::PacketEvent>& packet_events, |
| 100 const std::vector<media::cast::FrameEvent>& frame_events); | 101 const std::vector<media::cast::FrameEvent>& frame_events); |
| 101 | 102 |
| 102 base::ThreadChecker thread_checker_; | 103 base::ThreadChecker thread_checker_; |
| 103 scoped_refptr<media::cast::CastEnvironment> cast_environment_; | 104 scoped_refptr<media::cast::CastEnvironment> cast_environment_; |
| 104 scoped_ptr<media::cast::CastSender> cast_sender_; | 105 scoped_ptr<media::cast::CastSender> cast_sender_; |
| 105 scoped_ptr<media::cast::CastTransportSender> cast_transport_; | 106 scoped_ptr<media::cast::CastTransportSender> cast_transport_; |
| 106 | 107 |
| 107 AudioFrameInputAvailableCallback audio_frame_input_available_callback_; | 108 AudioFrameInputAvailableCallback audio_frame_input_available_callback_; |
| 108 VideoFrameInputAvailableCallback video_frame_input_available_callback_; | 109 VideoFrameInputAvailableCallback video_frame_input_available_callback_; |
| 109 | 110 |
| 110 scoped_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_; | 111 scoped_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_; |
| 111 | 112 |
| 112 // Proxy to the IO message loop. | 113 // Proxy to the IO message loop. |
| 113 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 114 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 114 base::WeakPtrFactory<CastSessionDelegate> weak_factory_; | 115 base::WeakPtrFactory<CastSessionDelegate> weak_factory_; |
| 115 | 116 |
| 116 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); | 117 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); |
| 117 }; | 118 }; |
| 118 | 119 |
| 119 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ | 120 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ |
| OLD | NEW |