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

Side by Side Diff: third_party/openh264/testing/h264_decoder_impl.h

Issue 1446453004: Adding third_party/openh264 build files for encoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase with master Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 *
10 */
11
12 // TODO(hbos): This is essentially a copy of an decoder class in WebRTC that as
13 // of this statement has not yet landed, but that I want to have accessible in
14 // Chromium before that CL lands. This is because I use it in order to validate
15 // the build files for OpenH264 and the WebRTC encoder/decoder CL cannot land
16 // until I can build OpenH264 from source. Once the build files are stable I
17 // will land both CLs and remove this copy of the decoder.
18
19 #ifndef OPENH264_TESTING_H264_DECODER_IMPL_H_
20 #define OPENH264_TESTING_H264_DECODER_IMPL_H_
21
22 #include "webrtc/modules/video_coding/codecs/h264/include/h264.h"
23
24 class ISVCDecoder;
25
26 using webrtc::CodecSpecificInfo;
27 using webrtc::DecodedImageCallback;
28 using webrtc::EncodedImage;
29 using webrtc::RTPFragmentationHeader;
30 using webrtc::VideoCodec;
31 using webrtc::VideoDecoder;
32 using webrtc::VideoFrame;
33
34 namespace openh264 {
35
36 class H264DecoderImpl : public webrtc::H264Decoder {
37 public:
38 H264DecoderImpl();
39 ~H264DecoderImpl() override;
40
41 // |number_of_cores| is ignored. |codec_settings| is also ignored except if
42 // it's not null then |codec_settings->codecType| must be kVideoCodecH264.
43 int32_t InitDecode(const VideoCodec* codec_settings,
44 int32_t /*number_of_cores*/) override;
45 int32_t Release() override;
46 int32_t Reset() override;
47
48 int32_t RegisterDecodeCompleteCallback(
49 DecodedImageCallback* callback) override;
50
51 // |missing_frames|, |fragmentation| and |render_time_ms| are ignored.
52 int32_t Decode(const EncodedImage& input_image,
53 bool /*missing_frames*/,
54 const RTPFragmentationHeader* /*fragmentation*/,
55 const CodecSpecificInfo* codec_specific_info = nullptr,
torbjorng 2015/11/18 14:41:09 Default parameters are discouraged. Furthermore,
hbos_chromium 2015/11/18 15:55:04 I've seen them used the VideoDecoder parent class
56 int64_t render_time_ms = -1) override;
57
58 bool IsInitialized();
59
60 private:
61 ISVCDecoder* openh264_decoder_;
62
63 VideoFrame decoded_image_;
64 DecodedImageCallback* decoded_image_callback_;
65 };
66
67 } // namespace openh264
68
69 #endif // OPENH264_TESTING_H264_DECODER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698