| 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> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 16 #include "base/threading/thread_checker.h" | 16 #include "base/threading/thread_checker.h" |
| 17 #include "base/time/default_tick_clock.h" | 17 #include "base/time/default_tick_clock.h" |
| 18 #include "media/cast/cast_config.h" | 18 #include "media/cast/cast_config.h" |
| 19 #include "media/cast/cast_sender.h" | 19 #include "media/cast/cast_sender.h" |
| 20 #include "media/cast/logging/logging_defines.h" | 20 #include "media/cast/logging/logging_defines.h" |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 class DictionaryValue; | 23 class DictionaryValue; |
| 24 class SingleThreadTaskRunner; | 24 class SingleThreadTaskRunner; |
| 25 class Value; | 25 class Value; |
| 26 using BinaryValue = Value; | |
| 27 } // namespace base | 26 } // namespace base |
| 28 | 27 |
| 29 namespace media { | 28 namespace media { |
| 30 | 29 |
| 31 namespace cast { | 30 namespace cast { |
| 32 class CastEnvironment; | 31 class CastEnvironment; |
| 33 class RawEventSubscriberBundle; | 32 class RawEventSubscriberBundle; |
| 34 | 33 |
| 35 namespace transport { | 34 namespace transport { |
| 36 class CastTransport; | 35 class CastTransport; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // This class hosts CastSender and connects it to audio/video frame input | 75 // This class hosts CastSender and connects it to audio/video frame input |
| 77 // and network socket. | 76 // and network socket. |
| 78 // This class is created on the render thread and destroyed on the IO | 77 // This class is created on the render thread and destroyed on the IO |
| 79 // thread. All methods are accessible only on the IO thread. | 78 // thread. All methods are accessible only on the IO thread. |
| 80 class CastSessionDelegate : public CastSessionDelegateBase { | 79 class CastSessionDelegate : public CastSessionDelegateBase { |
| 81 public: | 80 public: |
| 82 typedef base::Callback<void(const scoped_refptr< | 81 typedef base::Callback<void(const scoped_refptr< |
| 83 media::cast::AudioFrameInput>&)> AudioFrameInputAvailableCallback; | 82 media::cast::AudioFrameInput>&)> AudioFrameInputAvailableCallback; |
| 84 typedef base::Callback<void(const scoped_refptr< | 83 typedef base::Callback<void(const scoped_refptr< |
| 85 media::cast::VideoFrameInput>&)> VideoFrameInputAvailableCallback; | 84 media::cast::VideoFrameInput>&)> VideoFrameInputAvailableCallback; |
| 86 typedef base::Callback<void(std::unique_ptr<base::BinaryValue>)> | 85 typedef base::Callback<void(std::unique_ptr<base::Value>)> EventLogsCallback; |
| 87 EventLogsCallback; | |
| 88 typedef base::Callback<void(std::unique_ptr<base::DictionaryValue>)> | 86 typedef base::Callback<void(std::unique_ptr<base::DictionaryValue>)> |
| 89 StatsCallback; | 87 StatsCallback; |
| 90 | 88 |
| 91 CastSessionDelegate(); | 89 CastSessionDelegate(); |
| 92 ~CastSessionDelegate() override; | 90 ~CastSessionDelegate() override; |
| 93 | 91 |
| 94 void StartUDP(const net::IPEndPoint& local_endpoint, | 92 void StartUDP(const net::IPEndPoint& local_endpoint, |
| 95 const net::IPEndPoint& remote_endpoint, | 93 const net::IPEndPoint& remote_endpoint, |
| 96 std::unique_ptr<base::DictionaryValue> options, | 94 std::unique_ptr<base::DictionaryValue> options, |
| 97 const ErrorCallback& error_callback); | 95 const ErrorCallback& error_callback); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 VideoFrameInputAvailableCallback video_frame_input_available_callback_; | 146 VideoFrameInputAvailableCallback video_frame_input_available_callback_; |
| 149 | 147 |
| 150 std::unique_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_; | 148 std::unique_ptr<media::cast::RawEventSubscriberBundle> event_subscribers_; |
| 151 | 149 |
| 152 base::WeakPtrFactory<CastSessionDelegate> weak_factory_; | 150 base::WeakPtrFactory<CastSessionDelegate> weak_factory_; |
| 153 | 151 |
| 154 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); | 152 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); |
| 155 }; | 153 }; |
| 156 | 154 |
| 157 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ | 155 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ |
| OLD | NEW |