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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "public/platform/WebSourceBuffer.h" | 43 #include "public/platform/WebSourceBuffer.h" |
44 #include "wtf/Uint8Array.h" | 44 #include "wtf/Uint8Array.h" |
45 #include "wtf/text/CString.h" | 45 #include "wtf/text/CString.h" |
46 | 46 |
47 using blink::WebSourceBuffer; | 47 using blink::WebSourceBuffer; |
48 | 48 |
49 namespace WebCore { | 49 namespace WebCore { |
50 | 50 |
51 PassRefPtrWillBeRawPtr<MediaSource> MediaSource::create(ExecutionContext* contex
t) | 51 PassRefPtrWillBeRawPtr<MediaSource> MediaSource::create(ExecutionContext* contex
t) |
52 { | 52 { |
53 RefPtrWillBeRawPtr<MediaSource> mediaSource(adoptRefCountedWillBeRefCountedG
arbageCollected(new MediaSource(context))); | 53 RefPtrWillBeRawPtr<MediaSource> mediaSource(adoptRefWillBeRefCountedGarbageC
ollected(new MediaSource(context))); |
54 mediaSource->suspendIfNeeded(); | 54 mediaSource->suspendIfNeeded(); |
55 return mediaSource.release(); | 55 return mediaSource.release(); |
56 } | 56 } |
57 | 57 |
58 MediaSource::MediaSource(ExecutionContext* context) | 58 MediaSource::MediaSource(ExecutionContext* context) |
59 : MediaSourceBase(context) | 59 : MediaSourceBase(context) |
60 { | 60 { |
61 WTF_LOG(Media, "MediaSource::MediaSource %p", this); | 61 WTF_LOG(Media, "MediaSource::MediaSource %p", this); |
62 ScriptWrappable::init(this); | 62 ScriptWrappable::init(this); |
63 m_sourceBuffers = SourceBufferList::create(executionContext(), asyncEventQue
ue()); | 63 m_sourceBuffers = SourceBufferList::create(executionContext(), asyncEventQue
ue()); |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 } | 227 } |
228 | 228 |
229 void MediaSource::trace(Visitor* visitor) | 229 void MediaSource::trace(Visitor* visitor) |
230 { | 230 { |
231 visitor->trace(m_sourceBuffers); | 231 visitor->trace(m_sourceBuffers); |
232 visitor->trace(m_activeSourceBuffers); | 232 visitor->trace(m_activeSourceBuffers); |
233 MediaSourceBase::trace(visitor); | 233 MediaSourceBase::trace(visitor); |
234 } | 234 } |
235 | 235 |
236 } // namespace WebCore | 236 } // namespace WebCore |
OLD | NEW |