 Chromium Code Reviews
 Chromium Code Reviews Issue 19649007:
  Update the WebMediaSourceClientImpl & ChunkDemuxer to received explicit end of stream cancellation.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src
    
  
    Issue 19649007:
  Update the WebMediaSourceClientImpl & ChunkDemuxer to received explicit end of stream cancellation.  (Closed) 
  Base URL: svn://svn.chromium.org/chrome/trunk/src| OLD | NEW | 
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "content/renderer/media/webmediasourceclient_impl.h" | 5 #include "content/renderer/media/webmediasourceclient_impl.h" | 
| 6 | 6 | 
| 7 #include "base/guid.h" | 7 #include "base/guid.h" | 
| 8 #include "content/renderer/media/websourcebuffer_impl.h" | 8 #include "content/renderer/media/websourcebuffer_impl.h" | 
| 9 #include "media/filters/chunk_demuxer.h" | 9 #include "media/filters/chunk_demuxer.h" | 
| 10 #include "third_party/WebKit/public/platform/WebCString.h" | 10 #include "third_party/WebKit/public/platform/WebCString.h" | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 | 53 | 
| 54 double WebMediaSourceClientImpl::duration() { | 54 double WebMediaSourceClientImpl::duration() { | 
| 55 return demuxer_->GetDuration(); | 55 return demuxer_->GetDuration(); | 
| 56 } | 56 } | 
| 57 | 57 | 
| 58 void WebMediaSourceClientImpl::setDuration(double new_duration) { | 58 void WebMediaSourceClientImpl::setDuration(double new_duration) { | 
| 59 DCHECK_GE(new_duration, 0); | 59 DCHECK_GE(new_duration, 0); | 
| 60 demuxer_->SetDuration(new_duration); | 60 demuxer_->SetDuration(new_duration); | 
| 61 } | 61 } | 
| 62 | 62 | 
| 63 void WebMediaSourceClientImpl::endOfStream( | 63 void WebMediaSourceClientImpl::markEndOfStream( | 
| 64 WebMediaSourceClient::EndOfStreamStatus status) { | 64 WebMediaSourceClient::EndOfStreamStatus status) { | 
| 65 media::PipelineStatus pipeline_status = media::PIPELINE_OK; | 65 media::PipelineStatus pipeline_status = media::PIPELINE_OK; | 
| 66 | 66 | 
| 67 switch (status) { | 67 switch (status) { | 
| 68 case WebMediaSourceClient::EndOfStreamStatusNoError: | 68 case WebMediaSourceClient::EndOfStreamStatusNoError: | 
| 69 break; | 69 break; | 
| 70 case WebMediaSourceClient::EndOfStreamStatusNetworkError: | 70 case WebMediaSourceClient::EndOfStreamStatusNetworkError: | 
| 71 pipeline_status = media::PIPELINE_ERROR_NETWORK; | 71 pipeline_status = media::PIPELINE_ERROR_NETWORK; | 
| 72 break; | 72 break; | 
| 73 case WebMediaSourceClient::EndOfStreamStatusDecodeError: | 73 case WebMediaSourceClient::EndOfStreamStatusDecodeError: | 
| 74 pipeline_status = media::PIPELINE_ERROR_DECODE; | 74 pipeline_status = media::PIPELINE_ERROR_DECODE; | 
| 75 break; | 75 break; | 
| 76 default: | 76 default: | 
| 77 NOTIMPLEMENTED(); | 77 NOTIMPLEMENTED(); | 
| 78 } | 78 } | 
| 79 | 79 | 
| 80 demuxer_->EndOfStream(pipeline_status); | 80 demuxer_->MarkEndOfStream(pipeline_status); | 
| 81 } | 81 } | 
| 82 | 82 | 
| 83 void WebMediaSourceClientImpl::unmarkEndOfStream() { | |
| 84 demuxer_->UnmarkEndOfStream(); | |
| 85 } | |
| 86 | |
| 
scherkus (not reviewing)
2013/07/19 20:35:47
remove extra blank
 
acolwell GONE FROM CHROMIUM
2013/07/19 20:45:54
Done.
 | |
| 87 | |
| 83 } // namespace content | 88 } // namespace content | 
| OLD | NEW |