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

Side by Side Diff: webkit/glue/media/buffered_data_source.cc

Issue 7452016: Remove MediaFormat once and for all. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 9 years, 5 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/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/glue/media/buffered_data_source.h" 5 #include "webkit/glue/media/buffered_data_source.h"
6 6
7 #include "media/base/filter_host.h" 7 #include "media/base/filter_host.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "webkit/glue/media/web_data_source_factory.h" 9 #include "webkit/glue/media/web_data_source_factory.h"
10 #include "webkit/glue/webkit_glue.h" 10 #include "webkit/glue/webkit_glue.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 return; 96 return;
97 } else if (!IsProtocolSupportedForMedia(url_)) { 97 } else if (!IsProtocolSupportedForMedia(url_)) {
98 callback->Run(media::PIPELINE_ERROR_NETWORK); 98 callback->Run(media::PIPELINE_ERROR_NETWORK);
99 delete callback; 99 delete callback;
100 return; 100 return;
101 } 101 }
102 102
103 DCHECK(callback); 103 DCHECK(callback);
104 initialize_callback_.reset(callback); 104 initialize_callback_.reset(callback);
105 105
106 media_format_.SetAsString(media::MediaFormat::kURL, url);
107
108 // Post a task to complete the initialization task. 106 // Post a task to complete the initialization task.
109 render_loop_->PostTask(FROM_HERE, 107 render_loop_->PostTask(FROM_HERE,
110 NewRunnableMethod(this, &BufferedDataSource::InitializeTask)); 108 NewRunnableMethod(this, &BufferedDataSource::InitializeTask));
111 } 109 }
112 110
113 void BufferedDataSource::CancelInitialize() { 111 void BufferedDataSource::CancelInitialize() {
114 base::AutoLock auto_lock(lock_); 112 base::AutoLock auto_lock(lock_);
115 DCHECK(initialize_callback_.get()); 113 DCHECK(initialize_callback_.get());
116 114
117 initialize_callback_.reset(); 115 initialize_callback_.reset();
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 625
628 if (streaming_) { 626 if (streaming_) {
629 filter_host->SetStreaming(true); 627 filter_host->SetStreaming(true);
630 } else { 628 } else {
631 filter_host->SetTotalBytes(total_bytes_); 629 filter_host->SetTotalBytes(total_bytes_);
632 filter_host->SetBufferedBytes(buffered_bytes_); 630 filter_host->SetBufferedBytes(buffered_bytes_);
633 } 631 }
634 } 632 }
635 633
636 } // namespace webkit_glue 634 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/media/buffered_data_source.h ('k') | webkit/glue/media/simple_data_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698