Chromium Code Reviews| 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_H_ | 5 #ifndef CHROME_RENDERER_MEDIA_CAST_SESSION_H_ |
| 6 #define CHROME_RENDERER_MEDIA_CAST_SESSION_H_ | 6 #define CHROME_RENDERER_MEDIA_CAST_SESSION_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 // When Cast sender is started and ready to be used | 50 // When Cast sender is started and ready to be used |
| 51 // media::cast::FrameInput will be given through the callback. The | 51 // media::cast::FrameInput will be given through the callback. The |
| 52 // callback will be made on the main thread. | 52 // callback will be made on the main thread. |
| 53 void StartAudio(const media::cast::AudioSenderConfig& config, | 53 void StartAudio(const media::cast::AudioSenderConfig& config, |
| 54 const FrameInputAvailableCallback& callback); | 54 const FrameInputAvailableCallback& callback); |
| 55 void StartVideo(const media::cast::VideoSenderConfig& config, | 55 void StartVideo(const media::cast::VideoSenderConfig& config, |
| 56 const FrameInputAvailableCallback& callback); | 56 const FrameInputAvailableCallback& callback); |
| 57 void StartUDP(const net::IPEndPoint& local_endpoint, | 57 void StartUDP(const net::IPEndPoint& local_endpoint, |
| 58 const net::IPEndPoint& remote_endpoint); | 58 const net::IPEndPoint& remote_endpoint); |
| 59 | 59 |
| 60 // Get raw event logs and provide the results in |callback| on main thread. | 60 // Creates or destroys event subscriber for a stream with |stream_id|. |
| 61 void GetEventLogsAndReset(const EventLogsCallback& callback); | 61 // The subscriber will process audio or video events depending on |is_audio|. |
| 62 // |enable|: If true, creates an event subscriber. Otherwise destroys | |
| 63 // existing subscriber and discards logs. | |
| 64 void ToggleLogging(const int stream_id, | |
|
Alpha Left Google
2014/02/24 23:25:51
You already have |is_audio|. Is |stream_id| useful
imcheng
2014/02/25 08:10:18
See other reply.
| |
| 65 const bool enable, | |
| 66 const bool is_audio); | |
| 67 | |
| 68 // Returns raw event logs in serialized format for |stream_id| since | |
| 69 // last call and returns result in |callback|. | |
| 70 void GetEventLogsAndReset(const EventLogsCallback& callback, | |
| 71 const int stream_id); | |
| 62 | 72 |
| 63 private: | 73 private: |
| 64 friend class base::RefCounted<CastSession>; | 74 friend class base::RefCounted<CastSession>; |
| 65 virtual ~CastSession(); | 75 virtual ~CastSession(); |
| 66 | 76 |
| 67 // This member should never be dereferenced on the main thread. | 77 // This member should never be dereferenced on the main thread. |
| 68 // CastSessionDelegate lives only on the IO thread. It is always | 78 // CastSessionDelegate lives only on the IO thread. It is always |
| 69 // safe to post task on the IO thread to access CastSessionDelegate | 79 // safe to post task on the IO thread to access CastSessionDelegate |
| 70 // because it is owned by this object. | 80 // because it is owned by this object. |
| 71 scoped_ptr<CastSessionDelegate> delegate_; | 81 scoped_ptr<CastSessionDelegate> delegate_; |
| 72 | 82 |
| 73 // Proxy to the IO message loop. | 83 // Proxy to the IO message loop. |
| 74 const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 84 const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 75 | 85 |
| 76 DISALLOW_COPY_AND_ASSIGN(CastSession); | 86 DISALLOW_COPY_AND_ASSIGN(CastSession); |
| 77 }; | 87 }; |
| 78 | 88 |
| 79 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_H_ | 89 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_H_ |
| OLD | NEW |