Webrtc_Word32 => int32_t in video_coding/main/
BUG= Review URL: https://webrtc-codereview.appspot.com/1279004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@3753 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -63,9 +63,9 @@ public:
|
||||
kAllowDecodeErrors
|
||||
};
|
||||
|
||||
static VideoCodingModule* Create(const WebRtc_Word32 id);
|
||||
static VideoCodingModule* Create(const int32_t id);
|
||||
|
||||
static VideoCodingModule* Create(const WebRtc_Word32 id,
|
||||
static VideoCodingModule* Create(const int32_t id,
|
||||
Clock* clock,
|
||||
EventFactory* event_factory);
|
||||
|
||||
@ -74,7 +74,7 @@ public:
|
||||
// Get number of supported codecs
|
||||
//
|
||||
// Return value : Number of supported codecs
|
||||
static WebRtc_UWord8 NumberOfCodecs();
|
||||
static uint8_t NumberOfCodecs();
|
||||
|
||||
// Get supported codec settings with using id
|
||||
//
|
||||
@ -84,7 +84,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success
|
||||
// VCM_PARAMETER_ERROR if codec not supported or id too high
|
||||
static WebRtc_Word32 Codec(const WebRtc_UWord8 listId, VideoCodec* codec);
|
||||
static int32_t Codec(const uint8_t listId, VideoCodec* codec);
|
||||
|
||||
// Get supported codec settings using codec type
|
||||
//
|
||||
@ -94,7 +94,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success
|
||||
// VCM_PARAMETER_ERROR if codec not supported
|
||||
static WebRtc_Word32 Codec(VideoCodecType codecType, VideoCodec* codec);
|
||||
static int32_t Codec(VideoCodecType codecType, VideoCodec* codec);
|
||||
|
||||
/*
|
||||
* Sender
|
||||
@ -108,7 +108,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 InitializeSender() = 0;
|
||||
virtual int32_t InitializeSender() = 0;
|
||||
|
||||
// Registers a codec to be used for encoding. Calling this
|
||||
// API multiple times overwrites any previously registered codecs.
|
||||
@ -122,9 +122,9 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterSendCodec(const VideoCodec* sendCodec,
|
||||
WebRtc_UWord32 numberOfCores,
|
||||
WebRtc_UWord32 maxPayloadSize) = 0;
|
||||
virtual int32_t RegisterSendCodec(const VideoCodec* sendCodec,
|
||||
uint32_t numberOfCores,
|
||||
uint32_t maxPayloadSize) = 0;
|
||||
|
||||
// API to get the current send codec in use.
|
||||
//
|
||||
@ -133,7 +133,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 SendCodec(VideoCodec* currentSendCodec) const = 0;
|
||||
virtual int32_t SendCodec(VideoCodec* currentSendCodec) const = 0;
|
||||
|
||||
// API to get the current send codec type
|
||||
//
|
||||
@ -151,8 +151,8 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterExternalEncoder(VideoEncoder* externalEncoder,
|
||||
WebRtc_UWord8 payloadType,
|
||||
virtual int32_t RegisterExternalEncoder(VideoEncoder* externalEncoder,
|
||||
uint8_t payloadType,
|
||||
bool internalSource = false) = 0;
|
||||
|
||||
// API to get codec config parameters to be sent out-of-band to a receiver.
|
||||
@ -163,7 +163,7 @@ public:
|
||||
//
|
||||
// Return value : Number of bytes written, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 CodecConfigParameters(WebRtc_UWord8* buffer, WebRtc_Word32 size) = 0;
|
||||
virtual int32_t CodecConfigParameters(uint8_t* buffer, int32_t size) = 0;
|
||||
|
||||
// API to get currently configured encoder target bitrate in kbit/s.
|
||||
//
|
||||
@ -189,9 +189,9 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 SetChannelParameters(WebRtc_UWord32 target_bitrate,
|
||||
WebRtc_UWord8 lossRate,
|
||||
WebRtc_UWord32 rtt) = 0;
|
||||
virtual int32_t SetChannelParameters(uint32_t target_bitrate,
|
||||
uint8_t lossRate,
|
||||
uint32_t rtt) = 0;
|
||||
|
||||
// Sets the parameters describing the receive channel. These parameters are inputs to the
|
||||
// Media Optimization inside the VCM.
|
||||
@ -203,7 +203,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 SetReceiveChannelParameters(WebRtc_UWord32 rtt) = 0;
|
||||
virtual int32_t SetReceiveChannelParameters(uint32_t rtt) = 0;
|
||||
|
||||
// Register a transport callback which will be called to deliver the encoded data and
|
||||
// side information.
|
||||
@ -213,7 +213,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterTransportCallback(VCMPacketizationCallback* transport) = 0;
|
||||
virtual int32_t RegisterTransportCallback(VCMPacketizationCallback* transport) = 0;
|
||||
|
||||
// Register video output information callback which will be called to deliver information
|
||||
// about the video stream produced by the encoder, for instance the average frame rate and
|
||||
@ -224,7 +224,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterSendStatisticsCallback(
|
||||
virtual int32_t RegisterSendStatisticsCallback(
|
||||
VCMSendStatisticsCallback* sendStats) = 0;
|
||||
|
||||
// Register a video quality settings callback which will be called when
|
||||
@ -235,7 +235,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error
|
||||
virtual WebRtc_Word32 RegisterVideoQMCallback(VCMQMSettingsCallback* videoQMSettings) = 0;
|
||||
virtual int32_t RegisterVideoQMCallback(VCMQMSettingsCallback* videoQMSettings) = 0;
|
||||
|
||||
// Register a video protection callback which will be called to deliver
|
||||
// the requested FEC rate and NACK status (on/off).
|
||||
@ -245,7 +245,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterProtectionCallback(VCMProtectionCallback* protection) = 0;
|
||||
virtual int32_t RegisterProtectionCallback(VCMProtectionCallback* protection) = 0;
|
||||
|
||||
// Enable or disable a video protection method.
|
||||
//
|
||||
@ -256,7 +256,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 SetVideoProtection(VCMVideoProtection videoProtection,
|
||||
virtual int32_t SetVideoProtection(VCMVideoProtection videoProtection,
|
||||
bool enable) = 0;
|
||||
|
||||
// Add one raw video frame to the encoder. This function does all the necessary
|
||||
@ -270,7 +270,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 AddVideoFrame(
|
||||
virtual int32_t AddVideoFrame(
|
||||
const I420VideoFrame& videoFrame,
|
||||
const VideoContentMetrics* contentMetrics = NULL,
|
||||
const CodecSpecificInfo* codecSpecificInfo = NULL) = 0;
|
||||
@ -279,7 +279,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 IntraFrameRequest(int stream_index) = 0;
|
||||
virtual int32_t IntraFrameRequest(int stream_index) = 0;
|
||||
|
||||
// Frame Dropper enable. Can be used to disable the frame dropping when the encoder
|
||||
// over-uses its bit rate. This API is designed to be used when the encoded frames
|
||||
@ -291,10 +291,10 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 EnableFrameDropper(bool enable) = 0;
|
||||
virtual int32_t EnableFrameDropper(bool enable) = 0;
|
||||
|
||||
// Sent frame counters
|
||||
virtual WebRtc_Word32 SentFrameCount(VCMFrameCount& frameCount) const = 0;
|
||||
virtual int32_t SentFrameCount(VCMFrameCount& frameCount) const = 0;
|
||||
|
||||
/*
|
||||
* Receiver
|
||||
@ -309,7 +309,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 InitializeReceiver() = 0;
|
||||
virtual int32_t InitializeReceiver() = 0;
|
||||
|
||||
// Register possible receive codecs, can be called multiple times for different codecs.
|
||||
// The module will automatically switch between registered codecs depending on the
|
||||
@ -323,8 +323,8 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterReceiveCodec(const VideoCodec* receiveCodec,
|
||||
WebRtc_Word32 numberOfCores,
|
||||
virtual int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec,
|
||||
int32_t numberOfCores,
|
||||
bool requireKeyFrame = false) = 0;
|
||||
|
||||
// Register an externally defined decoder/renderer object. Can be a decoder only or a
|
||||
@ -340,8 +340,8 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterExternalDecoder(VideoDecoder* externalDecoder,
|
||||
WebRtc_UWord8 payloadType,
|
||||
virtual int32_t RegisterExternalDecoder(VideoDecoder* externalDecoder,
|
||||
uint8_t payloadType,
|
||||
bool internalRenderTiming) = 0;
|
||||
|
||||
// Register a receive callback. Will be called whenever there is a new frame ready
|
||||
@ -354,7 +354,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterReceiveCallback(VCMReceiveCallback* receiveCallback) = 0;
|
||||
virtual int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback) = 0;
|
||||
|
||||
// Register a receive statistics callback which will be called to deliver information
|
||||
// about the video stream received by the receiving side of the VCM, for instance the
|
||||
@ -365,7 +365,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterReceiveStatisticsCallback(
|
||||
virtual int32_t RegisterReceiveStatisticsCallback(
|
||||
VCMReceiveStatisticsCallback* receiveStats) = 0;
|
||||
|
||||
// Register a frame type request callback. This callback will be called when the
|
||||
@ -378,7 +378,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterFrameTypeCallback(
|
||||
virtual int32_t RegisterFrameTypeCallback(
|
||||
VCMFrameTypeCallback* frameTypeCallback) = 0;
|
||||
|
||||
// Register a frame storage callback. This callback will be called right before an
|
||||
@ -390,7 +390,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 RegisterFrameStorageCallback(
|
||||
virtual int32_t RegisterFrameStorageCallback(
|
||||
VCMFrameStorageCallback* frameStorageCallback) = 0;
|
||||
|
||||
// Registers a callback which is called whenever the receive side of the VCM
|
||||
@ -401,7 +401,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// <0, on error.
|
||||
virtual WebRtc_Word32 RegisterPacketRequestCallback(
|
||||
virtual int32_t RegisterPacketRequestCallback(
|
||||
VCMPacketRequestCallback* callback) = 0;
|
||||
|
||||
// Waits for the next frame in the jitter buffer to become complete
|
||||
@ -410,7 +410,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 Decode(WebRtc_UWord16 maxWaitTimeMs = 200) = 0;
|
||||
virtual int32_t Decode(uint16_t maxWaitTimeMs = 200) = 0;
|
||||
|
||||
// Waits for the next frame in the dual jitter buffer to become complete
|
||||
// (waits no longer than maxWaitTimeMs), then passes it to the dual decoder
|
||||
@ -421,7 +421,7 @@ public:
|
||||
// Return value : 1, if a frame was decoded
|
||||
// 0, if no frame was decoded
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 DecodeDualFrame(WebRtc_UWord16 maxWaitTimeMs = 200) = 0;
|
||||
virtual int32_t DecodeDualFrame(uint16_t maxWaitTimeMs = 200) = 0;
|
||||
|
||||
// Decodes a frame and sets an appropriate render time in ms relative to the system time.
|
||||
// Should be used in conjunction with VCMFrameStorageCallback.
|
||||
@ -432,13 +432,13 @@ public:
|
||||
//
|
||||
// Return value: : VCM_OK, on success
|
||||
// < 0, on error
|
||||
virtual WebRtc_Word32 DecodeFromStorage(const EncodedVideoData& frameFromStorage) = 0;
|
||||
virtual int32_t DecodeFromStorage(const EncodedVideoData& frameFromStorage) = 0;
|
||||
|
||||
// Reset the decoder state to the initial state.
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 ResetDecoder() = 0;
|
||||
virtual int32_t ResetDecoder() = 0;
|
||||
|
||||
// API to get the codec which is currently used for decoding by the module.
|
||||
//
|
||||
@ -447,7 +447,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0;
|
||||
virtual int32_t ReceiveCodec(VideoCodec* currentReceiveCodec) const = 0;
|
||||
|
||||
// API to get the codec type currently used for decoding by the module.
|
||||
//
|
||||
@ -466,8 +466,8 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 IncomingPacket(const WebRtc_UWord8* incomingPayload,
|
||||
WebRtc_UWord32 payloadLength,
|
||||
virtual int32_t IncomingPacket(const uint8_t* incomingPayload,
|
||||
uint32_t payloadLength,
|
||||
const WebRtcRTPHeader& rtpInfo) = 0;
|
||||
|
||||
// Minimum playout delay (Used for lip-sync). This is the minimum delay required
|
||||
@ -479,7 +479,7 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 SetMinimumPlayoutDelay(WebRtc_UWord32 minPlayoutDelayMs) = 0;
|
||||
virtual int32_t SetMinimumPlayoutDelay(uint32_t minPlayoutDelayMs) = 0;
|
||||
|
||||
// Set the time required by the renderer to render a frame.
|
||||
//
|
||||
@ -488,14 +488,14 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 SetRenderDelay(WebRtc_UWord32 timeMS) = 0;
|
||||
virtual int32_t SetRenderDelay(uint32_t timeMS) = 0;
|
||||
|
||||
// The total delay desired by the VCM. Can be less than the minimum
|
||||
// delay set with SetMinimumPlayoutDelay.
|
||||
//
|
||||
// Return value : Total delay in ms, on success.
|
||||
// < 0, on error.
|
||||
virtual WebRtc_Word32 Delay() const = 0;
|
||||
virtual int32_t Delay() const = 0;
|
||||
|
||||
// Get the received frame counters. Keeps track of the number of each frame type
|
||||
// received since the start of the call.
|
||||
@ -505,13 +505,13 @@ public:
|
||||
//
|
||||
// Return value : VCM_OK, on success.
|
||||
// <0, on error.
|
||||
virtual WebRtc_Word32 ReceivedFrameCount(VCMFrameCount& frameCount) const = 0;
|
||||
virtual int32_t ReceivedFrameCount(VCMFrameCount& frameCount) const = 0;
|
||||
|
||||
// Returns the number of packets discarded by the jitter buffer due to being
|
||||
// too late. This can include duplicated packets which arrived after the
|
||||
// frame was sent to the decoder. Therefore packets which were prematurely
|
||||
// NACKed will be counted.
|
||||
virtual WebRtc_UWord32 DiscardedPackets() const = 0;
|
||||
virtual uint32_t DiscardedPackets() const = 0;
|
||||
|
||||
|
||||
// Robustness APIs
|
||||
|
||||
Reference in New Issue
Block a user