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

Side by Side Diff: content/renderer/media/peer_connection_tracker.h

Issue 617093003: Add MediaStreamSource frame rate calculation to the tracker. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adding type name. Fixing IPC type problem. Created 6 years, 2 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_
6 #define CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ 6 #define CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 // Sends an update when a DTMFSender is created. 149 // Sends an update when a DTMFSender is created.
150 virtual void TrackCreateDTMFSender( 150 virtual void TrackCreateDTMFSender(
151 RTCPeerConnectionHandler* pc_handler, 151 RTCPeerConnectionHandler* pc_handler,
152 const blink::WebMediaStreamTrack& track); 152 const blink::WebMediaStreamTrack& track);
153 153
154 // Sends an update when getUserMedia is called. 154 // Sends an update when getUserMedia is called.
155 virtual void TrackGetUserMedia( 155 virtual void TrackGetUserMedia(
156 const blink::WebUserMediaRequest& user_media_request); 156 const blink::WebUserMediaRequest& user_media_request);
157 157
158 virtual void TrackAddVideoStats(const std::string& video_id,
159 float input_frate_rate,
160 int number_of_dropped_frames);
161
158 private: 162 private:
159 // Assign a local ID to a peer connection so that the browser process can 163 // Assign a local ID to a peer connection so that the browser process can
160 // uniquely identify a peer connection in the renderer process. 164 // uniquely identify a peer connection in the renderer process.
161 int GetNextLocalID(); 165 int GetNextLocalID();
162 166
163 // IPC Message handler for getting all stats. 167 // IPC Message handler for getting all stats.
164 void OnGetAllStats(); 168 void OnGetAllStats();
165 169
166 // Called when the browser process reports a suspend event from the OS. 170 // Called when the browser process reports a suspend event from the OS.
167 void OnSuspend(); 171 void OnSuspend();
168 172
169 void SendPeerConnectionUpdate(RTCPeerConnectionHandler* pc_handler, 173 void SendPeerConnectionUpdate(RTCPeerConnectionHandler* pc_handler,
170 const std::string& callback_type, 174 const std::string& callback_type,
171 const std::string& value); 175 const std::string& value);
172 176
173 // This map stores the local ID assigned to each RTCPeerConnectionHandler. 177 // This map stores the local ID assigned to each RTCPeerConnectionHandler.
174 typedef std::map<RTCPeerConnectionHandler*, int> PeerConnectionIdMap; 178 typedef std::map<RTCPeerConnectionHandler*, int> PeerConnectionIdMap;
175 PeerConnectionIdMap peer_connection_id_map_; 179 PeerConnectionIdMap peer_connection_id_map_;
176 180
177 // This keeps track of the next available local ID. 181 // This keeps track of the next available local ID.
178 int next_lid_; 182 int next_lid_;
179 183
180 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker); 184 DISALLOW_COPY_AND_ASSIGN(PeerConnectionTracker);
181 }; 185 };
182 186
183 } // namespace content 187 } // namespace content
184 188
185 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_ 189 #endif // CONTENT_RENDERER_MEDIA_PEERCONNECTION_TRACKER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_video_source.h ('k') | content/renderer/media/peer_connection_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698