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

Unified Diff: media/capture/video/file_video_capture_device.cc

Issue 2081653004: Revert of Re-Reland: Make media/capture gn and gyps produce components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: media/capture/video/file_video_capture_device.cc
diff --git a/media/capture/video/file_video_capture_device.cc b/media/capture/video/file_video_capture_device.cc
index dc249a00e9a0a7c6dc3443a236108910eba5400c..e4298066fdf4f3c2036d97c8b8bdf484d6f7f6fa 100644
--- a/media/capture/video/file_video_capture_device.cc
+++ b/media/capture/video/file_video_capture_device.cc
@@ -179,14 +179,14 @@
}
std::string header(kY4MHeaderMaxSize, '\0');
- file_->Read(0, &header[0], static_cast<int>(header.size()));
+ file_->Read(0, &header[0], header.size());
const size_t header_end = header.find(kY4MSimpleFrameDelimiter);
CHECK_NE(header_end, header.npos);
ParseY4MTags(header, capture_format);
first_frame_byte_index_ = header_end + kY4MSimpleFrameDelimiterSize;
current_byte_index_ = first_frame_byte_index_;
- frame_size_ = static_cast<int>(capture_format->ImageAllocationSize());
+ frame_size_ = capture_format->ImageAllocationSize();
return true;
}
@@ -230,7 +230,7 @@
if (!ParseJpegStream(mapped_file_->data(), mapped_file_->length(), &result))
return false;
- frame_size_ = static_cast<int>(result.image_size);
+ frame_size_ = result.image_size;
if (frame_size_ > static_cast<int>(mapped_file_->length())) {
LOG(ERROR) << "File is incomplete";
return false;
@@ -255,7 +255,7 @@
&result)) {
return nullptr;
}
- *frame_size = frame_size_ = static_cast<int>(result.image_size);
+ *frame_size = frame_size_ = result.image_size;
current_byte_index_ += frame_size_;
// Reset the pointer to play repeatedly.
if (current_byte_index_ >= mapped_file_->length())
« no previous file with comments | « media/capture/video/file_video_capture_device.h ('k') | media/capture/video/file_video_capture_device_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698