summaryrefslogtreecommitdiff
path: root/vp9/simple_encode.h
diff options
context:
space:
mode:
authorangiebird <angiebird@google.com>2020-02-03 16:44:43 -0800
committerangiebird <angiebird@google.com>2020-02-05 16:12:32 -0800
commit2c465567e6c75ba675e922110e27c80c0d0a63ad (patch)
treeb03d313fce1e45eddc78cf453c478042a3b4c340 /vp9/simple_encode.h
parent8a5cb084e6e40ba0f6e979843a599bae85a24812 (diff)
downloadlibvpx-2c465567e6c75ba675e922110e27c80c0d0a63ad.tar.gz
libvpx-2c465567e6c75ba675e922110e27c80c0d0a63ad.tar.bz2
libvpx-2c465567e6c75ba675e922110e27c80c0d0a63ad.zip
Let SimpleEncode be able to output bitstream
Add outfile_path to SimpleEncode() with default value NULL. The encoder will only output bitstream when outfile_path is set. Change-Id: Ic68e5358ea454358c510bb0ae214f4201cb3db39
Diffstat (limited to 'vp9/simple_encode.h')
-rw-r--r--vp9/simple_encode.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/vp9/simple_encode.h b/vp9/simple_encode.h
index 741c49c7e..5d8f87676 100644
--- a/vp9/simple_encode.h
+++ b/vp9/simple_encode.h
@@ -202,9 +202,11 @@ struct GroupOfPicture {
class SimpleEncode {
public:
+ // When outfile_path is set, the encoder will output the bitstream in ivf
+ // format.
SimpleEncode(int frame_width, int frame_height, int frame_rate_num,
int frame_rate_den, int target_bitrate, int num_frames,
- const char *infile_path);
+ const char *infile_path, const char *outfile_path = NULL);
~SimpleEncode();
SimpleEncode(SimpleEncode &) = delete;
SimpleEncode &operator=(const SimpleEncode &) = delete;
@@ -268,7 +270,8 @@ class SimpleEncode {
int frame_rate_den_;
int target_bitrate_;
int num_frames_;
- std::FILE *file_;
+ std::FILE *in_file_;
+ std::FILE *out_file_;
std::unique_ptr<EncodeImpl> impl_ptr_;
GroupOfPicture group_of_picture_;