summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-23 19:27:50 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-23 19:27:50 +0000
commit27573cfc88abde2ae103901ffdff5f038123555a (patch)
tree2e731cc4fa02f1dce0b6593f8dc52eceae1a0a4b /media
parent5cbeb5091b6fad36d0e0ca5ab4d7f8fa55ea6f7c (diff)
downloadchromium_src-27573cfc88abde2ae103901ffdff5f038123555a.zip
chromium_src-27573cfc88abde2ae103901ffdff5f038123555a.tar.gz
chromium_src-27573cfc88abde2ae103901ffdff5f038123555a.tar.bz2
Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>.
In r174057, enne@ added support for implicit testing to scoped_ptr<>. Removes these in media/. BUG=232084 Review URL: https://chromiumcodereview.appspot.com/13870018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/audio/audio_input_volume_unittest.cc2
-rw-r--r--media/audio/audio_manager_base.cc2
-rw-r--r--media/audio/linux/audio_manager_linux.cc2
-rw-r--r--media/audio/win/audio_low_latency_output_win.cc4
-rw-r--r--media/audio/win/audio_unified_win.cc4
-rw-r--r--media/base/audio_renderer_mixer_input_unittest.cc2
-rw-r--r--media/crypto/aes_decryptor.cc4
-rw-r--r--media/filters/gpu_video_decoder.cc14
-rw-r--r--media/filters/source_buffer_stream.cc2
-rw-r--r--media/test/ffmpeg_tests/ffmpeg_tests.cc4
-rw-r--r--media/tools/media_bench/media_bench.cc4
-rw-r--r--media/video/capture/win/video_capture_device_win.cc2
-rw-r--r--media/webm/webm_cluster_parser.cc2
-rw-r--r--media/webm/webm_stream_parser.cc2
-rw-r--r--media/webm/webm_tracks_parser.cc2
15 files changed, 26 insertions, 26 deletions
diff --git a/media/audio/audio_input_volume_unittest.cc b/media/audio/audio_input_volume_unittest.cc
index d52542e..18cc603 100644
--- a/media/audio/audio_input_volume_unittest.cc
+++ b/media/audio/audio_input_volume_unittest.cc
@@ -54,7 +54,7 @@ class AudioInputVolumeTest : public ::testing::Test {
if (!CoreAudioUtil::IsSupported())
return false;
#endif
- if (!audio_manager_.get())
+ if (!audio_manager_)
return false;
return audio_manager_->HasAudioInputDevices();
diff --git a/media/audio/audio_manager_base.cc b/media/audio/audio_manager_base.cc
index dab4b61..87004f7 100644
--- a/media/audio/audio_manager_base.cc
+++ b/media/audio/audio_manager_base.cc
@@ -276,7 +276,7 @@ void AudioManagerBase::Shutdown() {
audio_thread_.swap(audio_thread);
}
- if (!audio_thread.get())
+ if (!audio_thread)
return;
CHECK_NE(base::MessageLoop::current(), audio_thread->message_loop());
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc
index 9a22f7d..c898f81 100644
--- a/media/audio/linux/audio_manager_linux.cc
+++ b/media/audio/linux/audio_manager_linux.cc
@@ -176,7 +176,7 @@ void AudioManagerLinux::GetAlsaDevicesInfo(
media::AudioDeviceName name;
name.unique_id = unique_device_name.get();
- if (desc.get()) {
+ if (desc) {
// Use the more user friendly description as name.
// Replace '\n' with '-'.
char* pret = strchr(desc.get(), '\n');
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc
index 04b5dd2..a9addac 100644
--- a/media/audio/win/audio_low_latency_output_win.cc
+++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -284,7 +284,7 @@ void WASAPIAudioOutputStream::Start(AudioSourceCallback* callback) {
CHECK(callback);
CHECK(opened_);
- if (render_thread_.get()) {
+ if (render_thread_) {
CHECK_EQ(callback, source_);
return;
}
@@ -324,7 +324,7 @@ void WASAPIAudioOutputStream::Start(AudioSourceCallback* callback) {
void WASAPIAudioOutputStream::Stop() {
VLOG(1) << "WASAPIAudioOutputStream::Stop()";
DCHECK_EQ(GetCurrentThreadId(), creating_thread_id_);
- if (!render_thread_.get())
+ if (!render_thread_)
return;
// Stop output audio streaming.
diff --git a/media/audio/win/audio_unified_win.cc b/media/audio/win/audio_unified_win.cc
index 59b98d0..469c672 100644
--- a/media/audio/win/audio_unified_win.cc
+++ b/media/audio/win/audio_unified_win.cc
@@ -223,7 +223,7 @@ void WASAPIUnifiedStream::Start(AudioSourceCallback* callback) {
CHECK(callback);
CHECK(opened_);
- if (audio_io_thread_.get()) {
+ if (audio_io_thread_) {
CHECK_EQ(callback, source_);
return;
}
@@ -268,7 +268,7 @@ void WASAPIUnifiedStream::Start(AudioSourceCallback* callback) {
void WASAPIUnifiedStream::Stop() {
DCHECK_EQ(GetCurrentThreadId(), creating_thread_id_);
- if (!audio_io_thread_.get())
+ if (!audio_io_thread_)
return;
// Stop input audio streaming.
diff --git a/media/base/audio_renderer_mixer_input_unittest.cc b/media/base/audio_renderer_mixer_input_unittest.cc
index 021285b..aa34fbc 100644
--- a/media/base/audio_renderer_mixer_input_unittest.cc
+++ b/media/base/audio_renderer_mixer_input_unittest.cc
@@ -41,7 +41,7 @@ class AudioRendererMixerInputTest : public testing::Test {
}
AudioRendererMixer* GetMixer(const AudioParameters& params) {
- if (!mixer_.get()) {
+ if (!mixer_) {
scoped_refptr<MockAudioRendererSink> sink = new MockAudioRendererSink();
EXPECT_CALL(*sink, Start());
EXPECT_CALL(*sink, Stop());
diff --git a/media/crypto/aes_decryptor.cc b/media/crypto/aes_decryptor.cc
index 430568c..29faca0 100644
--- a/media/crypto/aes_decryptor.cc
+++ b/media/crypto/aes_decryptor.cc
@@ -187,7 +187,7 @@ void AesDecryptor::AddKey(const std::string& key_system,
init_data_length);
std::string key_string(reinterpret_cast<const char*>(key) , key_length);
scoped_ptr<DecryptionKey> decryption_key(new DecryptionKey(key_string));
- if (!decryption_key.get()) {
+ if (!decryption_key) {
DVLOG(1) << "Could not create key.";
key_error_cb_.Run(key_system, session_id, Decryptor::kUnknownError, 0);
return;
@@ -329,7 +329,7 @@ bool AesDecryptor::DecryptionKey::Init() {
CHECK(!secret_.empty());
decryption_key_.reset(crypto::SymmetricKey::Import(
crypto::SymmetricKey::AES, secret_));
- if (!decryption_key_.get())
+ if (!decryption_key_)
return false;
return true;
}
diff --git a/media/filters/gpu_video_decoder.cc b/media/filters/gpu_video_decoder.cc
index 555164e..6e5d0ec 100644
--- a/media/filters/gpu_video_decoder.cc
+++ b/media/filters/gpu_video_decoder.cc
@@ -190,7 +190,7 @@ void GpuVideoDecoder::Reset(const base::Closure& closure) {
// Throw away any already-decoded, not-yet-delivered frames.
ready_video_frames_.clear();
- if (!vda_.get()) {
+ if (!vda_) {
gvd_loop_proxy_->PostTask(FROM_HERE, closure);
return;
}
@@ -207,7 +207,7 @@ void GpuVideoDecoder::Reset(const base::Closure& closure) {
void GpuVideoDecoder::Stop(const base::Closure& closure) {
DCHECK(gvd_loop_proxy_->BelongsToCurrentThread());
- if (vda_.get())
+ if (vda_)
DestroyVDA();
if (!pending_read_cb_.is_null())
EnqueueFrameAndTriggerFrameDelivery(VideoFrame::CreateEmptyFrame());
@@ -335,7 +335,7 @@ void GpuVideoDecoder::Read(const ReadCB& read_cb) {
return;
}
- if (!vda_.get()) {
+ if (!vda_) {
base::ResetAndReturn(&pending_read_cb_).Run(
kOk, VideoFrame::CreateEmptyFrame());
return;
@@ -386,7 +386,7 @@ void GpuVideoDecoder::RequestBufferDecode(
return;
}
- if (!vda_.get()) {
+ if (!vda_) {
EnqueueFrameAndTriggerFrameDelivery(VideoFrame::CreateEmptyFrame());
return;
}
@@ -487,7 +487,7 @@ void GpuVideoDecoder::ProvidePictureBuffers(uint32 count,
return;
}
- if (!vda_.get())
+ if (!vda_)
return;
CHECK_EQ(available_pictures_, -1);
@@ -580,7 +580,7 @@ void GpuVideoDecoder::ReusePictureBuffer(int64 picture_buffer_id) {
CHECK_GE(available_pictures_, 0);
available_pictures_++;
- if (!vda_.get())
+ if (!vda_)
return;
vda_loop_proxy_->PostTask(FROM_HERE, base::Bind(
&VideoDecodeAccelerator::ReusePictureBuffer, weak_vda_,
@@ -691,7 +691,7 @@ void GpuVideoDecoder::NotifyResetDone() {
void GpuVideoDecoder::NotifyError(media::VideoDecodeAccelerator::Error error) {
DCHECK(gvd_loop_proxy_->BelongsToCurrentThread());
- if (!vda_.get())
+ if (!vda_)
return;
DLOG(ERROR) << "VDA Error: " << error;
diff --git a/media/filters/source_buffer_stream.cc b/media/filters/source_buffer_stream.cc
index c083454..bf33437 100644
--- a/media/filters/source_buffer_stream.cc
+++ b/media/filters/source_buffer_stream.cc
@@ -810,7 +810,7 @@ void SourceBufferStream::ResolveEndOverlap(
AddToRanges(new_next_range);
// If we didn't overlap a selected range, return.
- if (selected_range_ != overlapped_range.get())
+ if (selected_range_ != overlapped_range)
return;
// If the |overlapped_range| transfers its next buffer position to
diff --git a/media/test/ffmpeg_tests/ffmpeg_tests.cc b/media/test/ffmpeg_tests/ffmpeg_tests.cc
index 7bee621..222c987 100644
--- a/media/test/ffmpeg_tests/ffmpeg_tests.cc
+++ b/media/test/ffmpeg_tests/ffmpeg_tests.cc
@@ -228,7 +228,7 @@ int main(int argc, const char** argv) {
// Buffer used for audio decoding.
scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> audio_frame(
avcodec_alloc_frame());
- if (!audio_frame.get()) {
+ if (!audio_frame) {
std::cerr << "Error: avcodec_alloc_frame for "
<< in_path.value() << std::endl;
return 1;
@@ -237,7 +237,7 @@ int main(int argc, const char** argv) {
// Buffer used for video decoding.
scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> video_frame(
avcodec_alloc_frame());
- if (!video_frame.get()) {
+ if (!video_frame) {
std::cerr << "Error: avcodec_alloc_frame for "
<< in_path.value() << std::endl;
return 1;
diff --git a/media/tools/media_bench/media_bench.cc b/media/tools/media_bench/media_bench.cc
index 858f65d..d4e4c4f 100644
--- a/media/tools/media_bench/media_bench.cc
+++ b/media/tools/media_bench/media_bench.cc
@@ -336,7 +336,7 @@ int main(int argc, const char** argv) {
// Buffer used for audio decoding.
scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> audio_frame(
avcodec_alloc_frame());
- if (!audio_frame.get()) {
+ if (!audio_frame) {
std::cerr << "Error: avcodec_alloc_frame for "
<< in_path.value() << std::endl;
return 1;
@@ -345,7 +345,7 @@ int main(int argc, const char** argv) {
// Buffer used for video decoding.
scoped_ptr_malloc<AVFrame, media::ScopedPtrAVFree> video_frame(
avcodec_alloc_frame());
- if (!video_frame.get()) {
+ if (!video_frame) {
std::cerr << "Error: avcodec_alloc_frame for "
<< in_path.value() << std::endl;
return 1;
diff --git a/media/video/capture/win/video_capture_device_win.cc b/media/video/capture/win/video_capture_device_win.cc
index 243ad3c..30c9917 100644
--- a/media/video/capture/win/video_capture_device_win.cc
+++ b/media/video/capture/win/video_capture_device_win.cc
@@ -531,7 +531,7 @@ bool VideoCaptureDeviceWin::CreateCapabilityMap() {
time_per_frame = h->AvgTimePerFrame;
// Try to get the max frame rate from IAMVideoControl.
- if (video_control.get()) {
+ if (video_control) {
LONGLONG* max_fps_ptr;
LONG list_size;
SIZE size;
diff --git a/media/webm/webm_cluster_parser.cc b/media/webm/webm_cluster_parser.cc
index a0b95a8..1d47720 100644
--- a/media/webm/webm_cluster_parser.cc
+++ b/media/webm/webm_cluster_parser.cc
@@ -211,7 +211,7 @@ bool WebMClusterParser::OnBinary(int id, const uint8* data, int size) {
if (id != kWebMIdBlock)
return true;
- if (block_data_.get()) {
+ if (block_data_) {
MEDIA_LOG(log_cb_) << "More than 1 Block in a BlockGroup is not supported.";
return false;
}
diff --git a/media/webm/webm_stream_parser.cc b/media/webm/webm_stream_parser.cc
index 18310dd..fb070a9 100644
--- a/media/webm/webm_stream_parser.cc
+++ b/media/webm/webm_stream_parser.cc
@@ -219,7 +219,7 @@ int WebMStreamParser::ParseInfoAndTracks(const uint8* data, int size) {
}
int WebMStreamParser::ParseCluster(const uint8* data, int size) {
- if (!cluster_parser_.get())
+ if (!cluster_parser_)
return -1;
int id;
diff --git a/media/webm/webm_tracks_parser.cc b/media/webm/webm_tracks_parser.cc
index 7703504..7d11f69 100644
--- a/media/webm/webm_tracks_parser.cc
+++ b/media/webm/webm_tracks_parser.cc
@@ -146,7 +146,7 @@ bool WebMTracksParser::OnListEnd(int id) {
}
std::string encryption_key_id;
- if (track_content_encodings_client_.get()) {
+ if (track_content_encodings_client_) {
DCHECK(!track_content_encodings_client_->content_encodings().empty());
// If we have multiple ContentEncoding in one track. Always choose the
// key id in the first ContentEncoding as the key id of the track.