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

Side by Side Diff: chrome/renderer/media/cast_rtp_stream.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
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_RTP_STREAM_H_ 5 #ifndef CHROME_RENDERER_MEDIA_CAST_RTP_STREAM_H_
6 #define CHROME_RENDERER_MEDIA_CAST_RTP_STREAM_H_ 6 #define CHROME_RENDERER_MEDIA_CAST_RTP_STREAM_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 // When the stream is stopped |stop_callback| is called. 110 // When the stream is stopped |stop_callback| is called.
111 // When there is an error |error_callback| is called with a message. 111 // When there is an error |error_callback| is called with a message.
112 void Start(const CastRtpParams& params, 112 void Start(const CastRtpParams& params,
113 const base::Closure& start_callback, 113 const base::Closure& start_callback,
114 const base::Closure& stop_callback, 114 const base::Closure& stop_callback,
115 const ErrorCallback& error_callback); 115 const ErrorCallback& error_callback);
116 116
117 // Stop encoding. 117 // Stop encoding.
118 void Stop(); 118 void Stop();
119 119
120 // Enables or disables logging for this stream.
121 void ToggleLogging(bool enable);
122
123 // Get serialized raw events for this stream and invokes |callback|
124 // with the result.
125 void GetRawEvents(
126 const base::Callback<void(scoped_ptr<std::string>)>& callback);
127
120 private: 128 private:
121 // Return true if this track is an audio track. Return false if this 129 // Return true if this track is an audio track. Return false if this
122 // track is a video track. 130 // track is a video track.
123 bool IsAudio() const; 131 bool IsAudio() const;
124 132
125 void DidEncounterError(const std::string& message); 133 void DidEncounterError(const std::string& message);
126 134
127 blink::WebMediaStreamTrack track_; 135 blink::WebMediaStreamTrack track_;
128 const scoped_refptr<CastSession> cast_session_; 136 const scoped_refptr<CastSession> cast_session_;
129 scoped_ptr<CastAudioSink> audio_sink_; 137 scoped_ptr<CastAudioSink> audio_sink_;
130 scoped_ptr<CastVideoSink> video_sink_; 138 scoped_ptr<CastVideoSink> video_sink_;
131 CastRtpParams params_; 139 CastRtpParams params_;
132 base::WeakPtrFactory<CastRtpStream> weak_factory_; 140 base::WeakPtrFactory<CastRtpStream> weak_factory_;
133 base::Closure stop_callback_; 141 base::Closure stop_callback_;
134 ErrorCallback error_callback_; 142 ErrorCallback error_callback_;
135 143
136 DISALLOW_COPY_AND_ASSIGN(CastRtpStream); 144 DISALLOW_COPY_AND_ASSIGN(CastRtpStream);
137 }; 145 };
138 146
139 #endif // CHROME_RENDERER_MEDIA_CAST_RTP_STREAM_H_ 147 #endif // CHROME_RENDERER_MEDIA_CAST_RTP_STREAM_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | chrome/renderer/media/cast_rtp_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698