зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1514158 - Make VideoTrackEncoder's key frame interval uint32_t. r=bryce
This aligns it better with MediaRecorder's timeslice which was changed from int32 to uint32 earlier. Differential Revision: https://phabricator.services.mozilla.com/D41586 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
7bdf7c09ae
Коммит
bf71d848ad
|
@ -1021,13 +1021,13 @@ size_t MediaEncoder::SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) {
|
|||
return size;
|
||||
}
|
||||
|
||||
void MediaEncoder::SetVideoKeyFrameInterval(int32_t aVideoKeyFrameInterval) {
|
||||
void MediaEncoder::SetVideoKeyFrameInterval(uint32_t aVideoKeyFrameInterval) {
|
||||
if (!mVideoEncoder) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mEncoderThread);
|
||||
nsresult rv = mEncoderThread->Dispatch(NewRunnableMethod<int32_t>(
|
||||
nsresult rv = mEncoderThread->Dispatch(NewRunnableMethod<uint32_t>(
|
||||
"mozilla::VideoTrackEncoder::SetKeyFrameInterval", mVideoEncoder,
|
||||
&VideoTrackEncoder::SetKeyFrameInterval, aVideoKeyFrameInterval));
|
||||
MOZ_DIAGNOSTIC_ASSERT(NS_SUCCEEDED(rv));
|
||||
|
|
|
@ -220,7 +220,7 @@ class MediaEncoder {
|
|||
/**
|
||||
* Set desired video keyframe interval defined in milliseconds.
|
||||
*/
|
||||
void SetVideoKeyFrameInterval(int32_t aVideoKeyFrameInterval);
|
||||
void SetVideoKeyFrameInterval(uint32_t aVideoKeyFrameInterval);
|
||||
|
||||
protected:
|
||||
~MediaEncoder();
|
||||
|
|
|
@ -29,7 +29,7 @@ static const int AUDIO_INIT_FAILED_DURATION = 1;
|
|||
static const int VIDEO_INIT_FAILED_DURATION = 30;
|
||||
// A maximal key frame interval allowed to set.
|
||||
// Longer values will be shorten to this value.
|
||||
static const int DEFAULT_KEYFRAME_INTERVAL_MS = 1000;
|
||||
static const unsigned int DEFAULT_KEYFRAME_INTERVAL_MS = 1000;
|
||||
|
||||
TrackEncoder::TrackEncoder(TrackRate aTrackRate)
|
||||
: mEncodingComplete(false),
|
||||
|
@ -753,7 +753,7 @@ size_t VideoTrackEncoder::SizeOfExcludingThis(
|
|||
mOutgoingBuffer.SizeOfExcludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
||||
void VideoTrackEncoder::SetKeyFrameInterval(int32_t aKeyFrameInterval) {
|
||||
void VideoTrackEncoder::SetKeyFrameInterval(uint32_t aKeyFrameInterval) {
|
||||
MOZ_ASSERT(!mWorkerThread || mWorkerThread->IsCurrentThreadIn());
|
||||
if (aKeyFrameInterval == 0) {
|
||||
mKeyFrameInterval = DEFAULT_KEYFRAME_INTERVAL_MS;
|
||||
|
|
|
@ -420,7 +420,7 @@ class VideoTrackEncoder : public TrackEncoder {
|
|||
/**
|
||||
* Set desired keyframe interval defined in milliseconds.
|
||||
*/
|
||||
void SetKeyFrameInterval(int32_t aKeyFrameInterval);
|
||||
void SetKeyFrameInterval(uint32_t aKeyFrameInterval);
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
@ -518,7 +518,7 @@ class VideoTrackEncoder : public TrackEncoder {
|
|||
/**
|
||||
* The desired keyframe interval defined in milliseconds.
|
||||
*/
|
||||
int32_t mKeyFrameInterval;
|
||||
uint32_t mKeyFrameInterval;
|
||||
|
||||
/**
|
||||
* True if the video MediaTrackTrack this VideoTrackEncoder is attached to is
|
||||
|
|
Загрузка…
Ссылка в новой задаче