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 <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 CastSession(); | 53 CastSession(); |
54 | 54 |
55 // Start encoding of audio and video using the provided configuration. | 55 // Start encoding of audio and video using the provided configuration. |
56 // | 56 // |
57 // When Cast sender is started and ready to be used | 57 // When Cast sender is started and ready to be used |
58 // media::cast::FrameInput will be given through |callback|. | 58 // media::cast::FrameInput will be given through |callback|. |
59 // If it encounters an error, |error_callback| will be invoked with the | 59 // If it encounters an error, |error_callback| will be invoked with the |
60 // error message. Both |callback| and |error_callback| will be made on | 60 // error message. Both |callback| and |error_callback| will be made on |
61 // the main thread. | 61 // the main thread. |
62 // |StartUDP()| must be called before these methods. | 62 // |StartUDP()| must be called before these methods. |
63 void StartAudio(const media::cast::AudioSenderConfig& config, | 63 void StartAudio(const media::cast::FrameSenderConfig& config, |
64 const AudioFrameInputAvailableCallback& callback, | 64 const AudioFrameInputAvailableCallback& callback, |
65 const ErrorCallback& error_callback); | 65 const ErrorCallback& error_callback); |
66 void StartVideo(const media::cast::VideoSenderConfig& config, | 66 void StartVideo(const media::cast::FrameSenderConfig& config, |
67 const VideoFrameInputAvailableCallback& callback, | 67 const VideoFrameInputAvailableCallback& callback, |
68 const ErrorCallback& error_callback); | 68 const ErrorCallback& error_callback); |
69 | 69 |
70 // This will create the Cast transport and connect to |remote_endpoint|. | 70 // This will create the Cast transport and connect to |remote_endpoint|. |
71 // |options| is a dictionary which contain optional configuration for the | 71 // |options| is a dictionary which contain optional configuration for the |
72 // udp transport. | 72 // udp transport. |
73 // Must be called before initialization of audio or video. | 73 // Must be called before initialization of audio or video. |
74 void StartUDP(const net::IPEndPoint& remote_endpoint, | 74 void StartUDP(const net::IPEndPoint& remote_endpoint, |
75 std::unique_ptr<base::DictionaryValue> options, | 75 std::unique_ptr<base::DictionaryValue> options, |
76 const ErrorCallback& error_callback); | 76 const ErrorCallback& error_callback); |
(...skipping 24 matching lines...) Expand all Loading... |
101 // because it is owned by this object. | 101 // because it is owned by this object. |
102 std::unique_ptr<CastSessionDelegate> delegate_; | 102 std::unique_ptr<CastSessionDelegate> delegate_; |
103 | 103 |
104 // Proxy to the IO task runner. | 104 // Proxy to the IO task runner. |
105 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 105 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(CastSession); | 107 DISALLOW_COPY_AND_ASSIGN(CastSession); |
108 }; | 108 }; |
109 | 109 |
110 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_H_ | 110 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_H_ |
OLD | NEW |