Index: media/base/pipeline_impl.cc |
=================================================================== |
--- media/base/pipeline_impl.cc (revision 90607) |
+++ media/base/pipeline_impl.cc (working copy) |
@@ -14,7 +14,6 @@ |
#include "base/compiler_specific.h" |
#include "base/stl_util-inl.h" |
#include "base/synchronization/condition_variable.h" |
-#include "media/filters/rtc_video_decoder.h" |
#include "media/base/clock.h" |
#include "media/base/filter_collection.h" |
#include "media/base/media_format.h" |
@@ -617,7 +616,24 @@ |
pipeline_init_state_->composite_ = new CompositeFilter(message_loop_); |
pipeline_init_state_->composite_->set_host(this); |
- if (RTCVideoDecoder::IsUrlSupported(url)) { |
+ bool raw_media = true; |
scherkus (not reviewing)
2011/06/29 00:39:28
I believe you can replace all of this with a helpe
Ronghua
2011/06/29 20:36:39
Done.
|
+ if (url.length() < strlen(kRawMediaScheme)) { |
+ raw_media = false; |
+ } else { |
+ const char* url_cstr = url.c_str(); |
+ int s_begin = 0; |
+ int s_end = strlen(kRawMediaScheme); |
+ for (int i = s_begin; i < s_end; ++i) { |
+ const char c = url_cstr[i]; |
+ const char c_lower = (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c; |
+ if (!c_lower || c_lower != kRawMediaScheme[i]) { |
+ raw_media = false; |
+ break; |
+ } |
+ } |
+ } |
+ |
+ if (raw_media) { |
set_state(kInitVideoDecoder); |
InitializeVideoDecoder(NULL); |
} else { |