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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 MediaSource* mediaSource = new MediaSource(context); | 90 MediaSource* mediaSource = new MediaSource(context); |
91 mediaSource->suspendIfNeeded(); | 91 mediaSource->suspendIfNeeded(); |
92 return mediaSource; | 92 return mediaSource; |
93 } | 93 } |
94 | 94 |
95 MediaSource::MediaSource(ExecutionContext* context) | 95 MediaSource::MediaSource(ExecutionContext* context) |
96 : ActiveDOMObject(context) | 96 : ActiveDOMObject(context) |
97 , m_readyState(closedKeyword()) | 97 , m_readyState(closedKeyword()) |
98 , m_asyncEventQueue(GenericEventQueue::create(this)) | 98 , m_asyncEventQueue(GenericEventQueue::create(this)) |
99 , m_attachedElement(nullptr) | 99 , m_attachedElement(nullptr) |
100 , m_sourceBuffers(SourceBufferList::create(executionContext(), m_asyncEventQ
ueue.get())) | 100 , m_sourceBuffers(SourceBufferList::create(getExecutionContext(), m_asyncEve
ntQueue.get())) |
101 , m_activeSourceBuffers(SourceBufferList::create(executionContext(), m_async
EventQueue.get())) | 101 , m_activeSourceBuffers(SourceBufferList::create(getExecutionContext(), m_as
yncEventQueue.get())) |
102 , m_isAddedToRegistry(false) | 102 , m_isAddedToRegistry(false) |
103 { | 103 { |
104 WTF_LOG(Media, "MediaSource::MediaSource %p", this); | 104 WTF_LOG(Media, "MediaSource::MediaSource %p", this); |
105 } | 105 } |
106 | 106 |
107 MediaSource::~MediaSource() | 107 MediaSource::~MediaSource() |
108 { | 108 { |
109 WTF_LOG(Media, "MediaSource::~MediaSource %p", this); | 109 WTF_LOG(Media, "MediaSource::~MediaSource %p", this); |
110 #if !ENABLE(OILPAN) | 110 #if !ENABLE(OILPAN) |
111 ASSERT(isClosed()); | 111 ASSERT(isClosed()); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 bool result = MIMETypeRegistry::isSupportedMediaSourceMIMEType(contentType.t
ype(), codecs); | 263 bool result = MIMETypeRegistry::isSupportedMediaSourceMIMEType(contentType.t
ype(), codecs); |
264 WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> %s", type.ascii().data()
, result ? "true" : "false"); | 264 WTF_LOG(Media, "MediaSource::isTypeSupported(%s) -> %s", type.ascii().data()
, result ? "true" : "false"); |
265 return result; | 265 return result; |
266 } | 266 } |
267 | 267 |
268 const AtomicString& MediaSource::interfaceName() const | 268 const AtomicString& MediaSource::interfaceName() const |
269 { | 269 { |
270 return EventTargetNames::MediaSource; | 270 return EventTargetNames::MediaSource; |
271 } | 271 } |
272 | 272 |
273 ExecutionContext* MediaSource::executionContext() const | 273 ExecutionContext* MediaSource::getExecutionContext() const |
274 { | 274 { |
275 return ActiveDOMObject::executionContext(); | 275 return ActiveDOMObject::getExecutionContext(); |
276 } | 276 } |
277 | 277 |
278 DEFINE_TRACE(MediaSource) | 278 DEFINE_TRACE(MediaSource) |
279 { | 279 { |
280 visitor->trace(m_asyncEventQueue); | 280 visitor->trace(m_asyncEventQueue); |
281 visitor->trace(m_attachedElement); | 281 visitor->trace(m_attachedElement); |
282 visitor->trace(m_sourceBuffers); | 282 visitor->trace(m_sourceBuffers); |
283 visitor->trace(m_activeSourceBuffers); | 283 visitor->trace(m_activeSourceBuffers); |
284 RefCountedGarbageCollectedEventTargetWithInlineData<MediaSource>::trace(visi
tor); | 284 RefCountedGarbageCollectedEventTargetWithInlineData<MediaSource>::trace(visi
tor); |
285 ActiveDOMObject::trace(visitor); | 285 ActiveDOMObject::trace(visitor); |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 | 615 |
616 m_asyncEventQueue->enqueueEvent(event.release()); | 616 m_asyncEventQueue->enqueueEvent(event.release()); |
617 } | 617 } |
618 | 618 |
619 URLRegistry& MediaSource::registry() const | 619 URLRegistry& MediaSource::registry() const |
620 { | 620 { |
621 return MediaSourceRegistry::registry(); | 621 return MediaSourceRegistry::registry(); |
622 } | 622 } |
623 | 623 |
624 } // namespace blink | 624 } // namespace blink |
OLD | NEW |