| OLD | NEW |
| 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 30 matching lines...) Expand all Loading... |
| 41 #include "platform/MIMETypeRegistry.h" | 41 #include "platform/MIMETypeRegistry.h" |
| 42 #include "public/platform/WebSourceBuffer.h" | 42 #include "public/platform/WebSourceBuffer.h" |
| 43 #include "wtf/Uint8Array.h" | 43 #include "wtf/Uint8Array.h" |
| 44 | 44 |
| 45 using blink::WebSourceBuffer; | 45 using blink::WebSourceBuffer; |
| 46 | 46 |
| 47 namespace WebCore { | 47 namespace WebCore { |
| 48 | 48 |
| 49 PassRefPtrWillBeRawPtr<WebKitMediaSource> WebKitMediaSource::create(ExecutionCon
text* context) | 49 PassRefPtrWillBeRawPtr<WebKitMediaSource> WebKitMediaSource::create(ExecutionCon
text* context) |
| 50 { | 50 { |
| 51 RefPtrWillBeRawPtr<WebKitMediaSource> mediaSource(adoptRefCountedWillBeRefCo
untedGarbageCollected(new WebKitMediaSource(context))); | 51 RefPtrWillBeRawPtr<WebKitMediaSource> mediaSource(adoptRefWillBeRefCountedGa
rbageCollected(new WebKitMediaSource(context))); |
| 52 mediaSource->suspendIfNeeded(); | 52 mediaSource->suspendIfNeeded(); |
| 53 return mediaSource.release(); | 53 return mediaSource.release(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 WebKitMediaSource::WebKitMediaSource(ExecutionContext* context) | 56 WebKitMediaSource::WebKitMediaSource(ExecutionContext* context) |
| 57 : MediaSourceBase(context) | 57 : MediaSourceBase(context) |
| 58 { | 58 { |
| 59 ScriptWrappable::init(this); | 59 ScriptWrappable::init(this); |
| 60 m_sourceBuffers = WebKitSourceBufferList::create(executionContext(), asyncEv
entQueue()); | 60 m_sourceBuffers = WebKitSourceBufferList::create(executionContext(), asyncEv
entQueue()); |
| 61 m_activeSourceBuffers = WebKitSourceBufferList::create(executionContext(), a
syncEventQueue()); | 61 m_activeSourceBuffers = WebKitSourceBufferList::create(executionContext(), a
syncEventQueue()); |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 } | 219 } |
| 220 | 220 |
| 221 void WebKitMediaSource::trace(Visitor* visitor) | 221 void WebKitMediaSource::trace(Visitor* visitor) |
| 222 { | 222 { |
| 223 visitor->trace(m_sourceBuffers); | 223 visitor->trace(m_sourceBuffers); |
| 224 visitor->trace(m_activeSourceBuffers); | 224 visitor->trace(m_activeSourceBuffers); |
| 225 MediaSourceBase::trace(visitor); | 225 MediaSourceBase::trace(visitor); |
| 226 } | 226 } |
| 227 | 227 |
| 228 } // namespace WebCore | 228 } // namespace WebCore |
| OLD | NEW |