| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/common/extensions/url_pattern.h" | 9 #include "chrome/common/extensions/url_pattern.h" |
| 10 #include "chrome/renderer/media/buffered_data_source.h" | 10 #include "chrome/renderer/media/buffered_data_source.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 "null", // TODO(abarth): provide main_frame_origin | 102 "null", // TODO(abarth): provide main_frame_origin |
| 103 header, | 103 header, |
| 104 net::LOAD_BYPASS_CACHE, | 104 net::LOAD_BYPASS_CACHE, |
| 105 base::GetCurrentProcId(), | 105 base::GetCurrentProcId(), |
| 106 ResourceType::MEDIA, | 106 ResourceType::MEDIA, |
| 107 0, | 107 0, |
| 108 // TODO(michaeln): delegate->mediaplayer->frame-> | 108 // TODO(michaeln): delegate->mediaplayer->frame-> |
| 109 // app_cache_context()->context_id() | 109 // app_cache_context()->context_id() |
| 110 // For now don't service media resource requests from the appcache. | 110 // For now don't service media resource requests from the appcache. |
| 111 WebAppCacheContext::kNoAppCacheContextId, | 111 WebAppCacheContext::kNoAppCacheContextId, |
| 112 route_id_)); | 112 route_id_, |
| 113 // TODO(jungshik): It might be useful in some cases |
| 114 // (e.g. interpreting ID3v1 tags in mp3), but for now leave it empty. |
| 115 "")); |
| 113 | 116 |
| 114 // We may receive stop signal while we are inside this method, it's because | 117 // We may receive stop signal while we are inside this method, it's because |
| 115 // Start() may get called on demuxer thread while Stop() is called on | 118 // Start() may get called on demuxer thread while Stop() is called on |
| 116 // pipeline thread, so we want to protect the posting of OnStart() task | 119 // pipeline thread, so we want to protect the posting of OnStart() task |
| 117 // with a lock. | 120 // with a lock. |
| 118 bool task_posted = false; | 121 bool task_posted = false; |
| 119 { | 122 { |
| 120 AutoLock auto_lock(lock_); | 123 AutoLock auto_lock(lock_); |
| 121 if (!stopped_) { | 124 if (!stopped_) { |
| 122 task_posted = true; | 125 task_posted = true; |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 host_->InitializationComplete(); | 646 host_->InitializationComplete(); |
| 644 } else { | 647 } else { |
| 645 host_->Error(media::PIPELINE_ERROR_NETWORK); | 648 host_->Error(media::PIPELINE_ERROR_NETWORK); |
| 646 } | 649 } |
| 647 } | 650 } |
| 648 } | 651 } |
| 649 | 652 |
| 650 const media::MediaFormat& BufferedDataSource::media_format() { | 653 const media::MediaFormat& BufferedDataSource::media_format() { |
| 651 return media_format_; | 654 return media_format_; |
| 652 } | 655 } |
| OLD | NEW |