| Index: webrtc/modules/video_coding/generic_encoder.h
|
| diff --git a/webrtc/modules/video_coding/generic_encoder.h b/webrtc/modules/video_coding/generic_encoder.h
|
| index e96d99578150f7b531445e14cb35f46995070801..d6fba488e72bb71106a81ccbd09f124393e9cabd 100644
|
| --- a/webrtc/modules/video_coding/generic_encoder.h
|
| +++ b/webrtc/modules/video_coding/generic_encoder.h
|
| @@ -33,60 +33,35 @@ struct EncoderParameters {
|
| uint32_t input_frame_rate;
|
| };
|
|
|
| -/*************************************/
|
| -/* VCMEncodeFrameCallback class */
|
| -/***********************************/
|
| class VCMEncodedFrameCallback : public EncodedImageCallback {
|
| public:
|
| - explicit VCMEncodedFrameCallback(
|
| - EncodedImageCallback* post_encode_callback);
|
| - virtual ~VCMEncodedFrameCallback();
|
| -
|
| - /*
|
| - * Callback implementation - codec encode complete
|
| - */
|
| - int32_t Encoded(
|
| - const EncodedImage& encodedImage,
|
| - const CodecSpecificInfo* codecSpecificInfo = NULL,
|
| - const RTPFragmentationHeader* fragmentationHeader = NULL);
|
| - /*
|
| - * Callback implementation - generic encoder encode complete
|
| - */
|
| - int32_t SetTransportCallback(VCMPacketizationCallback* transport);
|
| - /**
|
| - * Set media Optimization
|
| - */
|
| - void SetMediaOpt(media_optimization::MediaOptimization* mediaOpt);
|
| -
|
| - void SetPayloadType(uint8_t payloadType) {
|
| - _payloadType = payloadType;
|
| - }
|
| -
|
| - void SetInternalSource(bool internalSource) {
|
| - _internalSource = internalSource;
|
| - }
|
| -
|
| - void SetRotation(VideoRotation rotation) { _rotation = rotation; }
|
| - void SignalLastEncoderImplementationUsed(
|
| - const char* encoder_implementation_name);
|
| + explicit VCMEncodedFrameCallback(EncodedImageCallback* post_encode_callback);
|
| + virtual ~VCMEncodedFrameCallback();
|
| +
|
| + // Implements EncodedImageCallback.
|
| + int32_t Encoded(const EncodedImage& encoded_image,
|
| + const CodecSpecificInfo* codec_specific,
|
| + const RTPFragmentationHeader* fragmentation_header) override;
|
| + int32_t SetTransportCallback(VCMPacketizationCallback* transport);
|
| + void SetMediaOpt(media_optimization::MediaOptimization* media_opt);
|
| + void SetPayloadType(uint8_t payload_type) { payload_type_ = payload_type; }
|
| + void SetInternalSource(bool internal_source) {
|
| + internal_source_ = internal_source;
|
| + }
|
| + void SetRotation(VideoRotation rotation) { rotation_ = rotation; }
|
| + void SignalLastEncoderImplementationUsed(
|
| + const char* encoder_implementation_name);
|
|
|
| private:
|
| - VCMPacketizationCallback* send_callback_;
|
| - media_optimization::MediaOptimization* _mediaOpt;
|
| - uint8_t _payloadType;
|
| - bool _internalSource;
|
| - VideoRotation _rotation;
|
| -
|
| - EncodedImageCallback* post_encode_callback_;
|
| -
|
| -#ifdef DEBUG_ENCODER_BIT_STREAM
|
| - FILE* _bitStreamAfterEncoder;
|
| -#endif
|
| -}; // end of VCMEncodeFrameCallback class
|
| -
|
| -/******************************/
|
| -/* VCMGenericEncoder class */
|
| -/******************************/
|
| + VCMPacketizationCallback* send_callback_;
|
| + media_optimization::MediaOptimization* media_opt_;
|
| + uint8_t payload_type_;
|
| + bool internal_source_;
|
| + VideoRotation rotation_;
|
| +
|
| + EncodedImageCallback* post_encode_callback_;
|
| +};
|
| +
|
| class VCMGenericEncoder {
|
| friend class VCMCodecDataBase;
|
|
|
| @@ -94,42 +69,24 @@ class VCMGenericEncoder {
|
| VCMGenericEncoder(VideoEncoder* encoder,
|
| VideoEncoderRateObserver* rate_observer,
|
| VCMEncodedFrameCallback* encoded_frame_callback,
|
| - bool internalSource);
|
| + bool internal_source);
|
| ~VCMGenericEncoder();
|
| - /**
|
| - * Free encoder memory
|
| - */
|
| int32_t Release();
|
| - /**
|
| - * Initialize the encoder with the information from the VideoCodec
|
| - */
|
| int32_t InitEncode(const VideoCodec* settings,
|
| - int32_t numberOfCores,
|
| - size_t maxPayloadSize);
|
| - /**
|
| - * Encode raw image
|
| - * inputFrame : Frame containing raw image
|
| - * codecSpecificInfo : Specific codec data
|
| - * cameraFrameRate : Request or information from the remote side
|
| - * frameType : The requested frame type to encode
|
| - */
|
| - int32_t Encode(const VideoFrame& inputFrame,
|
| - const CodecSpecificInfo* codecSpecificInfo,
|
| - const std::vector<FrameType>& frameTypes);
|
| + int32_t number_of_cores,
|
| + size_t max_payload_size);
|
| + int32_t Encode(const VideoFrame& frame,
|
| + const CodecSpecificInfo* codec_specific,
|
| + const std::vector<FrameType>& frame_types);
|
|
|
| void SetEncoderParameters(const EncoderParameters& params);
|
| EncoderParameters GetEncoderParameters() const;
|
|
|
| int32_t SetPeriodicKeyFrames(bool enable);
|
| -
|
| int32_t RequestFrame(const std::vector<FrameType>& frame_types);
|
| -
|
| bool InternalSource() const;
|
| -
|
| void OnDroppedFrame();
|
| -
|
| bool SupportsNativeHandle() const;
|
| -
|
| int GetTargetFramerate();
|
|
|
| private:
|
| @@ -141,7 +98,7 @@ class VCMGenericEncoder {
|
| EncoderParameters encoder_params_ GUARDED_BY(params_lock_);
|
| VideoRotation rotation_;
|
| bool is_screenshare_;
|
| -}; // end of VCMGenericEncoder class
|
| +};
|
|
|
| } // namespace webrtc
|
|
|
|
|