| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // the main thread. | 60 // the main thread. |
| 61 // |StartUDP()| must be called before these methods. | 61 // |StartUDP()| must be called before these methods. |
| 62 void StartAudio(const media::cast::AudioSenderConfig& config, | 62 void StartAudio(const media::cast::AudioSenderConfig& config, |
| 63 const AudioFrameInputAvailableCallback& callback, | 63 const AudioFrameInputAvailableCallback& callback, |
| 64 const ErrorCallback& error_callback); | 64 const ErrorCallback& error_callback); |
| 65 void StartVideo(const media::cast::VideoSenderConfig& config, | 65 void StartVideo(const media::cast::VideoSenderConfig& config, |
| 66 const VideoFrameInputAvailableCallback& callback, | 66 const VideoFrameInputAvailableCallback& callback, |
| 67 const ErrorCallback& error_callback); | 67 const ErrorCallback& error_callback); |
| 68 | 68 |
| 69 // This will create the Cast transport and connect to |remote_endpoint|. | 69 // This will create the Cast transport and connect to |remote_endpoint|. |
| 70 // |options| is a dictionary which contain optional configuration for the |
| 71 // udp transport. |
| 70 // Must be called before initialization of audio or video. | 72 // Must be called before initialization of audio or video. |
| 71 void StartUDP(const net::IPEndPoint& remote_endpoint); | 73 void StartUDP(const net::IPEndPoint& remote_endpoint, |
| 74 scoped_ptr<base::DictionaryValue> options); |
| 72 | 75 |
| 73 // Creates or destroys event subscriber for the audio or video stream. | 76 // Creates or destroys event subscriber for the audio or video stream. |
| 74 // |is_audio|: true if the event subscriber is for audio. Video otherwise. | 77 // |is_audio|: true if the event subscriber is for audio. Video otherwise. |
| 75 // |enable|: If true, creates an event subscriber. Otherwise destroys | 78 // |enable|: If true, creates an event subscriber. Otherwise destroys |
| 76 // existing subscriber and discards logs. | 79 // existing subscriber and discards logs. |
| 77 void ToggleLogging(bool is_audio, bool enable); | 80 void ToggleLogging(bool is_audio, bool enable); |
| 78 | 81 |
| 79 // Returns raw event logs in serialized format for either the audio or video | 82 // Returns raw event logs in serialized format for either the audio or video |
| 80 // stream since last call and returns result in |callback|. Also attaches | 83 // stream since last call and returns result in |callback|. Also attaches |
| 81 // |extra_data| to the log. | 84 // |extra_data| to the log. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 96 // because it is owned by this object. | 99 // because it is owned by this object. |
| 97 scoped_ptr<CastSessionDelegate> delegate_; | 100 scoped_ptr<CastSessionDelegate> delegate_; |
| 98 | 101 |
| 99 // Proxy to the IO message loop. | 102 // Proxy to the IO message loop. |
| 100 const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; | 103 const scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; |
| 101 | 104 |
| 102 DISALLOW_COPY_AND_ASSIGN(CastSession); | 105 DISALLOW_COPY_AND_ASSIGN(CastSession); |
| 103 }; | 106 }; |
| 104 | 107 |
| 105 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_H_ | 108 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_H_ |
| OLD | NEW |