Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: content/renderer/media/webmediasource_impl.cc

Issue 315483002: MSE: Remove Chromium-side support for LegacyFrameProcessor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/media/webmediasource_impl.h ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/webmediasource_impl.h" 5 #include "content/renderer/media/webmediasource_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 18 matching lines...) Expand all
29 : demuxer_(demuxer), 29 : demuxer_(demuxer),
30 log_cb_(log_cb) { 30 log_cb_(log_cb) {
31 DCHECK(demuxer_); 31 DCHECK(demuxer_);
32 } 32 }
33 33
34 WebMediaSourceImpl::~WebMediaSourceImpl() {} 34 WebMediaSourceImpl::~WebMediaSourceImpl() {}
35 35
36 WebMediaSource::AddStatus WebMediaSourceImpl::addSourceBuffer( 36 WebMediaSource::AddStatus WebMediaSourceImpl::addSourceBuffer(
37 const blink::WebString& type, 37 const blink::WebString& type,
38 const blink::WebVector<blink::WebString>& codecs, 38 const blink::WebVector<blink::WebString>& codecs,
39 const WebMediaSource::FrameProcessorChoice frame_processor_choice,
40 blink::WebSourceBuffer** source_buffer) { 39 blink::WebSourceBuffer** source_buffer) {
41 std::string id = base::GenerateGUID(); 40 std::string id = base::GenerateGUID();
42 std::vector<std::string> new_codecs(codecs.size()); 41 std::vector<std::string> new_codecs(codecs.size());
43 for (size_t i = 0; i < codecs.size(); ++i) 42 for (size_t i = 0; i < codecs.size(); ++i)
44 new_codecs[i] = codecs[i].utf8().data(); 43 new_codecs[i] = codecs[i].utf8().data();
45 44
46 // Ignore |frame_processor_choice|. Instead, request the new FrameProcessor.
47 // TODO(wolenetz): Remove |frame_processor_choice| and LegacyFrameProcessor
48 // once the new FrameProcessor has stabilized. See http://crbug.com/249422.
49 WebMediaSource::AddStatus result = 45 WebMediaSource::AddStatus result =
50 static_cast<WebMediaSource::AddStatus>( 46 static_cast<WebMediaSource::AddStatus>(
51 demuxer_->AddId(id, type.utf8().data(), new_codecs, false)); 47 demuxer_->AddId(id, type.utf8().data(), new_codecs));
52 48
53 if (result == WebMediaSource::AddStatusOk) 49 if (result == WebMediaSource::AddStatusOk)
54 *source_buffer = new WebSourceBufferImpl(id, demuxer_); 50 *source_buffer = new WebSourceBufferImpl(id, demuxer_);
55 51
56 return result; 52 return result;
57 } 53 }
58 54
59 double WebMediaSourceImpl::duration() { 55 double WebMediaSourceImpl::duration() {
60 return demuxer_->GetDuration(); 56 return demuxer_->GetDuration();
61 } 57 }
(...skipping 19 matching lines...) Expand all
81 } 77 }
82 78
83 demuxer_->MarkEndOfStream(pipeline_status); 79 demuxer_->MarkEndOfStream(pipeline_status);
84 } 80 }
85 81
86 void WebMediaSourceImpl::unmarkEndOfStream() { 82 void WebMediaSourceImpl::unmarkEndOfStream() {
87 demuxer_->UnmarkEndOfStream(); 83 demuxer_->UnmarkEndOfStream();
88 } 84 }
89 85
90 } // namespace content 86 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webmediasource_impl.h ('k') | media/filters/chunk_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698