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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "core/html/track/AudioTrackList.h" | 46 #include "core/html/track/AudioTrackList.h" |
47 #include "core/html/track/VideoTrack.h" | 47 #include "core/html/track/VideoTrack.h" |
48 #include "core/html/track/VideoTrackList.h" | 48 #include "core/html/track/VideoTrackList.h" |
49 #include "core/streams/Stream.h" | 49 #include "core/streams/Stream.h" |
50 #include "modules/mediasource/MediaSource.h" | 50 #include "modules/mediasource/MediaSource.h" |
51 #include "modules/mediasource/SourceBufferTrackBaseSupplement.h" | 51 #include "modules/mediasource/SourceBufferTrackBaseSupplement.h" |
52 #include "platform/Logging.h" | 52 #include "platform/Logging.h" |
53 #include "platform/TraceEvent.h" | 53 #include "platform/TraceEvent.h" |
54 #include "public/platform/WebSourceBuffer.h" | 54 #include "public/platform/WebSourceBuffer.h" |
55 #include "wtf/MathExtras.h" | 55 #include "wtf/MathExtras.h" |
56 | |
57 #include <limits> | 56 #include <limits> |
| 57 #include <memory> |
58 #include <sstream> | 58 #include <sstream> |
59 | 59 |
60 using blink::WebSourceBuffer; | 60 using blink::WebSourceBuffer; |
61 | 61 |
62 #define SBLOG DVLOG(3) | 62 #define SBLOG DVLOG(3) |
63 | 63 |
64 namespace blink { | 64 namespace blink { |
65 | 65 |
66 namespace { | 66 namespace { |
67 | 67 |
(...skipping 21 matching lines...) Expand all Loading... |
89 stringBuilder.append(";"); | 89 stringBuilder.append(";"); |
90 stringBuilder.appendNumber(r.end); | 90 stringBuilder.appendNumber(r.end); |
91 stringBuilder.append("]"); | 91 stringBuilder.append("]"); |
92 } | 92 } |
93 stringBuilder.append(" }"); | 93 stringBuilder.append(" }"); |
94 return stringBuilder.toString(); | 94 return stringBuilder.toString(); |
95 } | 95 } |
96 | 96 |
97 } // namespace | 97 } // namespace |
98 | 98 |
99 SourceBuffer* SourceBuffer::create(PassOwnPtr<WebSourceBuffer> webSourceBuffer,
MediaSource* source, GenericEventQueue* asyncEventQueue) | 99 SourceBuffer* SourceBuffer::create(std::unique_ptr<WebSourceBuffer> webSourceBuf
fer, MediaSource* source, GenericEventQueue* asyncEventQueue) |
100 { | 100 { |
101 SourceBuffer* sourceBuffer = new SourceBuffer(std::move(webSourceBuffer), so
urce, asyncEventQueue); | 101 SourceBuffer* sourceBuffer = new SourceBuffer(std::move(webSourceBuffer), so
urce, asyncEventQueue); |
102 sourceBuffer->suspendIfNeeded(); | 102 sourceBuffer->suspendIfNeeded(); |
103 return sourceBuffer; | 103 return sourceBuffer; |
104 } | 104 } |
105 | 105 |
106 SourceBuffer::SourceBuffer(PassOwnPtr<WebSourceBuffer> webSourceBuffer, MediaSou
rce* source, GenericEventQueue* asyncEventQueue) | 106 SourceBuffer::SourceBuffer(std::unique_ptr<WebSourceBuffer> webSourceBuffer, Med
iaSource* source, GenericEventQueue* asyncEventQueue) |
107 : ActiveScriptWrappable(this) | 107 : ActiveScriptWrappable(this) |
108 , ActiveDOMObject(source->getExecutionContext()) | 108 , ActiveDOMObject(source->getExecutionContext()) |
109 , m_webSourceBuffer(std::move(webSourceBuffer)) | 109 , m_webSourceBuffer(std::move(webSourceBuffer)) |
110 , m_source(source) | 110 , m_source(source) |
111 , m_trackDefaults(TrackDefaultList::create()) | 111 , m_trackDefaults(TrackDefaultList::create()) |
112 , m_asyncEventQueue(asyncEventQueue) | 112 , m_asyncEventQueue(asyncEventQueue) |
113 , m_mode(segmentsKeyword()) | 113 , m_mode(segmentsKeyword()) |
114 , m_updating(false) | 114 , m_updating(false) |
115 , m_timestampOffset(0) | 115 , m_timestampOffset(0) |
116 , m_appendWindowStart(0) | 116 , m_appendWindowStart(0) |
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1030 visitor->trace(m_removeAsyncPartRunner); | 1030 visitor->trace(m_removeAsyncPartRunner); |
1031 visitor->trace(m_appendStreamAsyncPartRunner); | 1031 visitor->trace(m_appendStreamAsyncPartRunner); |
1032 visitor->trace(m_stream); | 1032 visitor->trace(m_stream); |
1033 visitor->trace(m_audioTracks); | 1033 visitor->trace(m_audioTracks); |
1034 visitor->trace(m_videoTracks); | 1034 visitor->trace(m_videoTracks); |
1035 EventTargetWithInlineData::trace(visitor); | 1035 EventTargetWithInlineData::trace(visitor); |
1036 ActiveDOMObject::trace(visitor); | 1036 ActiveDOMObject::trace(visitor); |
1037 } | 1037 } |
1038 | 1038 |
1039 } // namespace blink | 1039 } // namespace blink |
OLD | NEW |