| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  220     // 6. If the mode attribute equals "sequence", then set the group start time
     stamp to new timestamp offset. |  220     // 6. If the mode attribute equals "sequence", then set the group start time
     stamp to new timestamp offset. | 
|  221     if (!m_webSourceBuffer->setTimestampOffset(offset)) { |  221     if (!m_webSourceBuffer->setTimestampOffset(offset)) { | 
|  222         MediaSource::logAndThrowDOMException(exceptionState, InvalidStateError, 
     "The timestamp offset may not be set while the SourceBuffer's append state is 'P
     ARSING_MEDIA_SEGMENT'."); |  222         MediaSource::logAndThrowDOMException(exceptionState, InvalidStateError, 
     "The timestamp offset may not be set while the SourceBuffer's append state is 'P
     ARSING_MEDIA_SEGMENT'."); | 
|  223         return; |  223         return; | 
|  224     } |  224     } | 
|  225  |  225  | 
|  226     // 7. Update the attribute to new timestamp offset. |  226     // 7. Update the attribute to new timestamp offset. | 
|  227     m_timestampOffset = offset; |  227     m_timestampOffset = offset; | 
|  228 } |  228 } | 
|  229  |  229  | 
 |  230 AudioTrackList& SourceBuffer::audioTracks() | 
 |  231 { | 
 |  232     ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); | 
 |  233     return *m_audioTracks; | 
 |  234 } | 
 |  235  | 
 |  236 VideoTrackList& SourceBuffer::videoTracks() | 
 |  237 { | 
 |  238     ASSERT(RuntimeEnabledFeatures::audioVideoTracksEnabled()); | 
 |  239     return *m_videoTracks; | 
 |  240 } | 
 |  241  | 
|  230 double SourceBuffer::appendWindowStart() const |  242 double SourceBuffer::appendWindowStart() const | 
|  231 { |  243 { | 
|  232     return m_appendWindowStart; |  244     return m_appendWindowStart; | 
|  233 } |  245 } | 
|  234  |  246  | 
|  235 void SourceBuffer::setAppendWindowStart(double start, ExceptionState& exceptionS
     tate) |  247 void SourceBuffer::setAppendWindowStart(double start, ExceptionState& exceptionS
     tate) | 
|  236 { |  248 { | 
|  237     WTF_LOG(Media, "SourceBuffer::setAppendWindowStart %p start=%f", this, start
     ); |  249     WTF_LOG(Media, "SourceBuffer::setAppendWindowStart %p start=%f", this, start
     ); | 
|  238     // Section 3.1 appendWindowStart attribute setter steps. |  250     // Section 3.1 appendWindowStart attribute setter steps. | 
|  239     // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.
     html#widl-SourceBuffer-appendWindowStart |  251     // https://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.
     html#widl-SourceBuffer-appendWindowStart | 
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  859     // m_loader might be already released, in case appendStream has failed due |  871     // m_loader might be already released, in case appendStream has failed due | 
|  860     // to evictCodedFrames failing in didReceiveDataForClient. In that case |  872     // to evictCodedFrames failing in didReceiveDataForClient. In that case | 
|  861     // appendStreamDone will be invoked from there, no need to repeat it here. |  873     // appendStreamDone will be invoked from there, no need to repeat it here. | 
|  862     if (m_loader) |  874     if (m_loader) | 
|  863         appendStreamDone(false); |  875         appendStreamDone(false); | 
|  864 } |  876 } | 
|  865  |  877  | 
|  866 DEFINE_TRACE(SourceBuffer) |  878 DEFINE_TRACE(SourceBuffer) | 
|  867 { |  879 { | 
|  868     visitor->trace(m_source); |  880     visitor->trace(m_source); | 
 |  881     visitor->trace(m_audioTracks); | 
 |  882     visitor->trace(m_videoTracks); | 
|  869     visitor->trace(m_trackDefaults); |  883     visitor->trace(m_trackDefaults); | 
|  870     visitor->trace(m_asyncEventQueue); |  884     visitor->trace(m_asyncEventQueue); | 
|  871     visitor->trace(m_appendBufferAsyncPartRunner); |  885     visitor->trace(m_appendBufferAsyncPartRunner); | 
|  872     visitor->trace(m_removeAsyncPartRunner); |  886     visitor->trace(m_removeAsyncPartRunner); | 
|  873     visitor->trace(m_appendStreamAsyncPartRunner); |  887     visitor->trace(m_appendStreamAsyncPartRunner); | 
|  874     visitor->trace(m_stream); |  888     visitor->trace(m_stream); | 
|  875     RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis
     itor); |  889     RefCountedGarbageCollectedEventTargetWithInlineData<SourceBuffer>::trace(vis
     itor); | 
|  876     ActiveDOMObject::trace(visitor); |  890     ActiveDOMObject::trace(visitor); | 
|  877 } |  891 } | 
|  878  |  892  | 
|  879 } // namespace blink |  893 } // namespace blink | 
| OLD | NEW |