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

Side by Side Diff: Source/modules/mediasource/WebKitSourceBuffer.cpp

Issue 178763006: Enable round-tripping and updating of SourceBuffer timestamp offset (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and rework so WSB::append() indicates updated timestamp offset 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // an InvalidStateError exception and abort these steps. 129 // an InvalidStateError exception and abort these steps.
130 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) 130 if (throwExceptionIfRemoved(isRemoved(), exceptionState))
131 return; 131 return;
132 132
133 // 5. If the readyState attribute of media source is in the "ended" state th en run the following steps: 133 // 5. If the readyState attribute of media source is in the "ended" state th en run the following steps:
134 // 5.1. Set the readyState attribute of media source to "open" 134 // 5.1. Set the readyState attribute of media source to "open"
135 // 5.2. Queue a task to fire a simple event named sourceopen at media source . 135 // 5.2. Queue a task to fire a simple event named sourceopen at media source .
136 m_source->openIfInEndedState(); 136 m_source->openIfInEndedState();
137 137
138 // Steps 6 & beyond are handled by m_webSourceBuffer. 138 // Steps 6 & beyond are handled by m_webSourceBuffer.
139 m_webSourceBuffer->append(data->data(), data->length()); 139
140 // Only "sequence" mode coded frame processing, not in prefixed API, may upd ate timestamp offset.
acolwell GONE FROM CHROMIUM 2014/02/27 01:24:45 nit: This comment is a little confusing. How about
wolenetz 2014/02/27 01:44:56 Done.
141 double dummyNewTimestampOffset;
142 m_webSourceBuffer->append(data->data(), data->length(), &dummyNewTimestampOf fset);
140 } 143 }
141 144
142 void WebKitSourceBuffer::abort(ExceptionState& exceptionState) 145 void WebKitSourceBuffer::abort(ExceptionState& exceptionState)
143 { 146 {
144 // Section 3.2 abort() method steps. 147 // Section 3.2 abort() method steps.
145 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source 148 // 1. If this object has been removed from the sourceBuffers attribute of th e parent media source
146 // then throw an InvalidStateError exception and abort these steps. 149 // then throw an InvalidStateError exception and abort these steps.
147 // 2. If the readyState attribute of the parent media source is not in the " open" state 150 // 2. If the readyState attribute of the parent media source is not in the " open" state
148 // then throw an InvalidStateError exception and abort these steps. 151 // then throw an InvalidStateError exception and abort these steps.
149 if (throwExceptionIfRemoved(isRemoved(), exceptionState)) 152 if (throwExceptionIfRemoved(isRemoved(), exceptionState))
(...skipping 20 matching lines...) Expand all
170 { 173 {
171 return !m_source; 174 return !m_source;
172 } 175 }
173 176
174 void WebKitSourceBuffer::trace(Visitor* visitor) 177 void WebKitSourceBuffer::trace(Visitor* visitor)
175 { 178 {
176 visitor->trace(m_source); 179 visitor->trace(m_source);
177 } 180 }
178 181
179 } // namespace WebCore 182 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698