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

Unified Diff: webrtc/test/testsupport/frame_writer.h

Issue 2708103002: Revert of Add optional visualization file writers to VideoProcessor tests. (Closed)
Patch Set: Created 3 years, 10 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 | « webrtc/test/testsupport/frame_reader_unittest.cc ('k') | webrtc/test/testsupport/frame_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/testsupport/frame_writer.h
diff --git a/webrtc/test/testsupport/frame_writer.h b/webrtc/test/testsupport/frame_writer.h
index 76298498ac68bc27ae407316639c0e36c75fb52d..8a6b1c215259a0bede437dc9ab2eb94b688c4ae2 100644
--- a/webrtc/test/testsupport/frame_writer.h
+++ b/webrtc/test/testsupport/frame_writer.h
@@ -42,44 +42,26 @@
virtual size_t FrameLength() = 0;
};
-// Writes raw I420 frames in sequence.
-class YuvFrameWriterImpl : public FrameWriter {
+class FrameWriterImpl : public FrameWriter {
public:
// Creates a file handler. The input file is assumed to exist and be readable
// and the output file must be writable.
// Parameters:
// output_filename The file to write. Will be overwritten if already
// existing.
- // width, height Size of each frame to read.
- YuvFrameWriterImpl(std::string output_filename, int width, int height);
- ~YuvFrameWriterImpl() override;
+ // frame_length_in_bytes The size of each frame.
+ // For YUV: 3*width*height/2
+ FrameWriterImpl(std::string output_filename, size_t frame_length_in_bytes);
+ ~FrameWriterImpl() override;
bool Init() override;
bool WriteFrame(uint8_t* frame_buffer) override;
void Close() override;
size_t FrameLength() override;
- protected:
- const std::string output_filename_;
+ private:
+ std::string output_filename_;
size_t frame_length_in_bytes_;
- const int width_;
- const int height_;
FILE* output_file_;
-};
-
-// Writes raw I420 frames in sequence, but with Y4M file and frame headers for
-// more convenient playback in external media players.
-class Y4mFrameWriterImpl : public YuvFrameWriterImpl {
- public:
- Y4mFrameWriterImpl(std::string output_filename,
- int width,
- int height,
- int frame_rate);
- ~Y4mFrameWriterImpl() override;
- bool Init() override;
- bool WriteFrame(uint8_t* frame_buffer) override;
-
- private:
- const int frame_rate_;
};
} // namespace test
« no previous file with comments | « webrtc/test/testsupport/frame_reader_unittest.cc ('k') | webrtc/test/testsupport/frame_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698