diff options
Diffstat (limited to 'media')
-rw-r--r-- | media/filters/chunk_demuxer_unittest.cc | 4 | ||||
-rw-r--r-- | media/filters/frame_processor_unittest.cc | 2 | ||||
-rw-r--r-- | media/filters/source_buffer_stream_unittest.cc | 16 | ||||
-rw-r--r-- | media/video/capture/mac/video_capture_device_factory_mac.mm | 8 | ||||
-rw-r--r-- | media/video/capture/video_capture_device.cc | 2 |
5 files changed, 18 insertions, 14 deletions
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc index f974241..7cf841a 100644 --- a/media/filters/chunk_demuxer_unittest.cc +++ b/media/filters/chunk_demuxer_unittest.cc @@ -449,7 +449,7 @@ class ChunkDemuxerTest : public ::testing::Test { block_info.flags = 0; block_info.duration = 0; - if (base::EndsWith(timestamp_str, "K", true)) { + if (base::EndsWith(timestamp_str, "K", base::CompareCase::SENSITIVE)) { block_info.flags = kWebMFlagKeyframe; // Remove the "K" off of the token. timestamp_str = timestamp_str.substr(0, timestamps[i].length() - 1); @@ -1082,7 +1082,7 @@ class ChunkDemuxerTest : public ::testing::Test { ss << "K"; // Handle preroll buffers. - if (base::EndsWith(timestamps[i], "P", true)) { + if (base::EndsWith(timestamps[i], "P", base::CompareCase::SENSITIVE)) { ASSERT_EQ(kInfiniteDuration(), buffer->discard_padding().first); ASSERT_EQ(base::TimeDelta(), buffer->discard_padding().second); ss << "P"; diff --git a/media/filters/frame_processor_unittest.cc b/media/filters/frame_processor_unittest.cc index cf54bd2..38539c1 100644 --- a/media/filters/frame_processor_unittest.cc +++ b/media/filters/frame_processor_unittest.cc @@ -104,7 +104,7 @@ class FrameProcessorTest : public testing::TestWithParam<bool> { BufferQueue buffers; for (size_t i = 0; i < timestamps.size(); i++) { bool is_keyframe = false; - if (base::EndsWith(timestamps[i], "K", true)) { + if (base::EndsWith(timestamps[i], "K", base::CompareCase::SENSITIVE)) { is_keyframe = true; // Remove the "K" off of the token. timestamps[i] = timestamps[i].substr(0, timestamps[i].length() - 1); diff --git a/media/filters/source_buffer_stream_unittest.cc b/media/filters/source_buffer_stream_unittest.cc index b0e9316..2fdcce2 100644 --- a/media/filters/source_buffer_stream_unittest.cc +++ b/media/filters/source_buffer_stream_unittest.cc @@ -306,7 +306,7 @@ class SourceBufferStreamTest : public testing::Test { } // Handle preroll buffers. - if (base::EndsWith(timestamps[i], "P", true)) { + if (base::EndsWith(timestamps[i], "P", base::CompareCase::SENSITIVE)) { ASSERT_TRUE(buffer->is_key_frame()); scoped_refptr<StreamParserBuffer> preroll_buffer; preroll_buffer.swap(buffer); @@ -500,40 +500,42 @@ class SourceBufferStreamTest : public testing::Test { bool is_duration_estimated = false; // Handle splice frame starts. - if (base::StartsWithASCII(timestamps[i], "S(", true)) { + if (base::StartsWith(timestamps[i], "S(", base::CompareCase::SENSITIVE)) { CHECK(!splice_frame); splice_frame = true; // Remove the "S(" off of the token. timestamps[i] = timestamps[i].substr(2, timestamps[i].length()); } - if (splice_frame && base::EndsWith(timestamps[i], ")", true)) { + if (splice_frame && + base::EndsWith(timestamps[i], ")", base::CompareCase::SENSITIVE)) { splice_frame = false; last_splice_frame = true; // Remove the ")" off of the token. timestamps[i] = timestamps[i].substr(0, timestamps[i].length() - 1); } // Handle config changes within the splice frame. - if (splice_frame && base::EndsWith(timestamps[i], "C", true)) { + if (splice_frame && + base::EndsWith(timestamps[i], "C", base::CompareCase::SENSITIVE)) { splice_config_id++; CHECK(splice_config_id < stream_->audio_configs_.size() || splice_config_id < stream_->video_configs_.size()); // Remove the "C" off of the token. timestamps[i] = timestamps[i].substr(0, timestamps[i].length() - 1); } - if (base::EndsWith(timestamps[i], "K", true)) { + if (base::EndsWith(timestamps[i], "K", base::CompareCase::SENSITIVE)) { is_keyframe = true; // Remove the "K" off of the token. timestamps[i] = timestamps[i].substr(0, timestamps[i].length() - 1); } // Handle preroll buffers. - if (base::EndsWith(timestamps[i], "P", true)) { + if (base::EndsWith(timestamps[i], "P", base::CompareCase::SENSITIVE)) { is_keyframe = true; has_preroll = true; // Remove the "P" off of the token. timestamps[i] = timestamps[i].substr(0, timestamps[i].length() - 1); } - if (base::EndsWith(timestamps[i], "E", true)) { + if (base::EndsWith(timestamps[i], "E", base::CompareCase::SENSITIVE)) { is_duration_estimated = true; // Remove the "E" off of the token. timestamps[i] = timestamps[i].substr(0, timestamps[i].length() - 1); diff --git a/media/video/capture/mac/video_capture_device_factory_mac.mm b/media/video/capture/mac/video_capture_device_factory_mac.mm index 1fbf8ef..443b7f3 100644 --- a/media/video/capture/mac/video_capture_device_factory_mac.mm +++ b/media/video/capture/mac/video_capture_device_factory_mac.mm @@ -35,8 +35,10 @@ static bool IsDeviceBlacklisted(const VideoCaptureDevice::Name& name) { bool is_device_blacklisted = false; for(size_t i = 0; !is_device_blacklisted && i < arraysize(kBlacklistedCameras); ++i) { - is_device_blacklisted = base::EndsWith(name.id(), - kBlacklistedCameras[i].unique_id_signature, false); + is_device_blacklisted = + base::EndsWith(name.id(), + kBlacklistedCameras[i].unique_id_signature, + base::CompareCase::INSENSITIVE_ASCII); } DVLOG_IF(2, is_device_blacklisted) << "Blacklisted camera: " << name.name() << ", id: " << name.id(); @@ -184,7 +186,7 @@ void VideoCaptureDeviceFactoryMac::GetDeviceSupportedFormats( for (size_t i = 0; i < arraysize(kBlacklistedCameras); ++i) { if (base::EndsWith(device.id(), kBlacklistedCameras[i].unique_id_signature, - false)) { + base::CompareCase::INSENSITIVE_ASCII)) { supported_formats->push_back(media::VideoCaptureFormat( gfx::Size(kBlacklistedCameras[i].capture_width, kBlacklistedCameras[i].capture_height), diff --git a/media/video/capture/video_capture_device.cc b/media/video/capture/video_capture_device.cc index e474489..cb03dba 100644 --- a/media/video/capture/video_capture_device.cc +++ b/media/video/capture/video_capture_device.cc @@ -14,7 +14,7 @@ const std::string VideoCaptureDevice::Name::GetNameAndModel() const { if (model_id.empty()) return device_name_; const std::string suffix = " (" + model_id + ")"; - if (base::EndsWith(device_name_, suffix, true /* case sensitive */)) + if (base::EndsWith(device_name_, suffix, base::CompareCase::SENSITIVE)) return device_name_; return device_name_ + suffix; } |