| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 172         m_sourceBuffers->item(i)->removedFromMediaSource(); | 172         m_sourceBuffers->item(i)->removedFromMediaSource(); | 
| 173     m_sourceBuffers->clear(); | 173     m_sourceBuffers->clear(); | 
| 174 | 174 | 
| 175     scheduleEvent(eventNames().sourcecloseEvent); | 175     scheduleEvent(eventNames().sourcecloseEvent); | 
| 176 } | 176 } | 
| 177 | 177 | 
| 178 Vector<RefPtr<TimeRanges> > MediaSource::activeRanges() const | 178 Vector<RefPtr<TimeRanges> > MediaSource::activeRanges() const | 
| 179 { | 179 { | 
| 180     Vector<RefPtr<TimeRanges> > activeRanges(m_activeSourceBuffers->length()); | 180     Vector<RefPtr<TimeRanges> > activeRanges(m_activeSourceBuffers->length()); | 
| 181     for (size_t i = 0; i < m_activeSourceBuffers->length(); ++i) | 181     for (size_t i = 0; i < m_activeSourceBuffers->length(); ++i) | 
| 182         activeRanges[i] = m_activeSourceBuffers->item(i)->buffered(ASSERT_NO_EXC
     EPTION_STATE); | 182         activeRanges[i] = m_activeSourceBuffers->item(i)->buffered(ASSERT_NO_EXC
     EPTION); | 
| 183 | 183 | 
| 184     return activeRanges; | 184     return activeRanges; | 
| 185 } | 185 } | 
| 186 | 186 | 
| 187 bool MediaSource::isTypeSupported(const String& type) | 187 bool MediaSource::isTypeSupported(const String& type) | 
| 188 { | 188 { | 
| 189     LOG(Media, "MediaSource::isTypeSupported(%s)", type.ascii().data()); | 189     LOG(Media, "MediaSource::isTypeSupported(%s)", type.ascii().data()); | 
| 190 | 190 | 
| 191     // Section 2.2 isTypeSupported() method steps. | 191     // Section 2.2 isTypeSupported() method steps. | 
| 192     // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.
     html#widl-MediaSource-isTypeSupported-boolean-DOMString-type | 192     // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.
     html#widl-MediaSource-isTypeSupported-boolean-DOMString-type | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 207     // 6. Return true. | 207     // 6. Return true. | 
| 208     return MIMETypeRegistry::isSupportedMediaSourceMIMEType(contentType.type(), 
     codecs); | 208     return MIMETypeRegistry::isSupportedMediaSourceMIMEType(contentType.type(), 
     codecs); | 
| 209 } | 209 } | 
| 210 | 210 | 
| 211 const AtomicString& MediaSource::interfaceName() const | 211 const AtomicString& MediaSource::interfaceName() const | 
| 212 { | 212 { | 
| 213     return eventNames().interfaceForMediaSource; | 213     return eventNames().interfaceForMediaSource; | 
| 214 } | 214 } | 
| 215 | 215 | 
| 216 } // namespace WebCore | 216 } // namespace WebCore | 
| OLD | NEW | 
|---|