| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 SourceBuffer* sourceBuffer = | 110 SourceBuffer* sourceBuffer = |
| 111 new SourceBuffer(std::move(webSourceBuffer), source, asyncEventQueue); | 111 new SourceBuffer(std::move(webSourceBuffer), source, asyncEventQueue); |
| 112 sourceBuffer->suspendIfNeeded(); | 112 sourceBuffer->suspendIfNeeded(); |
| 113 return sourceBuffer; | 113 return sourceBuffer; |
| 114 } | 114 } |
| 115 | 115 |
| 116 SourceBuffer::SourceBuffer(std::unique_ptr<WebSourceBuffer> webSourceBuffer, | 116 SourceBuffer::SourceBuffer(std::unique_ptr<WebSourceBuffer> webSourceBuffer, |
| 117 MediaSource* source, | 117 MediaSource* source, |
| 118 GenericEventQueue* asyncEventQueue) | 118 GenericEventQueue* asyncEventQueue) |
| 119 : ActiveScriptWrappable(this), | 119 : ActiveScriptWrappable(this), |
| 120 ActiveDOMObject(source->getExecutionContext()), | 120 SuspendableObject(source->getExecutionContext()), |
| 121 m_webSourceBuffer(std::move(webSourceBuffer)), | 121 m_webSourceBuffer(std::move(webSourceBuffer)), |
| 122 m_source(source), | 122 m_source(source), |
| 123 m_trackDefaults(TrackDefaultList::create()), | 123 m_trackDefaults(TrackDefaultList::create()), |
| 124 m_asyncEventQueue(asyncEventQueue), | 124 m_asyncEventQueue(asyncEventQueue), |
| 125 m_mode(segmentsKeyword()), | 125 m_mode(segmentsKeyword()), |
| 126 m_updating(false), | 126 m_updating(false), |
| 127 m_timestampOffset(0), | 127 m_timestampOffset(0), |
| 128 m_appendWindowStart(0), | 128 m_appendWindowStart(0), |
| 129 m_appendWindowEnd(std::numeric_limits<double>::infinity()), | 129 m_appendWindowEnd(std::numeric_limits<double>::infinity()), |
| 130 m_firstInitializationSegmentReceived(false), | 130 m_firstInitializationSegmentReceived(false), |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 m_appendBufferAsyncPartRunner->resume(); | 1040 m_appendBufferAsyncPartRunner->resume(); |
| 1041 m_removeAsyncPartRunner->resume(); | 1041 m_removeAsyncPartRunner->resume(); |
| 1042 } | 1042 } |
| 1043 | 1043 |
| 1044 void SourceBuffer::contextDestroyed() { | 1044 void SourceBuffer::contextDestroyed() { |
| 1045 m_appendBufferAsyncPartRunner->stop(); | 1045 m_appendBufferAsyncPartRunner->stop(); |
| 1046 m_removeAsyncPartRunner->stop(); | 1046 m_removeAsyncPartRunner->stop(); |
| 1047 } | 1047 } |
| 1048 | 1048 |
| 1049 ExecutionContext* SourceBuffer::getExecutionContext() const { | 1049 ExecutionContext* SourceBuffer::getExecutionContext() const { |
| 1050 return ActiveDOMObject::getExecutionContext(); | 1050 return SuspendableObject::getExecutionContext(); |
| 1051 } | 1051 } |
| 1052 | 1052 |
| 1053 const AtomicString& SourceBuffer::interfaceName() const { | 1053 const AtomicString& SourceBuffer::interfaceName() const { |
| 1054 return EventTargetNames::SourceBuffer; | 1054 return EventTargetNames::SourceBuffer; |
| 1055 } | 1055 } |
| 1056 | 1056 |
| 1057 bool SourceBuffer::isRemoved() const { | 1057 bool SourceBuffer::isRemoved() const { |
| 1058 return !m_source; | 1058 return !m_source; |
| 1059 } | 1059 } |
| 1060 | 1060 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 | 1302 |
| 1303 DEFINE_TRACE(SourceBuffer) { | 1303 DEFINE_TRACE(SourceBuffer) { |
| 1304 visitor->trace(m_source); | 1304 visitor->trace(m_source); |
| 1305 visitor->trace(m_trackDefaults); | 1305 visitor->trace(m_trackDefaults); |
| 1306 visitor->trace(m_asyncEventQueue); | 1306 visitor->trace(m_asyncEventQueue); |
| 1307 visitor->trace(m_appendBufferAsyncPartRunner); | 1307 visitor->trace(m_appendBufferAsyncPartRunner); |
| 1308 visitor->trace(m_removeAsyncPartRunner); | 1308 visitor->trace(m_removeAsyncPartRunner); |
| 1309 visitor->trace(m_audioTracks); | 1309 visitor->trace(m_audioTracks); |
| 1310 visitor->trace(m_videoTracks); | 1310 visitor->trace(m_videoTracks); |
| 1311 EventTargetWithInlineData::trace(visitor); | 1311 EventTargetWithInlineData::trace(visitor); |
| 1312 ActiveDOMObject::trace(visitor); | 1312 SuspendableObject::trace(visitor); |
| 1313 } | 1313 } |
| 1314 | 1314 |
| 1315 } // namespace blink | 1315 } // namespace blink |
| OLD | NEW |