Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: chrome/renderer/media/cast_session_delegate.h

Issue 138753004: Cast: IPC glue between cast library transport and encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted deps Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 CastSessionDelegate(); 45 CastSessionDelegate();
46 virtual ~CastSessionDelegate(); 46 virtual ~CastSessionDelegate();
47 47
48 // After calling StartAudio() and StartVideo() with configuration encoding 48 // After calling StartAudio() and StartVideo() with configuration encoding
49 // will begin. 49 // will begin.
50 void StartAudio(const media::cast::AudioSenderConfig& config, 50 void StartAudio(const media::cast::AudioSenderConfig& config,
51 const FrameInputAvailableCallback& callback); 51 const FrameInputAvailableCallback& callback);
52 void StartVideo(const media::cast::VideoSenderConfig& config, 52 void StartVideo(const media::cast::VideoSenderConfig& config,
53 const FrameInputAvailableCallback& callback); 53 const FrameInputAvailableCallback& callback);
54 void StartUDP(const net::IPEndPoint& local_endpoint,
55 const net::IPEndPoint& remote_endpoint);
54 56
55 private: 57 private:
56 // Start encoding threads and configure CastSender. It is ready to accept 58 // Start encoding threads and configure CastSender. It is ready to accept
57 // audio/video frames after this call. 59 // audio/video frames after this call.
58 void StartSendingInternal(); 60 void StartSendingInternal();
59 61
60 // Callback with the result of the initialization. 62 // Callback with the result of the initialization.
61 void InitializationResult(media::cast::CastInitializationStatus result); 63 void InitializationResult(media::cast::CastInitializationStatus result);
62 64
63 base::ThreadChecker thread_checker_; 65 base::ThreadChecker thread_checker_;
64 scoped_refptr<media::cast::CastEnvironment> cast_environment_; 66 scoped_refptr<media::cast::CastEnvironment> cast_environment_;
65 scoped_ptr<media::cast::CastSender> cast_sender_; 67 scoped_ptr<media::cast::CastSender> cast_sender_;
66 scoped_ptr<media::cast::transport::CastTransportSender> cast_transport_; 68 scoped_ptr<media::cast::transport::CastTransportSender> cast_transport_;
67 69
68 // Utilities threads owned by this class. They are used by CastSender for 70 // Utilities threads owned by this class. They are used by CastSender for
69 // encoding. 71 // encoding.
70 // TODO(hclam): See crbug.com/317006 for more details. 72 // TODO(hclam): See crbug.com/317006 for more details.
71 // This class shouldn't create and own threads. 73 // This class shouldn't create and own threads.
72 base::Thread audio_encode_thread_; 74 base::Thread audio_encode_thread_;
73 base::Thread video_encode_thread_; 75 base::Thread video_encode_thread_;
74 76
75 // Configuration for audio and video. 77 // Configuration for audio and video.
76 media::cast::AudioSenderConfig audio_config_; 78 media::cast::AudioSenderConfig audio_config_;
77 media::cast::VideoSenderConfig video_config_; 79 media::cast::VideoSenderConfig video_config_;
78 bool audio_configured_; 80 bool audio_configured_;
79 bool video_configured_; 81 bool video_configured_;
82 net::IPEndPoint local_endpoint_;
83 net::IPEndPoint remote_endpoint_;
84 bool transport_configured_;
80 std::vector<FrameInputAvailableCallback> frame_input_available_callbacks_; 85 std::vector<FrameInputAvailableCallback> frame_input_available_callbacks_;
81 86
82 // Proxy to the IO message loop. 87 // Proxy to the IO message loop.
83 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 88 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
84 89
85 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); 90 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate);
86 }; 91 };
87 92
88 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ 93 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698