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

Side by Side Diff: webkit/media/filter_helpers.cc

Issue 10905236: Move ChunkDemuxer handling from WMPProxy to WMPI and remove ChunkDemuxerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add TODO Created 8 years, 3 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 | « webkit/media/filter_helpers.h ('k') | webkit/media/webmediaplayer_impl.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/media/filter_helpers.h" 5 #include "webkit/media/filter_helpers.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "media/base/filter_collection.h" 8 #include "media/base/filter_collection.h"
9 #include "media/base/message_loop_factory.h" 9 #include "media/base/message_loop_factory.h"
10 #include "media/filters/chunk_demuxer.h" 10 #include "media/filters/chunk_demuxer.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // NOTE: http://crbug.com/110800 is about replacing this ad-hockery with 52 // NOTE: http://crbug.com/110800 is about replacing this ad-hockery with
53 // something more designed. 53 // something more designed.
54 filter_collection->GetVideoDecoders()->clear(); 54 filter_collection->GetVideoDecoders()->clear();
55 filter_collection->GetVideoDecoders()->push_back(video_decoder); 55 filter_collection->GetVideoDecoders()->push_back(video_decoder);
56 56
57 filter_collection->SetDemuxer(new media::DummyDemuxer(true, false)); 57 filter_collection->SetDemuxer(new media::DummyDemuxer(true, false));
58 58
59 return true; 59 return true;
60 } 60 }
61 61
62 bool BuildMediaSourceCollection( 62 void BuildMediaSourceCollection(
63 const WebKit::WebURL& url, 63 const scoped_refptr<media::ChunkDemuxer>& demuxer,
64 const WebKit::WebURL& media_source_url,
65 media::ChunkDemuxerClient* client,
66 media::MessageLoopFactory* message_loop_factory, 64 media::MessageLoopFactory* message_loop_factory,
67 media::FilterCollection* filter_collection, 65 media::FilterCollection* filter_collection,
68 media::Decryptor* decryptor) { 66 media::Decryptor* decryptor) {
69 if (media_source_url.isEmpty() || url != media_source_url) 67 DCHECK(demuxer);
70 return false; 68 filter_collection->SetDemuxer(demuxer);
71
72 filter_collection->SetDemuxer(new media::ChunkDemuxer(client));
73
74 AddDefaultDecodersToCollection(message_loop_factory, filter_collection, 69 AddDefaultDecodersToCollection(message_loop_factory, filter_collection,
75 decryptor); 70 decryptor);
76 return true;
77 } 71 }
78 72
79 void BuildDefaultCollection( 73 void BuildDefaultCollection(
80 const scoped_refptr<media::DataSource>& data_source, 74 const scoped_refptr<media::DataSource>& data_source,
81 media::MessageLoopFactory* message_loop_factory, 75 media::MessageLoopFactory* message_loop_factory,
82 media::FilterCollection* filter_collection, 76 media::FilterCollection* filter_collection,
83 media::Decryptor* decryptor) { 77 media::Decryptor* decryptor) {
84 filter_collection->SetDemuxer(new media::FFmpegDemuxer( 78 filter_collection->SetDemuxer(new media::FFmpegDemuxer(
85 message_loop_factory->GetMessageLoop( 79 message_loop_factory->GetMessageLoop(
86 media::MessageLoopFactory::kPipeline), 80 media::MessageLoopFactory::kPipeline),
87 data_source)); 81 data_source));
88 82
89 AddDefaultDecodersToCollection(message_loop_factory, filter_collection, 83 AddDefaultDecodersToCollection(message_loop_factory, filter_collection,
90 decryptor); 84 decryptor);
91 } 85 }
92 86
93 } // webkit_media 87 } // webkit_media
OLDNEW
« no previous file with comments | « webkit/media/filter_helpers.h ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698