Bug 1404997 - P6. Fix constness were applicable. r=pehrsons

MozReview-Commit-ID: JPlZpRz4A9w

--HG--
extra : rebase_source : c788018469818489965756866765e0872c3fa741
This commit is contained in:
Jean-Yves Avenard 2017-11-30 20:48:48 +01:00
Родитель c41e0fce24
Коммит 2ecd33016c
4 изменённых файлов: 21 добавлений и 19 удалений

Просмотреть файл

@ -385,13 +385,14 @@ public:
* NOTE: ConfigureSendMediaCodec() MUST be called before this function can be invoked
* This ensures the inserted video-frames can be transmitted by the conduit
*/
virtual MediaConduitErrorCode SendVideoFrame(unsigned char* video_frame,
virtual MediaConduitErrorCode SendVideoFrame(const unsigned char* video_frame,
unsigned int video_frame_length,
unsigned short width,
unsigned short height,
VideoType video_type,
uint64_t capture_time) = 0;
virtual MediaConduitErrorCode SendVideoFrame(webrtc::VideoFrame& frame) = 0;
virtual MediaConduitErrorCode SendVideoFrame(
const webrtc::VideoFrame& frame) = 0;
virtual MediaConduitErrorCode ConfigureCodecMode(webrtc::VideoCodecMode) = 0;
/**

Просмотреть файл

@ -1692,7 +1692,7 @@ WebrtcVideoConduit::SelectBitrates(
bool
WebrtcVideoConduit::SelectSendResolution(unsigned short width,
unsigned short height,
webrtc::VideoFrame* frame) // may be null
const webrtc::VideoFrame* frame) // may be null
{
mCodecMutex.AssertCurrentThreadOwns();
// XXX This will do bandwidth-resolution adaptation as well - bug 877954
@ -1794,7 +1794,7 @@ WebrtcVideoConduit::SelectSendResolution(unsigned short width,
nsresult
WebrtcVideoConduit::ReconfigureSendCodec(unsigned short width,
unsigned short height,
webrtc::VideoFrame* frame)
const webrtc::VideoFrame* frame)
{
mCodecMutex.AssertCurrentThreadOwns();
@ -1839,7 +1839,7 @@ WebrtcVideoConduit::SelectSendFrameRate(const VideoCodecConfig* codecConfig,
}
MediaConduitErrorCode
WebrtcVideoConduit::SendVideoFrame(unsigned char* video_buffer,
WebrtcVideoConduit::SendVideoFrame(const unsigned char* video_buffer,
unsigned int video_length,
unsigned short width,
unsigned short height,
@ -1945,7 +1945,7 @@ WebrtcVideoConduit::OnSinkWantsChanged(
}
MediaConduitErrorCode
WebrtcVideoConduit::SendVideoFrame(webrtc::VideoFrame& frame)
WebrtcVideoConduit::SendVideoFrame(const webrtc::VideoFrame& frame)
{
// XXX Google uses a "timestamp_aligner" to translate timestamps from the
// camera via TranslateTimestamp(); we should look at doing the same. This

Просмотреть файл

@ -173,7 +173,7 @@ public:
*/
bool SelectSendResolution(unsigned short width,
unsigned short height,
webrtc::VideoFrame* frame);
const webrtc::VideoFrame* frame);
/**
* Function to reconfigure the current send codec for a different
@ -183,7 +183,7 @@ public:
*/
nsresult ReconfigureSendCodec(unsigned short width,
unsigned short height,
webrtc::VideoFrame* frame);
const webrtc::VideoFrame* frame);
/**
* Function to select and change the encoding frame rate based on incoming frame rate
@ -207,15 +207,16 @@ public:
*NOTE: ConfigureSendMediaCodec() SHOULD be called before this function can be invoked
* This ensures the inserted video-frames can be transmitted by the conduit
*/
virtual MediaConduitErrorCode SendVideoFrame(unsigned char* video_frame,
virtual MediaConduitErrorCode SendVideoFrame(const unsigned char* video_frame,
unsigned int video_frame_length,
unsigned short width,
unsigned short height,
VideoType video_type,
uint64_t capture_time) override;
virtual MediaConduitErrorCode SendVideoFrame(webrtc::VideoFrame& frame) override;
virtual MediaConduitErrorCode SendVideoFrame(
const webrtc::VideoFrame& frame) override;
/**
/**
* webrtc::Transport method implementation
* ---------------------------------------
* Webrtc transport implementation to send and receive RTP packet.

Просмотреть файл

@ -86,14 +86,14 @@ class VideoConverterListener
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VideoConverterListener)
virtual void OnVideoFrameConverted(unsigned char* aVideoFrame,
virtual void OnVideoFrameConverted(const unsigned char* aVideoFrame,
unsigned int aVideoFrameLength,
unsigned short aWidth,
unsigned short aHeight,
VideoType aVideoType,
uint64_t aCaptureTime) = 0;
virtual void OnVideoFrameConverted(webrtc::VideoFrame& aVideoFrame) = 0;
virtual void OnVideoFrameConverted(const webrtc::VideoFrame& aVideoFrame) = 0;
protected:
virtual ~VideoConverterListener() {}
@ -132,7 +132,7 @@ public:
MOZ_COUNT_CTOR(VideoFrameConverter);
}
void QueueVideoChunk(VideoChunk& aChunk, bool aForceBlack)
void QueueVideoChunk(const VideoChunk& aChunk, bool aForceBlack)
{
if (aChunk.IsNull()) {
return;
@ -288,7 +288,7 @@ protected:
VideoFrameConverted(video_frame);
}
void VideoFrameConverted(webrtc::VideoFrame& aVideoFrame)
void VideoFrameConverted(const webrtc::VideoFrame& aVideoFrame)
{
MutexAutoLock lock(mMutex);
@ -1379,7 +1379,7 @@ public:
converter_ = converter;
}
void OnVideoFrameConverted(unsigned char* aVideoFrame,
void OnVideoFrameConverted(const unsigned char* aVideoFrame,
unsigned int aVideoFrameLength,
unsigned short aWidth,
unsigned short aHeight,
@ -1396,7 +1396,7 @@ public:
aCaptureTime);
}
void OnVideoFrameConverted(webrtc::VideoFrame& aVideoFrame)
void OnVideoFrameConverted(const webrtc::VideoFrame& aVideoFrame)
{
MOZ_RELEASE_ASSERT(conduit_->type() == MediaSessionConduit::VIDEO);
static_cast<VideoSessionConduit*>(conduit_.get())
@ -1472,7 +1472,7 @@ public:
listener_ = nullptr;
}
void OnVideoFrameConverted(unsigned char* aVideoFrame,
void OnVideoFrameConverted(const unsigned char* aVideoFrame,
unsigned int aVideoFrameLength,
unsigned short aWidth,
unsigned short aHeight,
@ -1493,7 +1493,7 @@ public:
aCaptureTime);
}
void OnVideoFrameConverted(webrtc::VideoFrame& aVideoFrame) override
void OnVideoFrameConverted(const webrtc::VideoFrame& aVideoFrame) override
{
MutexAutoLock lock(mutex_);