зеркало из https://github.com/mozilla/gecko-dev.git
Bug 873003: ignore duplicate frames from NotifyQueuedTrackChanges() r=ekr
This commit is contained in:
Родитель
314ed7d128
Коммит
b5b771fed5
|
@ -827,6 +827,13 @@ void MediaPipelineTransmit::PipelineListener::ProcessVideoChunk(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We get passed duplicate frames every ~10ms even if there's no frame change!
|
||||||
|
int32_t serial = img->GetSerial();
|
||||||
|
if (serial == last_img_) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
last_img_ = serial;
|
||||||
|
|
||||||
ImageFormat format = img->GetFormat();
|
ImageFormat format = img->GetFormat();
|
||||||
#ifdef MOZ_WIDGET_GONK
|
#ifdef MOZ_WIDGET_GONK
|
||||||
if (format == GONK_IO_SURFACE) {
|
if (format == GONK_IO_SURFACE) {
|
||||||
|
|
|
@ -321,8 +321,12 @@ class MediaPipelineTransmit : public MediaPipeline {
|
||||||
class PipelineListener : public MediaStreamListener {
|
class PipelineListener : public MediaStreamListener {
|
||||||
public:
|
public:
|
||||||
PipelineListener(const RefPtr<MediaSessionConduit>& conduit)
|
PipelineListener(const RefPtr<MediaSessionConduit>& conduit)
|
||||||
: conduit_(conduit), active_(false), samples_10ms_buffer_(nullptr),
|
: conduit_(conduit),
|
||||||
buffer_current_(0), samplenum_10ms_(0){}
|
active_(false),
|
||||||
|
last_img_(-1),
|
||||||
|
samples_10ms_buffer_(nullptr),
|
||||||
|
buffer_current_(0),
|
||||||
|
samplenum_10ms_(0) {}
|
||||||
|
|
||||||
~PipelineListener()
|
~PipelineListener()
|
||||||
{
|
{
|
||||||
|
@ -359,6 +363,8 @@ class MediaPipelineTransmit : public MediaPipeline {
|
||||||
RefPtr<MediaSessionConduit> conduit_;
|
RefPtr<MediaSessionConduit> conduit_;
|
||||||
volatile bool active_;
|
volatile bool active_;
|
||||||
|
|
||||||
|
int32_t last_img_; // serial number of last Image
|
||||||
|
|
||||||
// These vars handle breaking audio samples into exact 10ms chunks:
|
// These vars handle breaking audio samples into exact 10ms chunks:
|
||||||
// The buffer of 10ms audio samples that we will send once full
|
// The buffer of 10ms audio samples that we will send once full
|
||||||
// (can be carried over from one call to another).
|
// (can be carried over from one call to another).
|
||||||
|
|
Загрузка…
Ссылка в новой задаче