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

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

Issue 170063006: Cast: Add JS API to get raw events logs from cast extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pass presubmit 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
« no previous file with comments | « chrome/renderer/media/cast_session.cc ('k') | chrome/renderer/media/cast_session_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/linked_ptr.h"
11 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
12 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
13 #include "base/threading/thread_checker.h" 15 #include "base/threading/thread_checker.h"
14 #include "base/time/default_tick_clock.h" 16 #include "base/time/default_tick_clock.h"
15 #include "media/cast/cast_config.h" 17 #include "media/cast/cast_config.h"
16 #include "media/cast/cast_sender.h" 18 #include "media/cast/cast_sender.h"
17 19
18 namespace base { 20 namespace base {
19 class MessageLoopProxy; 21 class MessageLoopProxy;
20 } // namespace base 22 } // namespace base
(...skipping 30 matching lines...) Expand all
51 // called the first media will be restarted. It is strongly recommended not to 53 // called the first media will be restarted. It is strongly recommended not to
52 // deliver any data between calling the two methods. 54 // deliver any data between calling the two methods.
53 // It's OK to call only one of the two methods. 55 // It's OK to call only one of the two methods.
54 void StartAudio(const media::cast::AudioSenderConfig& config, 56 void StartAudio(const media::cast::AudioSenderConfig& config,
55 const FrameInputAvailableCallback& callback); 57 const FrameInputAvailableCallback& callback);
56 void StartVideo(const media::cast::VideoSenderConfig& config, 58 void StartVideo(const media::cast::VideoSenderConfig& config,
57 const FrameInputAvailableCallback& callback); 59 const FrameInputAvailableCallback& callback);
58 void StartUDP(const net::IPEndPoint& local_endpoint, 60 void StartUDP(const net::IPEndPoint& local_endpoint,
59 const net::IPEndPoint& remote_endpoint); 61 const net::IPEndPoint& remote_endpoint);
60 62
61 // Returns raw event logs in serialized format since last call. 63 void ToggleLogging(bool is_audio, bool enable);
62 void GetEventLogsAndReset(const EventLogsCallback& callback); 64 void GetEventLogsAndReset(bool is_audio, const EventLogsCallback& callback);
63 65
64 protected: 66 protected:
65 // Callback with the result of the initialization. 67 // Callback with the result of the initialization.
66 // If this callback is called with STATUS_INITIALIZED it will report back 68 // If this callback is called with STATUS_INITIALIZED it will report back
67 // to the sinks that it's ready to accept incoming audio / video frames. 69 // to the sinks that it's ready to accept incoming audio / video frames.
68 void InitializationResult(media::cast::CastInitializationStatus result) const; 70 void InitializationResult(media::cast::CastInitializationStatus result) const;
69 71
70 private: 72 private:
71 // Start encoding threads and initialize the CastEnvironment. 73 // Start encoding threads and initialize the CastEnvironment.
72 void Initialize(); 74 void Initialize();
(...skipping 10 matching lines...) Expand all
83 scoped_ptr<media::cast::CastSender> cast_sender_; 85 scoped_ptr<media::cast::CastSender> cast_sender_;
84 scoped_ptr<media::cast::transport::CastTransportSender> cast_transport_; 86 scoped_ptr<media::cast::transport::CastTransportSender> cast_transport_;
85 87
86 // Configuration for audio and video. 88 // Configuration for audio and video.
87 scoped_ptr<media::cast::AudioSenderConfig> audio_config_; 89 scoped_ptr<media::cast::AudioSenderConfig> audio_config_;
88 scoped_ptr<media::cast::VideoSenderConfig> video_config_; 90 scoped_ptr<media::cast::VideoSenderConfig> video_config_;
89 91
90 FrameInputAvailableCallback audio_frame_input_available_callback_; 92 FrameInputAvailableCallback audio_frame_input_available_callback_;
91 FrameInputAvailableCallback video_frame_input_available_callback_; 93 FrameInputAvailableCallback video_frame_input_available_callback_;
92 94
93 scoped_ptr<media::cast::EncodingEventSubscriber> audio_event_subscriber_;
94 scoped_ptr<media::cast::EncodingEventSubscriber> video_event_subscriber_;
95
96 net::IPEndPoint local_endpoint_; 95 net::IPEndPoint local_endpoint_;
97 net::IPEndPoint remote_endpoint_; 96 net::IPEndPoint remote_endpoint_;
98 bool transport_configured_; 97 bool transport_configured_;
99 98
99 scoped_ptr<media::cast::EncodingEventSubscriber> audio_event_subscriber_;
100 scoped_ptr<media::cast::EncodingEventSubscriber> video_event_subscriber_;
101
100 // Proxy to the IO message loop. 102 // Proxy to the IO message loop.
101 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_; 103 scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
102 104
103 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate); 105 DISALLOW_COPY_AND_ASSIGN(CastSessionDelegate);
104 }; 106 };
105 107
106 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_ 108 #endif // CHROME_RENDERER_MEDIA_CAST_SESSION_DELEGATE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_session.cc ('k') | chrome/renderer/media/cast_session_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698