
Clang version changed 223108:230914
Details: e144d30..6fdb142
/tools/clang/scripts/update.sh
Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h
The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h" -o -name "*.cc*" -o -name "*.mm*"`
which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override
Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h
Remaining uses of OVERRIDE was fixed by search+replace.
Manual edits were done to fix virtual destructors that were
overriding inherited ones.
Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc
This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.
BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/41069004
Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
112 lines
3.3 KiB
C++
112 lines
3.3 KiB
C++
/*
|
|
* Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*
|
|
*/
|
|
|
|
#ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_
|
|
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_
|
|
|
|
#include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h"
|
|
|
|
#include "vpx/vpx_decoder.h"
|
|
#include "vpx/vpx_encoder.h"
|
|
|
|
namespace webrtc {
|
|
|
|
class VP9EncoderImpl : public VP9Encoder {
|
|
public:
|
|
VP9EncoderImpl();
|
|
|
|
virtual ~VP9EncoderImpl();
|
|
|
|
int Release() override;
|
|
|
|
int InitEncode(const VideoCodec* codec_settings,
|
|
int number_of_cores,
|
|
size_t max_payload_size) override;
|
|
|
|
int Encode(const I420VideoFrame& input_image,
|
|
const CodecSpecificInfo* codec_specific_info,
|
|
const std::vector<VideoFrameType>* frame_types) override;
|
|
|
|
int RegisterEncodeCompleteCallback(EncodedImageCallback* callback) override;
|
|
|
|
int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override;
|
|
|
|
int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate) override;
|
|
|
|
private:
|
|
// Determine number of encoder threads to use.
|
|
int NumberOfThreads(int width, int height, int number_of_cores);
|
|
|
|
// Call encoder initialize function and set control settings.
|
|
int InitAndSetControlSettings(const VideoCodec* inst);
|
|
|
|
void PopulateCodecSpecific(CodecSpecificInfo* codec_specific,
|
|
const vpx_codec_cx_pkt& pkt,
|
|
uint32_t timestamp);
|
|
|
|
int GetEncodedPartitions(const I420VideoFrame& input_image);
|
|
|
|
// Determine maximum target for Intra frames
|
|
//
|
|
// Input:
|
|
// - optimal_buffer_size : Optimal buffer size
|
|
// Return Value : Max target size for Intra frames represented as
|
|
// percentage of the per frame bandwidth
|
|
uint32_t MaxIntraTarget(uint32_t optimal_buffer_size);
|
|
|
|
EncodedImage encoded_image_;
|
|
EncodedImageCallback* encoded_complete_callback_;
|
|
VideoCodec codec_;
|
|
bool inited_;
|
|
int64_t timestamp_;
|
|
uint16_t picture_id_;
|
|
int cpu_speed_;
|
|
uint32_t rc_max_intra_target_;
|
|
vpx_codec_ctx_t* encoder_;
|
|
vpx_codec_enc_cfg_t* config_;
|
|
vpx_image_t* raw_;
|
|
};
|
|
|
|
|
|
class VP9DecoderImpl : public VP9Decoder {
|
|
public:
|
|
VP9DecoderImpl();
|
|
|
|
virtual ~VP9DecoderImpl();
|
|
|
|
int InitDecode(const VideoCodec* inst, int number_of_cores) override;
|
|
|
|
int Decode(const EncodedImage& input_image,
|
|
bool missing_frames,
|
|
const RTPFragmentationHeader* fragmentation,
|
|
const CodecSpecificInfo* codec_specific_info,
|
|
int64_t /*render_time_ms*/) override;
|
|
|
|
int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override;
|
|
|
|
int Release() override;
|
|
|
|
int Reset() override;
|
|
|
|
private:
|
|
int ReturnFrame(const vpx_image_t* img, uint32_t timeStamp);
|
|
|
|
I420VideoFrame decoded_image_;
|
|
DecodedImageCallback* decode_complete_callback_;
|
|
bool inited_;
|
|
vpx_codec_ctx_t* decoder_;
|
|
VideoCodec codec_;
|
|
bool key_frame_required_;
|
|
};
|
|
} // namespace webrtc
|
|
|
|
#endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_
|