Changeset 130768 in webkit
- Timestamp:
- Oct 9, 2012 8:56:07 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r130767 r130768 1 2012-10-09 Harald Alvestrand <hta@google.com> 2 3 Change PeerConnection getStats function to single value local / remote 4 elements in RTCStatsReport. 5 https://bugs.webkit.org/show_bug.cgi?id=98753 6 7 Reviewed by Adam Barth. 8 9 * fast/mediastream/RTCPeerConnection-stats-expected.txt: 10 * fast/mediastream/RTCPeerConnection-stats.html: 11 1 12 2012-10-09 Adam Barth <abarth@webkit.org> 2 13 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-stats-expected.txt
r130383 r130768 14 14 PASS statsHandler2 was called 15 15 PASS result.length is >= 2 16 PASS local.length is 117 16 PASS timestamp is >= startTime 18 PASS local [0].stat("type") is "audio"17 PASS local.stat("type") is "audio" 19 18 PASS successfullyParsed is true 20 19 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-stats.html
r130383 r130768 49 49 result = status.result(); 50 50 shouldBeGreaterThanOrEqual('result.length', '2'); 51 local = result[0].local(); 52 shouldBe('local.length', '1'); 53 timestamp = local[0].timestamp; 51 local = result[0].local; 52 timestamp = local.timestamp; 54 53 shouldBeGreaterThanOrEqual('timestamp', 'startTime'); 55 shouldBe('local [0].stat("type")', '"audio"');54 shouldBe('local.stat("type")', '"audio"'); 56 55 finishJSTest(); 57 56 } -
trunk/Source/Platform/ChangeLog
r130383 r130768 1 2012-10-09 Harald Alvestrand <hta@google.com> 2 3 Change PeerConnection getStats function to single value local / remote 4 elements in RTCStatsReport. 5 https://bugs.webkit.org/show_bug.cgi?id=98753 6 7 Reviewed by Adam Barth. 8 9 * chromium/public/WebRTCStatsResponse.h: 10 (WebRTCStatsResponse): 11 1 12 2012-10-04 Harald Alvestrand <hta@google.com> 2 13 -
trunk/Source/Platform/chromium/public/WebRTCStatsResponse.h
r130383 r130768 53 53 54 54 WEBKIT_EXPORT size_t addReport(); 55 WEBKIT_EXPORT size_taddElement(size_t report, bool isLocal, double timestamp);56 WEBKIT_EXPORT void addStatistic(size_t report, bool isLocal, size_t element,WebString name, WebString value);55 WEBKIT_EXPORT void addElement(size_t report, bool isLocal, double timestamp); 56 WEBKIT_EXPORT void addStatistic(size_t report, bool isLocal, WebString name, WebString value); 57 57 58 58 #if WEBKIT_IMPLEMENTATION -
trunk/Source/WebCore/ChangeLog
r130763 r130768 1 2012-10-09 Harald Alvestrand <hta@google.com> 2 3 Change PeerConnection getStats function to single value local / remote 4 elements in RTCStatsReport. 5 6 https://bugs.webkit.org/show_bug.cgi?id=98753 7 8 Reviewed by Adam Barth. 9 10 IDL of RTCStatsReport has been changed to make local/remote 11 single valued RTCStatsElement attributes. 12 The RTCStatsReport argument to index the list of RTCStatsElement 13 in the local and remote functions has been removed. 14 15 Tested by modifications to RTCPeerConnection-stats.html 16 17 * Modules/mediastream/RTCStatsReport.cpp: 18 (WebCore::RTCStatsReport::addElement): 19 (WebCore::RTCStatsReport::addStatistic): 20 * Modules/mediastream/RTCStatsReport.h: 21 (WebCore::RTCStatsReport::local): 22 (WebCore::RTCStatsReport::remote): 23 (RTCStatsReport): 24 * Modules/mediastream/RTCStatsReport.idl: 25 * Modules/mediastream/RTCStatsResponse.cpp: 26 (WebCore::RTCStatsResponse::addElement): 27 (WebCore::RTCStatsResponse::addStatistic): 28 * Modules/mediastream/RTCStatsResponse.h: 29 (RTCStatsResponse): 30 * platform/chromium/support/WebRTCStatsResponse.cpp: 31 (WebKit::WebRTCStatsResponse::addElement): 32 (WebKit::WebRTCStatsResponse::addStatistic): 33 * platform/mediastream/RTCStatsResponseBase.h: 34 (RTCStatsResponseBase): 35 1 36 2012-10-09 Antonio Gomes <agomes@rim.com> 2 37 -
trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.cpp
r130383 r130768 40 40 } 41 41 42 size_tRTCStatsReport::addElement(bool isLocal, double timestamp)42 void RTCStatsReport::addElement(bool isLocal, double timestamp) 43 43 { 44 44 if (isLocal) { 45 m_local.append(RTCStatsElement::create(timestamp));46 return m_local.size() - 1;45 ASSERT(!m_local); 46 m_local = RTCStatsElement::create(timestamp); 47 47 } 48 m_remote.append(RTCStatsElement::create(timestamp));49 return m_remote.size() - 1;48 ASSERT(!m_remote); 49 m_remote = RTCStatsElement::create(timestamp); 50 50 } 51 51 52 void RTCStatsReport::addStatistic(bool isLocal, size_t element,String name, String value)52 void RTCStatsReport::addStatistic(bool isLocal, String name, String value) 53 53 { 54 54 if (isLocal) { 55 ASSERT( element >= 0 && element < m_local.size());56 m_local [element]->addStatistic(name, value);55 ASSERT(m_local); 56 m_local->addStatistic(name, value); 57 57 } else { 58 ASSERT( element >= 0 && element < m_remote.size());59 m_remote [element]->addStatistic(name, value);58 ASSERT(m_remote); 59 m_remote->addStatistic(name, value); 60 60 } 61 61 } -
trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.h
r130383 r130768 38 38 static PassRefPtr<RTCStatsReport> create(); 39 39 40 const Vector<RefPtr<RTCStatsElement> >& local() const { return m_local; }41 const Vector<RefPtr<RTCStatsElement> >& remote() const { return m_remote; }40 const PassRefPtr<RTCStatsElement> local() const { return m_local.get(); } 41 const PassRefPtr<RTCStatsElement> remote() const { return m_remote.get(); } 42 42 43 size_taddElement(bool isLocal, double timestamp);44 void addStatistic(bool isLocal, size_t element,String name, String value);43 void addElement(bool isLocal, double timestamp); 44 void addStatistic(bool isLocal, String name, String value); 45 45 46 46 private: 47 47 RTCStatsReport(); 48 48 49 Vector<RefPtr<RTCStatsElement>> m_local;50 Vector<RefPtr<RTCStatsElement>> m_remote;49 RefPtr<RTCStatsElement> m_local; 50 RefPtr<RTCStatsElement> m_remote; 51 51 }; 52 52 -
trunk/Source/WebCore/Modules/mediastream/RTCStatsReport.idl
r129908 r130768 28 28 Conditional=MEDIA_STREAM 29 29 ] RTCStatsReport { 30 sequence<RTCStatsElement> local();31 sequence<RTCStatsElement> remote();30 readonly attribute RTCStatsElement local; 31 readonly attribute RTCStatsElement remote; 32 32 }; 33 33 } -
trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.cpp
r130383 r130768 46 46 } 47 47 48 size_tRTCStatsResponse::addElement(size_t report, bool isLocal, double timestamp)48 void RTCStatsResponse::addElement(size_t report, bool isLocal, double timestamp) 49 49 { 50 50 ASSERT(report >= 0 && report < m_result.size()); 51 returnm_result[report]->addElement(isLocal, timestamp);51 m_result[report]->addElement(isLocal, timestamp); 52 52 } 53 53 54 void RTCStatsResponse::addStatistic(size_t report, bool isLocal, size_t element,String name, String value)54 void RTCStatsResponse::addStatistic(size_t report, bool isLocal, String name, String value) 55 55 { 56 56 ASSERT(report >= 0 && report < m_result.size()); 57 return m_result[report]->addStatistic(isLocal, element, name, value);57 m_result[report]->addStatistic(isLocal, name, value); 58 58 } 59 59 -
trunk/Source/WebCore/Modules/mediastream/RTCStatsResponse.h
r130383 r130768 46 46 47 47 virtual size_t addReport() OVERRIDE; 48 virtual size_taddElement(size_t report, bool isLocal, double timestamp) OVERRIDE;49 virtual void addStatistic(size_t report, bool isLocal, size_t element,String name, String value) OVERRIDE;48 virtual void addElement(size_t report, bool isLocal, double timestamp) OVERRIDE; 49 virtual void addStatistic(size_t report, bool isLocal, String name, String value) OVERRIDE; 50 50 51 51 private: -
trunk/Source/WebCore/platform/chromium/support/WebRTCStatsResponse.cpp
r130383 r130768 61 61 } 62 62 63 size_tWebRTCStatsResponse::addElement(size_t report, bool isLocal, double timestamp)63 void WebRTCStatsResponse::addElement(size_t report, bool isLocal, double timestamp) 64 64 { 65 returnm_private->addElement(report, isLocal, timestamp);65 m_private->addElement(report, isLocal, timestamp); 66 66 } 67 67 68 void WebRTCStatsResponse::addStatistic(size_t report, bool isLocal, size_t element,WebString name, WebString value)68 void WebRTCStatsResponse::addStatistic(size_t report, bool isLocal, WebString name, WebString value) 69 69 { 70 m_private->addStatistic(report, isLocal, element,name, value);70 m_private->addStatistic(report, isLocal, name, value); 71 71 } 72 72 -
trunk/Source/WebCore/platform/mediastream/RTCStatsResponseBase.h
r130383 r130768 39 39 40 40 virtual size_t addReport() = 0; 41 virtual size_taddElement(size_t report, bool isLocal, double timestamp) = 0;42 virtual void addStatistic(size_t report, bool isLocal, size_t element,String name, String value) = 0;41 virtual void addElement(size_t report, bool isLocal, double timestamp) = 0; 42 virtual void addStatistic(size_t report, bool isLocal, String name, String value) = 0; 43 43 }; 44 44 … … 48 48 49 49 #endif // RTCStatsResponseBase_h 50 -
trunk/Tools/ChangeLog
r130765 r130768 1 2012-10-09 Harald Alvestrand <hta@google.com> 2 3 Change PeerConnection getStats function to single value local / remote 4 elements in RTCStatsReport. 5 https://bugs.webkit.org/show_bug.cgi?id=98753 6 7 Reviewed by Adam Barth. 8 9 * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp: 10 (MockWebRTCPeerConnectionHandler::getStats): 11 1 12 2012-10-09 Sadrul Habib Chowdhury <sadrul@chromium.org> 2 13 -
trunk/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
r130383 r130768 220 220 for (int i = 0; i < m_streamCount; ++i) { 221 221 size_t reportIndex = response.addReport(); 222 size_t elementIndex =response.addElement(reportIndex, true, currentDate);223 response.addStatistic(reportIndex, true, elementIndex,"type", "audio");222 response.addElement(reportIndex, true, currentDate); 223 response.addStatistic(reportIndex, true, "type", "audio"); 224 224 reportIndex = response.addReport(); 225 elementIndex =response.addElement(reportIndex, true, currentDate);226 response.addStatistic(reportIndex, true, elementIndex,"type", "video");225 response.addElement(reportIndex, true, currentDate); 226 response.addStatistic(reportIndex, true, "type", "video"); 227 227 } 228 228 postTask(new RTCStatsRequestSucceededTask(this, request, response));
Note: See TracChangeset
for help on using the changeset viewer.