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

Unified Diff: media/cast/test/simulator.cc

Issue 892383002: RELAND: [Cast] Software encoder support for varying video frame sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix for 'access to uninitialized memory' error. Created 5 years, 11 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
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/test/utility/video_utility.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/simulator.cc
diff --git a/media/cast/test/simulator.cc b/media/cast/test/simulator.cc
index d63f6e528a199f0c36b81c9336bfb90e9ccf1bcd..1e01085dddc6526e7ec37ef8165425271433689c 100644
--- a/media/cast/test/simulator.cc
+++ b/media/cast/test/simulator.cc
@@ -218,7 +218,11 @@ class EncodedVideoFrameTracker : public RawEventSubscriber {
void AppendYuvToFile(const base::FilePath& path,
scoped_refptr<media::VideoFrame> frame) {
// Write YUV420 format to file.
- std::string header = "FRAME\n";
+ std::string header;
+ base::StringAppendF(
+ &header, "FRAME W%d H%d\n",
+ frame->coded_size().width(),
+ frame->coded_size().height());
AppendToFile(path, header.data(), header.size());
AppendToFile(path,
reinterpret_cast<char*>(frame->data(media::VideoFrame::kYPlane)),
@@ -514,11 +518,7 @@ void RunSimulation(const base::FilePath& source_path,
LOG(INFO) << "Writing YUV output to file: " << yuv_output_path.value();
// Write YUV4MPEG2 header.
- std::string header;
- base::StringAppendF(
- &header, "YUV4MPEG2 W%d H%d F30000:1001 Ip A1:1 C420\n",
- media_source.get_video_config().width,
- media_source.get_video_config().height);
+ const std::string header("YUV4MPEG2 W1280 H720 F30000:1001 Ip A1:1 C420\n");
AppendToFile(yuv_output_path, header.data(), header.size());
}
« no previous file with comments | « media/cast/test/sender.cc ('k') | media/cast/test/utility/video_utility.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698