OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef OPENH264_TESTING_H264_CODEC_TESTER_H_ |
| 6 #define OPENH264_TESTING_H264_CODEC_TESTER_H_ |
| 7 |
| 8 #include "openh264/src/codec/api/svc/codec_api.h" |
| 9 #include "openh264/src/codec/api/svc/codec_app_def.h" |
| 10 #include "openh264/src/codec/api/svc/codec_def.h" |
| 11 #include "openh264/testing/h264_encoder_impl.h" |
| 12 #include "openh264/testing/h264_decoder_impl.h" |
| 13 |
| 14 namespace openh264 { |
| 15 |
| 16 class H264CodecTester : public EncodedImageCallback, |
| 17 public DecodedImageCallback { |
| 18 public: |
| 19 H264CodecTester(); |
| 20 ~H264CodecTester(); |
| 21 |
| 22 bool Init(unsigned short width, unsigned short height); |
| 23 |
| 24 bool Encode(const VideoFrame& frame); |
| 25 VideoFrame* Decode(); |
| 26 |
| 27 private: |
| 28 int32_t Encoded(const EncodedImage& encoded_image, |
| 29 const CodecSpecificInfo* codec_specific_info, |
| 30 const RTPFragmentationHeader* fragmentation) override; |
| 31 int32_t Decoded(VideoFrame& decoded_image) override; |
| 32 |
| 33 H264EncoderImpl encoder_; |
| 34 H264DecoderImpl decoder_; |
| 35 const EncodedImage* last_encoded_image_; |
| 36 VideoFrame* last_decoded_image_; |
| 37 }; |
| 38 |
| 39 } // namespace openh264 |
| 40 |
| 41 #endif // OPENH264_TESTING_H264_CODEC_TESTER_H_ |
OLD | NEW |