summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2014-05-15 12:16:31 +0100
committerTorne (Richard Coles) <torne@google.com>2014-05-15 12:16:31 +0100
commit0de6073388f4e2780db8536178b129cd8f6ab386 (patch)
treef22df67d2450c33e245fa27d50f001b403434315 /media
parent237b4e8281feb4bb44a23557a97fcbbd55133d68 (diff)
downloadchromium_org-0de6073388f4e2780db8536178b129cd8f6ab386.tar.gz
Merge from Chromium at DEPS revision 269467
This commit was generated by merge_to_master.py. Change-Id: Id6c03d44b5ad8b098017a943eb9ec8d804dfed99
Diffstat (limited to 'media')
-rw-r--r--media/base/audio_renderer.h5
-rw-r--r--media/base/demuxer.h8
-rw-r--r--media/base/media_log.cc2
-rw-r--r--media/base/media_log_event.h4
-rw-r--r--media/base/mock_filters.h3
-rw-r--r--media/base/pipeline.cc35
-rw-r--r--media/base/pipeline.h11
-rw-r--r--media/base/pipeline_unittest.cc88
-rw-r--r--media/base/simd/convert_yuva_to_argb_mmx.inc26
-rw-r--r--media/base/yuv_convert_unittest.cc53
-rw-r--r--media/ffmpeg/ffmpeg_common.h4
-rw-r--r--media/filters/audio_renderer_impl.cc9
-rw-r--r--media/filters/audio_renderer_impl.h2
-rw-r--r--media/filters/audio_renderer_impl_unittest.cc12
-rw-r--r--media/filters/chunk_demuxer.cc59
-rw-r--r--media/filters/chunk_demuxer.h17
-rw-r--r--media/filters/chunk_demuxer_unittest.cc51
-rw-r--r--media/filters/ffmpeg_demuxer.cc24
-rw-r--r--media/filters/ffmpeg_demuxer.h5
-rw-r--r--media/filters/ffmpeg_demuxer_unittest.cc34
-rw-r--r--media/filters/frame_processor.cc378
-rw-r--r--media/filters/frame_processor.h60
-rw-r--r--media/filters/frame_processor_base.cc38
-rw-r--r--media/filters/frame_processor_base.h63
-rw-r--r--media/filters/frame_processor_unittest.cc573
-rw-r--r--media/filters/legacy_frame_processor.cc11
-rw-r--r--media/filters/pipeline_integration_test.cc11
-rw-r--r--media/filters/video_renderer_impl.cc11
-rw-r--r--media/filters/video_renderer_impl.h10
-rw-r--r--media/media.gyp3
-rw-r--r--media/media.target.darwin-arm.mk3
-rw-r--r--media/media.target.darwin-arm64.mk3
-rw-r--r--media/media.target.darwin-mips.mk3
-rw-r--r--media/media.target.darwin-x86.mk3
-rw-r--r--media/media.target.darwin-x86_64.mk3
-rw-r--r--media/media.target.linux-arm.mk3
-rw-r--r--media/media.target.linux-arm64.mk3
-rw-r--r--media/media.target.linux-mips.mk3
-rw-r--r--media/media.target.linux-x86.mk3
-rw-r--r--media/media.target.linux-x86_64.mk3
-rw-r--r--media/media_android_imageformat_list.target.darwin-arm.mk2
-rw-r--r--media/media_android_imageformat_list.target.darwin-arm64.mk2
-rw-r--r--media/media_android_imageformat_list.target.darwin-mips.mk2
-rw-r--r--media/media_android_imageformat_list.target.darwin-x86.mk2
-rw-r--r--media/media_android_imageformat_list.target.darwin-x86_64.mk2
-rw-r--r--media/media_android_imageformat_list.target.linux-arm.mk2
-rw-r--r--media/media_android_imageformat_list.target.linux-arm64.mk2
-rw-r--r--media/media_android_imageformat_list.target.linux-mips.mk2
-rw-r--r--media/media_android_imageformat_list.target.linux-x86.mk2
-rw-r--r--media/media_android_imageformat_list.target.linux-x86_64.mk2
-rw-r--r--media/media_android_jni_headers.target.darwin-arm.mk2
-rw-r--r--media/media_android_jni_headers.target.darwin-arm64.mk2
-rw-r--r--media/media_android_jni_headers.target.darwin-mips.mk2
-rw-r--r--media/media_android_jni_headers.target.darwin-x86.mk2
-rw-r--r--media/media_android_jni_headers.target.darwin-x86_64.mk2
-rw-r--r--media/media_android_jni_headers.target.linux-arm.mk2
-rw-r--r--media/media_android_jni_headers.target.linux-arm64.mk2
-rw-r--r--media/media_android_jni_headers.target.linux-mips.mk2
-rw-r--r--media/media_android_jni_headers.target.linux-x86.mk2
-rw-r--r--media/media_android_jni_headers.target.linux-x86_64.mk2
-rw-r--r--media/media_asm.target.darwin-x86.mk2
-rw-r--r--media/media_asm.target.darwin-x86_64.mk2
-rw-r--r--media/media_asm.target.linux-x86.mk2
-rw-r--r--media/media_asm.target.linux-x86_64.mk2
-rw-r--r--media/media_mmx.target.darwin-x86.mk2
-rw-r--r--media/media_mmx.target.darwin-x86_64.mk2
-rw-r--r--media/media_mmx.target.linux-x86.mk2
-rw-r--r--media/media_mmx.target.linux-x86_64.mk2
-rw-r--r--media/media_sse.target.darwin-x86.mk2
-rw-r--r--media/media_sse.target.darwin-x86_64.mk2
-rw-r--r--media/media_sse.target.linux-x86.mk2
-rw-r--r--media/media_sse.target.linux-x86_64.mk2
-rw-r--r--media/media_sse2.target.darwin-x86.mk2
-rw-r--r--media/media_sse2.target.darwin-x86_64.mk2
-rw-r--r--media/media_sse2.target.linux-x86.mk2
-rw-r--r--media/media_sse2.target.linux-x86_64.mk2
-rw-r--r--media/player_android.target.darwin-arm.mk2
-rw-r--r--media/player_android.target.darwin-arm64.mk2
-rw-r--r--media/player_android.target.darwin-mips.mk2
-rw-r--r--media/player_android.target.darwin-x86.mk2
-rw-r--r--media/player_android.target.darwin-x86_64.mk2
-rw-r--r--media/player_android.target.linux-arm.mk2
-rw-r--r--media/player_android.target.linux-arm64.mk2
-rw-r--r--media/player_android.target.linux-mips.mk2
-rw-r--r--media/player_android.target.linux-x86.mk2
-rw-r--r--media/player_android.target.linux-x86_64.mk2
-rw-r--r--media/shared_memory_support.target.darwin-arm.mk2
-rw-r--r--media/shared_memory_support.target.darwin-arm64.mk2
-rw-r--r--media/shared_memory_support.target.darwin-mips.mk2
-rw-r--r--media/shared_memory_support.target.darwin-x86.mk2
-rw-r--r--media/shared_memory_support.target.darwin-x86_64.mk2
-rw-r--r--media/shared_memory_support.target.linux-arm.mk2
-rw-r--r--media/shared_memory_support.target.linux-arm64.mk2
-rw-r--r--media/shared_memory_support.target.linux-mips.mk2
-rw-r--r--media/shared_memory_support.target.linux-x86.mk2
-rw-r--r--media/shared_memory_support.target.linux-x86_64.mk2
-rw-r--r--media/shared_memory_support_sse.target.darwin-x86.mk2
-rw-r--r--media/shared_memory_support_sse.target.darwin-x86_64.mk2
-rw-r--r--media/shared_memory_support_sse.target.linux-x86.mk2
-rw-r--r--media/shared_memory_support_sse.target.linux-x86_64.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.darwin-arm.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.darwin-arm64.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.darwin-mips.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.darwin-x86.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.darwin-x86_64.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.linux-arm.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.linux-arm64.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.linux-mips.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.linux-x86.mk2
-rw-r--r--media/video_capture_android_jni_headers.target.linux-x86_64.mk2
110 files changed, 1482 insertions, 298 deletions
diff --git a/media/base/audio_renderer.h b/media/base/audio_renderer.h
index bcc06b1c4e..2896857588 100644
--- a/media/base/audio_renderer.h
+++ b/media/base/audio_renderer.h
@@ -38,10 +38,6 @@ class MEDIA_EXPORT AudioRenderer {
//
// |ended_cb| is executed when audio rendering has reached the end of stream.
//
- // |disabled_cb| is executed when audio rendering has been disabled due to
- // external factors (i.e., device was removed). |time_cb| will no longer be
- // executed. TODO(scherkus): this might not be needed http://crbug.com/234708
- //
// |error_cb| is executed if an error was encountered.
virtual void Initialize(DemuxerStream* stream,
const PipelineStatusCB& init_cb,
@@ -49,7 +45,6 @@ class MEDIA_EXPORT AudioRenderer {
const base::Closure& underflow_cb,
const TimeCB& time_cb,
const base::Closure& ended_cb,
- const base::Closure& disabled_cb,
const PipelineStatusCB& error_cb) = 0;
// Start audio decoding and rendering at the current playback rate, executing
diff --git a/media/base/demuxer.h b/media/base/demuxer.h
index 24ea281ac6..c9c851c1bd 100644
--- a/media/base/demuxer.h
+++ b/media/base/demuxer.h
@@ -78,14 +78,6 @@ class MEDIA_EXPORT Demuxer {
// call any method (including Stop()) after a demuxer has stopped.
virtual void Stop(const base::Closure& callback) = 0;
- // This method is called from the pipeline when the audio renderer
- // is disabled. Demuxers can ignore the notification if they do not
- // need to react to this event.
- //
- // TODO(acolwell): Change to generic DisableStream(DemuxerStream::Type).
- // TODO(scherkus): this might not be needed http://crbug.com/234708
- virtual void OnAudioRendererDisabled() = 0;
-
// Returns the first stream of the given stream type (which is not allowed
// to be DemuxerStream::TEXT), or NULL if that type of stream is not present.
virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0;
diff --git a/media/base/media_log.cc b/media/base/media_log.cc
index c689d7a46c..5e1ed767fb 100644
--- a/media/base/media_log.cc
+++ b/media/base/media_log.cc
@@ -52,8 +52,6 @@ const char* MediaLog::EventTypeToString(MediaLogEvent::Type type) {
return "VIDEO_ENDED";
case MediaLogEvent::TEXT_ENDED:
return "TEXT_ENDED";
- case MediaLogEvent::AUDIO_RENDERER_DISABLED:
- return "AUDIO_RENDERER_DISABLED";
case MediaLogEvent::BUFFERED_EXTENTS_CHANGED:
return "BUFFERED_EXTENTS_CHANGED";
case MediaLogEvent::MEDIA_SOURCE_ERROR:
diff --git a/media/base/media_log_event.h b/media/base/media_log_event.h
index 3052d415c1..fe3da9781f 100644
--- a/media/base/media_log_event.h
+++ b/media/base/media_log_event.h
@@ -75,10 +75,6 @@ struct MediaLogEvent {
VIDEO_ENDED,
TEXT_ENDED,
- // The audio renderer has been disabled.
- // params: none.
- AUDIO_RENDERER_DISABLED,
-
// The extents of the sliding buffer have changed.
// params: "buffer_start": <first buffered byte>.
// "buffer_current": <current offset>.
diff --git a/media/base/mock_filters.h b/media/base/mock_filters.h
index c7b7321025..95c91d23b1 100644
--- a/media/base/mock_filters.h
+++ b/media/base/mock_filters.h
@@ -139,13 +139,12 @@ class MockAudioRenderer : public AudioRenderer {
virtual ~MockAudioRenderer();
// AudioRenderer implementation.
- MOCK_METHOD8(Initialize, void(DemuxerStream* stream,
+ MOCK_METHOD7(Initialize, void(DemuxerStream* stream,
const PipelineStatusCB& init_cb,
const StatisticsCB& statistics_cb,
const base::Closure& underflow_cb,
const TimeCB& time_cb,
const base::Closure& ended_cb,
- const base::Closure& disabled_cb,
const PipelineStatusCB& error_cb));
MOCK_METHOD1(Play, void(const base::Closure& callback));
MOCK_METHOD1(Pause, void(const base::Closure& callback));
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 89097a9d63..385db3a7e1 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -48,7 +48,6 @@ Pipeline::Pipeline(
audio_ended_(false),
video_ended_(false),
text_ended_(false),
- audio_disabled_(false),
demuxer_(NULL),
creation_time_(default_tick_clock_.NowTicks()) {
media_log_->AddEvent(media_log_->CreatePipelineStateChangedEvent(kCreated));
@@ -295,22 +294,11 @@ void Pipeline::SetError(PipelineStatus error) {
media_log_->AddEvent(media_log_->CreatePipelineErrorEvent(error));
}
-void Pipeline::OnAudioDisabled() {
- DCHECK(IsRunning());
- task_runner_->PostTask(FROM_HERE, base::Bind(
- &Pipeline::AudioDisabledTask, base::Unretained(this)));
- media_log_->AddEvent(
- media_log_->CreateEvent(MediaLogEvent::AUDIO_RENDERER_DISABLED));
-}
-
void Pipeline::OnAudioTimeUpdate(TimeDelta time, TimeDelta max_time) {
DCHECK_LE(time.InMicroseconds(), max_time.InMicroseconds());
DCHECK(IsRunning());
base::AutoLock auto_lock(lock_);
- if (audio_disabled_)
- return;
-
if (waiting_for_clock_update_ && time < clock_->Elapsed())
return;
@@ -327,7 +315,7 @@ void Pipeline::OnVideoTimeUpdate(TimeDelta max_time) {
DCHECK(IsRunning());
base::AutoLock auto_lock(lock_);
- if (audio_renderer_ && !audio_disabled_)
+ if (audio_renderer_)
return;
// TODO(scherkus): |state_| should only be accessed on pipeline thread, see
@@ -433,7 +421,7 @@ void Pipeline::StateTransitionTask(PipelineStatus status) {
// We use audio stream to update the clock. So if there is such a
// stream, we pause the clock until we receive a valid timestamp.
waiting_for_clock_update_ = true;
- if (!audio_renderer_ || audio_disabled_) {
+ if (!audio_renderer_) {
clock_->SetMaxTime(clock_->Duration());
StartClockIfWaitingForTimeUpdate_Locked();
}
@@ -793,7 +781,7 @@ void Pipeline::DoAudioRendererEnded() {
audio_ended_ = true;
// Start clock since there is no more audio to trigger clock updates.
- if (!audio_disabled_) {
+ {
base::AutoLock auto_lock(lock_);
clock_->SetMaxTime(clock_->Duration());
StartClockIfWaitingForTimeUpdate_Locked();
@@ -829,7 +817,7 @@ void Pipeline::DoTextRendererEnded() {
void Pipeline::RunEndedCallbackIfNeeded() {
DCHECK(task_runner_->BelongsToCurrentThread());
- if (audio_renderer_ && !audio_ended_ && !audio_disabled_)
+ if (audio_renderer_ && !audio_ended_)
return;
if (video_renderer_ && !video_ended_)
@@ -847,20 +835,6 @@ void Pipeline::RunEndedCallbackIfNeeded() {
ended_cb_.Run();
}
-void Pipeline::AudioDisabledTask() {
- DCHECK(task_runner_->BelongsToCurrentThread());
-
- base::AutoLock auto_lock(lock_);
- audio_disabled_ = true;
-
- // Notify our demuxer that we're no longer rendering audio.
- demuxer_->OnAudioRendererDisabled();
-
- // Start clock since there is no more audio to trigger clock updates.
- clock_->SetMaxTime(clock_->Duration());
- StartClockIfWaitingForTimeUpdate_Locked();
-}
-
void Pipeline::AddTextStreamTask(DemuxerStream* text_stream,
const TextTrackConfig& config) {
DCHECK(task_runner_->BelongsToCurrentThread());
@@ -892,7 +866,6 @@ void Pipeline::InitializeAudioRenderer(const PipelineStatusCB& done_cb) {
base::Bind(&Pipeline::OnAudioUnderflow, base::Unretained(this)),
base::Bind(&Pipeline::OnAudioTimeUpdate, base::Unretained(this)),
base::Bind(&Pipeline::OnAudioRendererEnded, base::Unretained(this)),
- base::Bind(&Pipeline::OnAudioDisabled, base::Unretained(this)),
base::Bind(&Pipeline::SetError, base::Unretained(this)));
}
diff --git a/media/base/pipeline.h b/media/base/pipeline.h
index f19bcd17b5..c4de1ce1a3 100644
--- a/media/base/pipeline.h
+++ b/media/base/pipeline.h
@@ -182,8 +182,6 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
private:
FRIEND_TEST_ALL_PREFIXES(PipelineTest, GetBufferedTimeRanges);
- FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRenderer);
- FRIEND_TEST_ALL_PREFIXES(PipelineTest, DisableAudioRendererDuringInit);
FRIEND_TEST_ALL_PREFIXES(PipelineTest, EndedCallback);
FRIEND_TEST_ALL_PREFIXES(PipelineTest, AudioStreamShorterThanVideo);
friend class MediaLog;
@@ -234,9 +232,6 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
// Callback executed by filters to update statistics.
void OnUpdateStatistics(const PipelineStatistics& stats);
- // Callback executed by audio renderer when it has been disabled.
- void OnAudioDisabled();
-
// Callback executed by audio renderer to update clock time.
void OnAudioTimeUpdate(base::TimeDelta time, base::TimeDelta max_time);
@@ -270,9 +265,6 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
void DoTextRendererEnded();
void RunEndedCallbackIfNeeded();
- // Carries out disabling the audio renderer.
- void AudioDisabledTask();
-
// Carries out adding a new text stream to the text renderer.
void AddTextStreamTask(DemuxerStream* text_stream,
const TextTrackConfig& config);
@@ -385,9 +377,6 @@ class MEDIA_EXPORT Pipeline : public DemuxerHost {
bool video_ended_;
bool text_ended_;
- // Set to true in DisableAudioRendererTask().
- bool audio_disabled_;
-
// Temporary callback used for Start() and Seek().
PipelineStatusCB seek_cb_;
diff --git a/media/base/pipeline_unittest.cc b/media/base/pipeline_unittest.cc
index fddb057cda..56ad2ac292 100644
--- a/media/base/pipeline_unittest.cc
+++ b/media/base/pipeline_unittest.cc
@@ -180,17 +180,10 @@ class PipelineTest : public ::testing::Test {
}
// Sets up expectations to allow the audio renderer to initialize.
- void InitializeAudioRenderer(DemuxerStream* stream,
- bool disable_after_init_cb) {
- if (disable_after_init_cb) {
- EXPECT_CALL(*audio_renderer_, Initialize(stream, _, _, _, _, _, _, _))
- .WillOnce(DoAll(RunCallback<1>(PIPELINE_OK),
- WithArg<6>(RunClosure<0>()))); // |disabled_cb|.
- } else {
- EXPECT_CALL(*audio_renderer_, Initialize(stream, _, _, _, _, _, _, _))
- .WillOnce(DoAll(SaveArg<4>(&audio_time_cb_),
- RunCallback<1>(PIPELINE_OK)));
- }
+ void InitializeAudioRenderer(DemuxerStream* stream) {
+ EXPECT_CALL(*audio_renderer_, Initialize(stream, _, _, _, _, _, _))
+ .WillOnce(DoAll(SaveArg<4>(&audio_time_cb_),
+ RunCallback<1>(PIPELINE_OK)));
}
void AddTextStream() {
@@ -427,7 +420,7 @@ TEST_F(PipelineTest, AudioStream) {
streams.push_back(audio_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializePipeline(PIPELINE_OK);
EXPECT_TRUE(metadata_.has_audio);
@@ -455,7 +448,7 @@ TEST_F(PipelineTest, AudioVideoStream) {
streams.push_back(video_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializeVideoRenderer(video_stream());
InitializePipeline(PIPELINE_OK);
@@ -490,7 +483,7 @@ TEST_F(PipelineTest, VideoAudioTextStream) {
InitializeDemuxer(&streams);
InitializeVideoRenderer(video_stream());
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializePipeline(PIPELINE_OK);
EXPECT_TRUE(metadata_.has_audio);
@@ -509,7 +502,7 @@ TEST_F(PipelineTest, Seek) {
streams.push_back(video_stream());
InitializeDemuxer(&streams, base::TimeDelta::FromSeconds(3000));
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializeVideoRenderer(video_stream());
// Initialize then seek!
@@ -530,7 +523,7 @@ TEST_F(PipelineTest, SetVolume) {
streams.push_back(audio_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
// The audio renderer should receive a call to SetVolume().
float expected = 0.5f;
@@ -584,51 +577,6 @@ TEST_F(PipelineTest, GetBufferedTimeRanges) {
EXPECT_FALSE(pipeline_->DidLoadingProgress());
}
-TEST_F(PipelineTest, DisableAudioRenderer) {
- CreateAudioStream();
- CreateVideoStream();
- MockDemuxerStreamVector streams;
- streams.push_back(audio_stream());
- streams.push_back(video_stream());
-
- InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
- InitializeVideoRenderer(video_stream());
-
- InitializePipeline(PIPELINE_OK);
- EXPECT_TRUE(metadata_.has_audio);
- EXPECT_TRUE(metadata_.has_video);
-
- EXPECT_CALL(*demuxer_, OnAudioRendererDisabled());
- pipeline_->OnAudioDisabled();
-
- // Verify that ended event is fired when video ends.
- EXPECT_CALL(callbacks_, OnEnded());
- pipeline_->OnVideoRendererEnded();
-}
-
-TEST_F(PipelineTest, DisableAudioRendererDuringInit) {
- CreateAudioStream();
- CreateVideoStream();
- MockDemuxerStreamVector streams;
- streams.push_back(audio_stream());
- streams.push_back(video_stream());
-
- InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), true);
- InitializeVideoRenderer(video_stream());
-
- EXPECT_CALL(*demuxer_, OnAudioRendererDisabled());
-
- InitializePipeline(PIPELINE_OK);
- EXPECT_TRUE(metadata_.has_audio);
- EXPECT_TRUE(metadata_.has_video);
-
- // Verify that ended event is fired when video ends.
- EXPECT_CALL(callbacks_, OnEnded());
- pipeline_->OnVideoRendererEnded();
-}
-
TEST_F(PipelineTest, EndedCallback) {
CreateAudioStream();
CreateVideoStream();
@@ -638,7 +586,7 @@ TEST_F(PipelineTest, EndedCallback) {
streams.push_back(video_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializeVideoRenderer(video_stream());
InitializePipeline(PIPELINE_OK);
@@ -670,7 +618,7 @@ TEST_F(PipelineTest, AudioStreamShorterThanVideo) {
pipeline_->SetClockForTesting(new Clock(&test_tick_clock_));
InitializeDemuxer(&streams, duration);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializeVideoRenderer(video_stream());
InitializePipeline(PIPELINE_OK);
@@ -710,7 +658,7 @@ TEST_F(PipelineTest, ErrorDuringSeek) {
streams.push_back(audio_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializePipeline(PIPELINE_OK);
float playback_rate = 1.0f;
@@ -764,7 +712,7 @@ TEST_F(PipelineTest, NoMessageDuringTearDownFromError) {
streams.push_back(audio_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializePipeline(PIPELINE_OK);
// Trigger additional requests on the pipeline during tear down from error.
@@ -844,7 +792,7 @@ TEST_F(PipelineTest, AudioTimeUpdateDuringSeek) {
streams.push_back(audio_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializePipeline(PIPELINE_OK);
float playback_rate = 1.0f;
@@ -901,7 +849,7 @@ TEST_F(PipelineTest, DeleteAfterStop) {
MockDemuxerStreamVector streams;
streams.push_back(audio_stream());
InitializeDemuxer(&streams);
- InitializeAudioRenderer(audio_stream(), false);
+ InitializeAudioRenderer(audio_stream());
InitializePipeline(PIPELINE_OK);
ExpectStop();
@@ -1011,13 +959,13 @@ class PipelineTeardownTest : public PipelineTest {
if (state == kInitAudioRenderer) {
if (stop_or_error == kStop) {
- EXPECT_CALL(*audio_renderer_, Initialize(_, _, _, _, _, _, _, _))
+ EXPECT_CALL(*audio_renderer_, Initialize(_, _, _, _, _, _, _))
.WillOnce(DoAll(Stop(pipeline_.get(), stop_cb),
RunCallback<1>(PIPELINE_OK)));
EXPECT_CALL(callbacks_, OnStop());
} else {
status = PIPELINE_ERROR_INITIALIZATION_FAILED;
- EXPECT_CALL(*audio_renderer_, Initialize(_, _, _, _, _, _, _, _))
+ EXPECT_CALL(*audio_renderer_, Initialize(_, _, _, _, _, _, _))
.WillOnce(RunCallback<1>(status));
}
@@ -1026,7 +974,7 @@ class PipelineTeardownTest : public PipelineTest {
return status;
}
- EXPECT_CALL(*audio_renderer_, Initialize(_, _, _, _, _, _, _, _))
+ EXPECT_CALL(*audio_renderer_, Initialize(_, _, _, _, _, _, _))
.WillOnce(RunCallback<1>(PIPELINE_OK));
if (state == kInitVideoRenderer) {
diff --git a/media/base/simd/convert_yuva_to_argb_mmx.inc b/media/base/simd/convert_yuva_to_argb_mmx.inc
index 5faa6a5423..d4933836ca 100644
--- a/media/base/simd/convert_yuva_to_argb_mmx.inc
+++ b/media/base/simd/convert_yuva_to_argb_mmx.inc
@@ -9,9 +9,10 @@
mangle(SYMBOL):
%assign stack_offset 0
- PROLOGUE 7, 7, 3, Y, U, V, A, ARGB, WIDTH, TABLE, TEMP
+ PROLOGUE 7, 7, 3, Y, U, V, A, ARGB, WIDTH, TABLE
PUSH WIDTHq
DEFINE_ARGS Y, U, V, A, ARGB, TABLE, TEMP
+ mov TABLEq, TEMPq
jmp .convertend
.convertloop:
@@ -39,11 +40,25 @@ mangle(SYMBOL):
psraw mm2, 6
packuswb mm1, mm2
- ; Unpack and multiply by alpha value, then repack high bytes of words.
+ ; Unpack
movq mm0, mm1
pxor mm2, mm2
punpcklbw mm0, mm2
punpckhbw mm1, mm2
+
+ ; Add one to our alpha values, this is a somewhat unfortunate hack; while
+ ; the pack/unpack above handle saturating any negative numbers to 0, they also
+ ; truncate the alpha value to 255. The math ahead wants to produce the same
+ ; ARGB alpha value as the source pixel in YUVA, but this depends on the alpha
+ ; value in |mm0| and |mm1| being 256, (let A be the source image alpha,
+ ; 256 * A >> 8 == A, whereas 255 * A >> 8 is off by one except at 0).
+ mov TEMPq, 0x00010000
+ movd mm2, TEMPd
+ psllq mm2, 32
+ paddsw mm0, mm2
+ paddsw mm1, mm2
+
+ ; Multiply by alpha value, then repack high bytes of words.
movzx TEMPd, BYTE [Aq]
movq mm2, [TABLEq + 6144 + 8 * TEMPq]
pmullw mm0, mm2
@@ -79,6 +94,13 @@ mangle(SYMBOL):
; Multiply ARGB by alpha value.
pxor mm0, mm0
punpcklbw mm1, mm0
+
+ ; See above note about this hack.
+ mov TEMPq, 0x00010000
+ movd mm0, TEMPd
+ psllq mm0, 32
+ paddsw mm1, mm0
+
movzx TEMPd, BYTE [Aq]
movq mm0, [TABLEq + 6144 + 8 * TEMPq]
pmullw mm1, mm0
diff --git a/media/base/yuv_convert_unittest.cc b/media/base/yuv_convert_unittest.cc
index 73deb1ff91..85d3693ec8 100644
--- a/media/base/yuv_convert_unittest.cc
+++ b/media/base/yuv_convert_unittest.cc
@@ -37,6 +37,11 @@ static const int kRGBSizeScaled = kScaledWidth * kScaledHeight * kBpp;
static const int kRGB24Size = kSourceYSize * 3;
static const int kRGBSizeConverted = kSourceYSize * kBpp;
+#if !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY)
+static const int kSourceAOffset = kSourceYSize * 12 / 8;
+static const int kYUVA12Size = kSourceYSize * 20 / 8;
+#endif
+
// Helper for reading test data into a scoped_ptr<uint8[]>.
static void ReadData(const base::FilePath::CharType* filename,
int expected_size,
@@ -69,6 +74,12 @@ static void ReadYV16Data(scoped_ptr<uint8[]>* data) {
ReadData(FILE_PATH_LITERAL("bali_640x360_P422.yuv"), kYUV16Size, data);
}
+#if !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY)
+static void ReadYV12AData(scoped_ptr<uint8[]>* data) {
+ ReadData(FILE_PATH_LITERAL("bali_640x360_P420_alpha.yuv"), kYUVA12Size, data);
+}
+#endif
+
static void ReadRGB24Data(scoped_ptr<uint8[]>* data) {
ReadData(FILE_PATH_LITERAL("bali_640x360_RGB24.rgb"), kRGB24Size, data);
}
@@ -517,6 +528,48 @@ TEST(YUVConvertTest, DownScaleYUVToRGB32WithRect) {
}
#if !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY)
+TEST(YUVConvertTest, YUVAtoARGB_MMX_MatchReference) {
+ // Allocate all surfaces.
+ scoped_ptr<uint8[]> yuv_bytes;
+ scoped_ptr<uint8[]> rgb_bytes(new uint8[kRGBSize]);
+ scoped_ptr<uint8[]> rgb_converted_bytes(new uint8[kRGBSizeConverted]);
+ scoped_ptr<uint8[]> rgb_converted_bytes_ref(new uint8[kRGBSizeConverted]);
+
+ // Read YUV reference data from file.
+ ReadYV12AData(&yuv_bytes);
+
+ // Convert a frame of YUV to 32 bit ARGB using both C and MMX versions.
+ media::ConvertYUVAToARGB_C(yuv_bytes.get(),
+ yuv_bytes.get() + kSourceUOffset,
+ yuv_bytes.get() + kSourceVOffset,
+ yuv_bytes.get() + kSourceAOffset,
+ rgb_converted_bytes_ref.get(),
+ kSourceWidth,
+ kSourceHeight,
+ kSourceWidth,
+ kSourceWidth / 2,
+ kSourceWidth,
+ kSourceWidth * kBpp,
+ media::YV12);
+ media::ConvertYUVAToARGB_MMX(yuv_bytes.get(),
+ yuv_bytes.get() + kSourceUOffset,
+ yuv_bytes.get() + kSourceVOffset,
+ yuv_bytes.get() + kSourceAOffset,
+ rgb_converted_bytes.get(),
+ kSourceWidth,
+ kSourceHeight,
+ kSourceWidth,
+ kSourceWidth / 2,
+ kSourceWidth,
+ kSourceWidth * kBpp,
+ media::YV12);
+
+ EXPECT_EQ(0,
+ memcmp(rgb_converted_bytes.get(),
+ rgb_converted_bytes_ref.get(),
+ kRGBSizeConverted));
+}
+
TEST(YUVConvertTest, RGB32ToYUV_SSE2_MatchReference) {
base::CPU cpu;
if (!cpu.has_sse2()) {
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index 3813348532..c697bee69f 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -103,8 +103,8 @@ MEDIA_EXPORT void AVCodecContextToAudioDecoderConfig(
// Converts FFmpeg's channel layout to chrome's ChannelLayout. |channels| can
// be used when FFmpeg's channel layout is not informative in order to make a
// good guess about the plausible channel layout based on number of channels.
-ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout,
- int channels);
+MEDIA_EXPORT ChannelLayout ChannelLayoutToChromeChannelLayout(int64_t layout,
+ int channels);
// Converts FFmpeg's audio sample format to Chrome's SampleFormat.
MEDIA_EXPORT SampleFormat
diff --git a/media/filters/audio_renderer_impl.cc b/media/filters/audio_renderer_impl.cc
index 2b821622a2..faec58ef65 100644
--- a/media/filters/audio_renderer_impl.cc
+++ b/media/filters/audio_renderer_impl.cc
@@ -235,7 +235,6 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
const base::Closure& underflow_cb,
const TimeCB& time_cb,
const base::Closure& ended_cb,
- const base::Closure& disabled_cb,
const PipelineStatusCB& error_cb) {
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK(stream);
@@ -245,7 +244,6 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
DCHECK(!underflow_cb.is_null());
DCHECK(!time_cb.is_null());
DCHECK(!ended_cb.is_null());
- DCHECK(!disabled_cb.is_null());
DCHECK(!error_cb.is_null());
DCHECK_EQ(kUninitialized, state_);
DCHECK(sink_);
@@ -256,7 +254,6 @@ void AudioRendererImpl::Initialize(DemuxerStream* stream,
underflow_cb_ = underflow_cb;
time_cb_ = time_cb;
ended_cb_ = ended_cb;
- disabled_cb_ = disabled_cb;
error_cb_ = error_cb;
expecting_config_changes_ = stream->SupportsConfigChanges();
@@ -682,8 +679,12 @@ void AudioRendererImpl::UpdateEarliestEndTime_Locked(
}
void AudioRendererImpl::OnRenderError() {
+ // UMA data tells us this happens ~0.01% of the time. Trigger an error instead
+ // of trying to gracefully fall back to a fake sink. It's very likely
+ // OnRenderError() should be removed and the audio stack handle errors without
+ // notifying clients. See http://crbug.com/234708 for details.
HistogramRendererEvent(RENDER_ERROR);
- disabled_cb_.Run();
+ error_cb_.Run(PIPELINE_ERROR_DECODE);
}
void AudioRendererImpl::DisableUnderflowForTesting() {
diff --git a/media/filters/audio_renderer_impl.h b/media/filters/audio_renderer_impl.h
index 4e8ad01825..cf5a58a9df 100644
--- a/media/filters/audio_renderer_impl.h
+++ b/media/filters/audio_renderer_impl.h
@@ -71,7 +71,6 @@ class MEDIA_EXPORT AudioRendererImpl
const base::Closure& underflow_cb,
const TimeCB& time_cb,
const base::Closure& ended_cb,
- const base::Closure& disabled_cb,
const PipelineStatusCB& error_cb) OVERRIDE;
virtual void Play(const base::Closure& callback) OVERRIDE;
virtual void Pause(const base::Closure& callback) OVERRIDE;
@@ -215,7 +214,6 @@ class MEDIA_EXPORT AudioRendererImpl
base::Closure underflow_cb_;
TimeCB time_cb_;
base::Closure ended_cb_;
- base::Closure disabled_cb_;
PipelineStatusCB error_cb_;
// Callback provided to Flush().
diff --git a/media/filters/audio_renderer_impl_unittest.cc b/media/filters/audio_renderer_impl_unittest.cc
index 8a9af82d52..7556fc7171 100644
--- a/media/filters/audio_renderer_impl_unittest.cc
+++ b/media/filters/audio_renderer_impl_unittest.cc
@@ -118,7 +118,6 @@ class AudioRendererImplTest : public ::testing::Test {
MOCK_METHOD1(OnStatistics, void(const PipelineStatistics&));
MOCK_METHOD0(OnUnderflow, void());
- MOCK_METHOD0(OnDisabled, void());
MOCK_METHOD1(OnError, void(PipelineStatus));
void OnAudioTimeCallback(TimeDelta current_time, TimeDelta max_time) {
@@ -137,8 +136,6 @@ class AudioRendererImplTest : public ::testing::Test {
base::Bind(&AudioRendererImplTest::OnAudioTimeCallback,
base::Unretained(this)),
ended_event_.GetClosure(),
- base::Bind(&AudioRendererImplTest::OnDisabled,
- base::Unretained(this)),
base::Bind(&AudioRendererImplTest::OnError,
base::Unretained(this)));
}
@@ -997,4 +994,13 @@ TEST_F(AudioRendererImplTest, ImmediateEndOfStream) {
WaitForEnded();
}
+TEST_F(AudioRendererImplTest, OnRenderErrorCausesDecodeError) {
+ Initialize();
+ Preroll();
+ Play();
+
+ EXPECT_CALL(*this, OnError(PIPELINE_ERROR_DECODE));
+ sink_->OnRenderError();
+}
+
} // namespace media
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 7503b22212..26d09b1e5c 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -17,6 +17,7 @@
#include "media/base/bind_to_current_loop.h"
#include "media/base/stream_parser_buffer.h"
#include "media/base/video_decoder_config.h"
+#include "media/filters/frame_processor.h"
#include "media/filters/legacy_frame_processor.h"
#include "media/filters/stream_parser_factory.h"
@@ -132,6 +133,10 @@ class SourceState {
// Sets |frame_processor_|'s sequence mode to |sequence_mode|.
void SetSequenceMode(bool sequence_mode);
+ // Signals the coded frame processor to update its group start timestamp to be
+ // |timestamp_offset| if it is in sequence append mode.
+ void SetGroupStartTimestampIfInSequenceMode(base::TimeDelta timestamp_offset);
+
// Returns the range of buffered data in this source, capped at |duration|.
// |ended| - Set to true if end of stream has been signaled and the special
// end of stream range logic needs to be executed.
@@ -229,6 +234,8 @@ class SourceState {
// Indicates that timestampOffset should be updated automatically during
// OnNewBuffers() based on the earliest end timestamp of the buffers provided.
+ // TODO(wolenetz): Refactor this function while integrating April 29, 2014
+ // changes to MSE spec. See http://crbug.com/371499.
bool auto_update_timestamp_offset_;
DISALLOW_COPY_AND_ASSIGN(SourceState);
@@ -286,15 +293,22 @@ void SourceState::SetSequenceMode(bool sequence_mode) {
frame_processor_->SetSequenceMode(sequence_mode);
}
+void SourceState::SetGroupStartTimestampIfInSequenceMode(
+ base::TimeDelta timestamp_offset) {
+ DCHECK(!parsing_media_segment_);
+
+ frame_processor_->SetGroupStartTimestampIfInSequenceMode(timestamp_offset);
+}
+
bool SourceState::Append(const uint8* data, size_t length,
TimeDelta append_window_start,
TimeDelta append_window_end,
TimeDelta* timestamp_offset) {
DCHECK(timestamp_offset);
DCHECK(!timestamp_offset_during_append_);
- timestamp_offset_during_append_ = timestamp_offset;
append_window_start_during_append_ = append_window_start;
append_window_end_during_append_ = append_window_end;
+ timestamp_offset_during_append_ = timestamp_offset;
// TODO(wolenetz/acolwell): Curry and pass a NewBuffersCB here bound with
// append window and timestamp offset pointer. See http://crbug.com/351454.
@@ -1065,12 +1079,6 @@ void ChunkDemuxer::Seek(TimeDelta time, const PipelineStatusCB& cb) {
base::ResetAndReturn(&seek_cb_).Run(PIPELINE_OK);
}
-void ChunkDemuxer::OnAudioRendererDisabled() {
- base::AutoLock auto_lock(lock_);
- audio_->Shutdown();
- disabled_audio_ = audio_.Pass();
-}
-
// Demuxer implementation.
DemuxerStream* ChunkDemuxer::GetStream(DemuxerStream::Type type) {
DCHECK_NE(type, DemuxerStream::TEXT);
@@ -1162,14 +1170,17 @@ ChunkDemuxer::Status ChunkDemuxer::AddId(
if (has_video)
source_id_video_ = id;
- if (!use_legacy_frame_processor) {
- DLOG(WARNING) << "New frame processor is not yet supported. Using legacy.";
+ scoped_ptr<FrameProcessorBase> frame_processor;
+ if (use_legacy_frame_processor) {
+ frame_processor.reset(new LegacyFrameProcessor(
+ base::Bind(&ChunkDemuxer::IncreaseDurationIfNecessary,
+ base::Unretained(this))));
+ } else {
+ frame_processor.reset(new FrameProcessor(
+ base::Bind(&ChunkDemuxer::IncreaseDurationIfNecessary,
+ base::Unretained(this))));
}
- scoped_ptr<FrameProcessorBase> frame_processor(new LegacyFrameProcessor(
- base::Bind(&ChunkDemuxer::IncreaseDurationIfNecessary,
- base::Unretained(this))));
-
scoped_ptr<SourceState> source_state(
new SourceState(stream_parser.Pass(),
frame_processor.Pass(), log_cb_,
@@ -1395,6 +1406,20 @@ void ChunkDemuxer::SetSequenceMode(const std::string& id,
source_state_map_[id]->SetSequenceMode(sequence_mode);
}
+void ChunkDemuxer::SetGroupStartTimestampIfInSequenceMode(
+ const std::string& id,
+ base::TimeDelta timestamp_offset) {
+ base::AutoLock auto_lock(lock_);
+ DVLOG(1) << "SetGroupStartTimestampIfInSequenceMode(" << id << ", "
+ << timestamp_offset.InSecondsF() << ")";
+ CHECK(IsValidId(id));
+ DCHECK_NE(state_, ENDED);
+
+ source_state_map_[id]->SetGroupStartTimestampIfInSequenceMode(
+ timestamp_offset);
+}
+
+
void ChunkDemuxer::MarkEndOfStream(PipelineStatus status) {
DVLOG(1) << "MarkEndOfStream(" << status << ")";
base::AutoLock auto_lock(lock_);
@@ -1625,6 +1650,14 @@ void ChunkDemuxer::UpdateDuration(TimeDelta new_duration) {
void ChunkDemuxer::IncreaseDurationIfNecessary(TimeDelta new_duration) {
DCHECK(new_duration != kNoTimestamp());
+ DCHECK(new_duration != kInfiniteDuration());
+
+ // Per April 1, 2014 MSE spec editor's draft:
+ // https://dvcs.w3.org/hg/html-media/raw-file/d471a4412040/media-source/
+ // media-source.html#sourcebuffer-coded-frame-processing
+ // 5. If the media segment contains data beyond the current duration, then run
+ // the duration change algorithm with new duration set to the maximum of
+ // the current duration and the group end timestamp.
if (new_duration <= duration_)
return;
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index 65867466c3..807839370b 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -23,7 +23,7 @@ namespace media {
class FFmpegURLProtocol;
class SourceState;
-class ChunkDemuxerStream : public DemuxerStream {
+class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
public:
typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue;
@@ -160,7 +160,6 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
bool enable_text_tracks) OVERRIDE;
virtual void Stop(const base::Closure& callback) OVERRIDE;
virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE;
- virtual void OnAudioRendererDisabled() OVERRIDE;
virtual DemuxerStream* GetStream(DemuxerStream::Type type) OVERRIDE;
virtual base::TimeDelta GetStartTime() const OVERRIDE;
virtual base::Time GetTimelineOffset() const OVERRIDE;
@@ -194,10 +193,7 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
// Registers a new |id| to use for AppendData() calls. |type| indicates
// the MIME type for the data that we intend to append for this ID.
// |use_legacy_frame_processor| determines which of LegacyFrameProcessor or
- // a (not yet implemented) more compliant frame processor to use to process
- // parsed frames from AppendData() calls.
- // TODO(wolenetz): Enable usage of new frame processor based on this flag.
- // See http://crbug.com/249422.
+ // FrameProcessor to use to process parsed frames from AppendData() calls.
// kOk is returned if the demuxer has enough resources to support another ID
// and supports the format indicated by |type|.
// kNotSupported is returned if |type| is not a supported format.
@@ -256,6 +252,12 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
// mode.
void SetSequenceMode(const std::string& id, bool sequence_mode);
+ // Signals the coded frame processor for the source buffer associated with
+ // |id| to update its group start timestamp to be |timestamp_offset| if it is
+ // in sequence append mode.
+ void SetGroupStartTimestampIfInSequenceMode(const std::string& id,
+ base::TimeDelta timestamp_offset);
+
// Called to signal changes in the "end of stream"
// state. UnmarkEndOfStream() must not be called if a matching
// MarkEndOfStream() has not come before it.
@@ -364,9 +366,6 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
scoped_ptr<ChunkDemuxerStream> audio_;
scoped_ptr<ChunkDemuxerStream> video_;
- // Keeps |audio_| alive when audio has been disabled.
- scoped_ptr<ChunkDemuxerStream> disabled_audio_;
-
base::TimeDelta duration_;
// The duration passed to the last SetDuration(). If
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index 3bca45f646..55815c1690 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -134,10 +134,8 @@ static void OnSeekDone_OKExpected(bool* called, PipelineStatus status) {
static void LogFunc(const std::string& str) { DVLOG(1) << str; }
// Test parameter determines which coded frame processor is used to process
-// appended data. If true, LegacyFrameProcessor is used. Otherwise, (not yet
-// supported), a more compliant frame processor is used.
-// TODO(wolenetz): Enable usage of new frame processor based on this flag.
-// See http://crbug.com/249422.
+// appended data. If true, LegacyFrameProcessor is used. Otherwise, the new
+// FrameProcessor is used.
class ChunkDemuxerTest : public ::testing::TestWithParam<bool> {
protected:
enum CodecsIndex {
@@ -2817,12 +2815,11 @@ TEST_P(ChunkDemuxerTest, DurationChange) {
// Add data beginning at the currently set duration and expect a new duration
// to be signaled. Note that the last video block will have a higher end
// timestamp than the last audio block.
- // TODO(wolenetz): Compliant coded frame processor will emit a max of one
- // duration change per each ProcessFrames(). Remove the first expectation here
- // once compliant coded frame processor is used. See http://crbug.com/249422.
- const int kNewStreamDurationAudio = kStreamDuration + kAudioBlockDuration;
- EXPECT_CALL(host_, SetDuration(
+ if (use_legacy_frame_processor_) {
+ const int kNewStreamDurationAudio = kStreamDuration + kAudioBlockDuration;
+ EXPECT_CALL(host_, SetDuration(
base::TimeDelta::FromMilliseconds(kNewStreamDurationAudio)));
+ }
const int kNewStreamDurationVideo = kStreamDuration + kVideoBlockDuration;
EXPECT_CALL(host_, SetDuration(
base::TimeDelta::FromMilliseconds(kNewStreamDurationVideo)));
@@ -2849,12 +2846,11 @@ TEST_P(ChunkDemuxerTest, DurationChangeTimestampOffset) {
ASSERT_TRUE(SetTimestampOffset(kSourceId, kDefaultDuration()));
- // TODO(wolenetz): Compliant coded frame processor will emit a max of one
- // duration change per each ProcessFrames(). Remove the first expectation here
- // once compliant coded frame processor is used. See http://crbug.com/249422.
- EXPECT_CALL(host_, SetDuration(
- kDefaultDuration() + base::TimeDelta::FromMilliseconds(
- kAudioBlockDuration * 2)));
+ if (use_legacy_frame_processor_) {
+ EXPECT_CALL(host_, SetDuration(
+ kDefaultDuration() + base::TimeDelta::FromMilliseconds(
+ kAudioBlockDuration * 2)));
+ }
EXPECT_CALL(host_, SetDuration(
kDefaultDuration() + base::TimeDelta::FromMilliseconds(
kVideoBlockDuration * 2)));
@@ -2902,26 +2898,6 @@ TEST_P(ChunkDemuxerTest, Shutdown_BeforeInitialize) {
message_loop_.RunUntilIdle();
}
-TEST_P(ChunkDemuxerTest, ReadAfterAudioDisabled) {
- ASSERT_TRUE(InitDemuxer(HAS_AUDIO | HAS_VIDEO));
- AppendCluster(kDefaultFirstCluster());
-
- DemuxerStream* stream = demuxer_->GetStream(DemuxerStream::AUDIO);
- ASSERT_TRUE(stream);
-
- // The stream should no longer be present.
- demuxer_->OnAudioRendererDisabled();
- ASSERT_FALSE(demuxer_->GetStream(DemuxerStream::AUDIO));
-
- // Normally this would return an audio buffer at timestamp zero, but
- // all reads should return EOS buffers when disabled.
- bool audio_read_done = false;
- stream->Read(base::Bind(&OnReadDone_EOSExpected, &audio_read_done));
- message_loop_.RunUntilIdle();
-
- EXPECT_TRUE(audio_read_done);
-}
-
// Verifies that signaling end of stream while stalled at a gap
// boundary does not trigger end of stream buffers to be returned.
TEST_P(ChunkDemuxerTest, EndOfStreamWhileWaitingForGapToBeFilled) {
@@ -3275,8 +3251,9 @@ TEST_P(ChunkDemuxerTest, SeekCompletesWithoutTextCues) {
CheckExpectedBuffers(video_stream, "180 210");
}
-// TODO(wolenetz): Enable testing of new frame processor based on this flag,
-// once the new processor has landed. See http://crbug.com/249422.
+// Generate two sets of tests: one using FrameProcessor, and one using
+// LegacyFrameProcessor.
+INSTANTIATE_TEST_CASE_P(NewFrameProcessor, ChunkDemuxerTest, Values(false));
INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, ChunkDemuxerTest, Values(true));
} // namespace media
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index dd41410d72..061d631bb6 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -417,7 +417,6 @@ FFmpegDemuxer::FFmpegDemuxer(
bitrate_(0),
start_time_(kNoTimestamp()),
liveness_(LIVENESS_UNKNOWN),
- audio_disabled_(false),
text_enabled_(false),
duration_known_(false),
need_key_cb_(need_key_cb),
@@ -465,17 +464,6 @@ void FFmpegDemuxer::Seek(base::TimeDelta time, const PipelineStatusCB& cb) {
&FFmpegDemuxer::OnSeekFrameDone, weak_factory_.GetWeakPtr(), cb));
}
-void FFmpegDemuxer::OnAudioRendererDisabled() {
- DCHECK(task_runner_->BelongsToCurrentThread());
- audio_disabled_ = true;
- StreamVector::iterator iter;
- for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
- if (*iter && (*iter)->type() == DemuxerStream::AUDIO) {
- (*iter)->Stop();
- }
- }
-}
-
void FFmpegDemuxer::Initialize(DemuxerHost* host,
const PipelineStatusCB& status_cb,
bool enable_text_tracks) {
@@ -906,10 +894,7 @@ void FFmpegDemuxer::OnReadFrameDone(ScopedAVPacket packet, int result) {
// Defend against ffmpeg giving us a bad stream index.
if (packet->stream_index >= 0 &&
packet->stream_index < static_cast<int>(streams_.size()) &&
- streams_[packet->stream_index] &&
- (!audio_disabled_ ||
- streams_[packet->stream_index]->type() != DemuxerStream::AUDIO)) {
-
+ streams_[packet->stream_index]) {
// TODO(scherkus): Fix demuxing upstream to never return packets w/o data
// when av_read_frame() returns success code. See bug comment for ideas:
//
@@ -1002,10 +987,8 @@ void FFmpegDemuxer::StreamHasEnded() {
DCHECK(task_runner_->BelongsToCurrentThread());
StreamVector::iterator iter;
for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
- if (!*iter ||
- (audio_disabled_ && (*iter)->type() == DemuxerStream::AUDIO)) {
+ if (!*iter)
continue;
- }
(*iter)->SetEndOfStream();
}
}
@@ -1025,8 +1008,7 @@ void FFmpegDemuxer::NotifyCapacityAvailable() {
void FFmpegDemuxer::NotifyBufferingChanged() {
DCHECK(task_runner_->BelongsToCurrentThread());
Ranges<base::TimeDelta> buffered;
- FFmpegDemuxerStream* audio =
- audio_disabled_ ? NULL : GetFFmpegStream(DemuxerStream::AUDIO);
+ FFmpegDemuxerStream* audio = GetFFmpegStream(DemuxerStream::AUDIO);
FFmpegDemuxerStream* video = GetFFmpegStream(DemuxerStream::VIDEO);
if (audio && video) {
buffered = audio->GetBufferedRanges().IntersectionWith(
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index 778ab5a4f1..02682bbc8b 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -154,7 +154,6 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
bool enable_text_tracks) OVERRIDE;
virtual void Stop(const base::Closure& callback) OVERRIDE;
virtual void Seek(base::TimeDelta time, const PipelineStatusCB& cb) OVERRIDE;
- virtual void OnAudioRendererDisabled() OVERRIDE;
virtual DemuxerStream* GetStream(DemuxerStream::Type type) OVERRIDE;
virtual base::TimeDelta GetStartTime() const OVERRIDE;
virtual base::Time GetTimelineOffset() const OVERRIDE;
@@ -258,10 +257,6 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
// Liveness of the stream.
Liveness liveness_;
- // Whether audio has been disabled for this demuxer (in which case this class
- // drops packets destined for AUDIO demuxer streams on the floor).
- bool audio_disabled_;
-
// Whether text streams have been enabled for this demuxer.
bool text_enabled_;
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index cab596382f..a1614a4212 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -600,40 +600,6 @@ TEST_F(FFmpegDemuxerTest, Stop) {
demuxer_.reset();
}
-TEST_F(FFmpegDemuxerTest, DisableAudioStream) {
- // We are doing the following things here:
- // 1. Initialize the demuxer with audio and video stream.
- // 2. Send a "disable audio stream" message to the demuxer.
- // 3. Demuxer will free audio packets even if audio stream was initialized.
- CreateDemuxer("bear-320x240.webm");
- InitializeDemuxer();
-
- // Submit a "disable audio stream" message to the demuxer.
- demuxer_->OnAudioRendererDisabled();
- message_loop_.RunUntilIdle();
-
- // Get our streams.
- DemuxerStream* video = demuxer_->GetStream(DemuxerStream::VIDEO);
- DemuxerStream* audio = demuxer_->GetStream(DemuxerStream::AUDIO);
- ASSERT_TRUE(video);
- ASSERT_TRUE(audio);
-
- // The audio stream should have been prematurely stopped.
- EXPECT_FALSE(IsStreamStopped(DemuxerStream::VIDEO));
- EXPECT_TRUE(IsStreamStopped(DemuxerStream::AUDIO));
-
- // Attempt a read from the video stream: it should return valid data.
- video->Read(NewReadCB(FROM_HERE, 22084, 0));
- message_loop_.Run();
-
- // Attempt a read from the audio stream: it should immediately return end of
- // stream without requiring the message loop to read data.
- bool got_eos_buffer = false;
- audio->Read(base::Bind(&EosOnReadDone, &got_eos_buffer));
- message_loop_.RunUntilIdle();
- EXPECT_TRUE(got_eos_buffer);
-}
-
// Verify that seek works properly when the WebM cues data is at the start of
// the file instead of at the end.
TEST_F(FFmpegDemuxerTest, SeekWithCuesBeforeFirstCluster) {
diff --git a/media/filters/frame_processor.cc b/media/filters/frame_processor.cc
new file mode 100644
index 0000000000..7f83a226b7
--- /dev/null
+++ b/media/filters/frame_processor.cc
@@ -0,0 +1,378 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "media/filters/frame_processor.h"
+
+#include "base/stl_util.h"
+#include "media/base/buffers.h"
+#include "media/base/stream_parser_buffer.h"
+
+namespace media {
+
+FrameProcessor::FrameProcessor(const UpdateDurationCB& update_duration_cb)
+ : update_duration_cb_(update_duration_cb) {
+ DVLOG(2) << __FUNCTION__ << "()";
+ DCHECK(!update_duration_cb.is_null());
+}
+
+FrameProcessor::~FrameProcessor() {
+ DVLOG(2) << __FUNCTION__;
+}
+
+void FrameProcessor::SetSequenceMode(bool sequence_mode) {
+ DVLOG(2) << __FUNCTION__ << "(" << sequence_mode << ")";
+
+ // Per April 1, 2014 MSE spec editor's draft:
+ // https://dvcs.w3.org/hg/html-media/raw-file/d471a4412040/media-source/media-source.html#widl-SourceBuffer-mode
+ // Step 7: If the new mode equals "sequence", then set the group start
+ // timestamp to the group end timestamp.
+ if (sequence_mode) {
+ DCHECK(kNoTimestamp() != group_end_timestamp_);
+ group_start_timestamp_ = group_end_timestamp_;
+ }
+
+ // Step 8: Update the attribute to new mode.
+ sequence_mode_ = sequence_mode;
+}
+
+bool FrameProcessor::ProcessFrames(
+ const StreamParser::BufferQueue& audio_buffers,
+ const StreamParser::BufferQueue& video_buffers,
+ const StreamParser::TextBufferQueueMap& text_map,
+ base::TimeDelta append_window_start,
+ base::TimeDelta append_window_end,
+ bool* new_media_segment,
+ base::TimeDelta* timestamp_offset) {
+ StreamParser::BufferQueue frames;
+ if (!MergeBufferQueues(audio_buffers, video_buffers, text_map, &frames)) {
+ DVLOG(2) << "Parse error discovered while merging parser's buffers";
+ return false;
+ }
+
+ DCHECK(!frames.empty());
+
+ // Implements the coded frame processing algorithm's outer loop for step 1.
+ // Note that ProcessFrame() implements an inner loop for a single frame that
+ // handles "jump to the Loop Top step to restart processing of the current
+ // coded frame" per April 1, 2014 MSE spec editor's draft:
+ // https://dvcs.w3.org/hg/html-media/raw-file/d471a4412040/media-source/
+ // media-source.html#sourcebuffer-coded-frame-processing
+ // 1. For each coded frame in the media segment run the following steps:
+ for (StreamParser::BufferQueue::const_iterator frames_itr = frames.begin();
+ frames_itr != frames.end(); ++frames_itr) {
+ if (!ProcessFrame(*frames_itr, append_window_start, append_window_end,
+ timestamp_offset, new_media_segment)) {
+ return false;
+ }
+ }
+
+ // 2. - 4. Are handled by the WebMediaPlayer / Pipeline / Media Element.
+
+ // Step 5:
+ update_duration_cb_.Run(group_end_timestamp_);
+
+ return true;
+}
+
+bool FrameProcessor::ProcessFrame(scoped_refptr<StreamParserBuffer> frame,
+ base::TimeDelta append_window_start,
+ base::TimeDelta append_window_end,
+ base::TimeDelta* timestamp_offset,
+ bool* new_media_segment) {
+ // Implements the loop within step 1 of the coded frame processing algorithm
+ // for a single input frame per April 1, 2014 MSE spec editor's draft:
+ // https://dvcs.w3.org/hg/html-media/raw-file/d471a4412040/media-source/
+ // media-source.html#sourcebuffer-coded-frame-processing
+
+ while (true) {
+ // 1. Loop Top: Let presentation timestamp be a double precision floating
+ // point representation of the coded frame's presentation timestamp in
+ // seconds.
+ // 2. Let decode timestamp be a double precision floating point
+ // representation of the coded frame's decode timestamp in seconds.
+ // 3. Let frame duration be a double precision floating point representation
+ // of the coded frame's duration in seconds.
+ // We use base::TimeDelta instead of double.
+ base::TimeDelta presentation_timestamp = frame->timestamp();
+ base::TimeDelta decode_timestamp = frame->GetDecodeTimestamp();
+ base::TimeDelta frame_duration = frame->duration();
+
+ DVLOG(3) << __FUNCTION__ << ": Processing frame "
+ << "Type=" << frame->type()
+ << ", TrackID=" << frame->track_id()
+ << ", PTS=" << presentation_timestamp.InSecondsF()
+ << ", DTS=" << decode_timestamp.InSecondsF()
+ << ", DUR=" << frame_duration.InSecondsF();
+
+ // Sanity check the timestamps.
+ if (presentation_timestamp < base::TimeDelta()) {
+ DVLOG(2) << __FUNCTION__ << ": Negative or unknown frame PTS: "
+ << presentation_timestamp.InSecondsF();
+ return false;
+ }
+ if (decode_timestamp < base::TimeDelta()) {
+ DVLOG(2) << __FUNCTION__ << ": Negative or unknown frame DTS: "
+ << decode_timestamp.InSecondsF();
+ return false;
+ }
+ if (decode_timestamp > presentation_timestamp) {
+ // TODO(wolenetz): Determine whether DTS>PTS should really be allowed. See
+ // http://crbug.com/354518.
+ DVLOG(2) << __FUNCTION__ << ": WARNING: Frame DTS("
+ << decode_timestamp.InSecondsF() << ") > PTS("
+ << presentation_timestamp.InSecondsF() << ")";
+ }
+
+ // TODO(acolwell/wolenetz): All stream parsers must emit valid (positive)
+ // frame durations. For now, we allow non-negative frame duration.
+ // See http://crbug.com/351166.
+ if (frame_duration == kNoTimestamp()) {
+ DVLOG(2) << __FUNCTION__ << ": Frame missing duration (kNoTimestamp())";
+ return false;
+ }
+ if (frame_duration < base::TimeDelta()) {
+ DVLOG(2) << __FUNCTION__ << ": Frame duration negative: "
+ << frame_duration.InSecondsF();
+ return false;
+ }
+
+ // 4. If mode equals "sequence" and group start timestamp is set, then run
+ // the following steps:
+ if (sequence_mode_ && group_start_timestamp_ != kNoTimestamp()) {
+ // 4.1. Set timestampOffset equal to group start timestamp -
+ // presentation timestamp.
+ *timestamp_offset = group_start_timestamp_ - presentation_timestamp;
+
+ DVLOG(3) << __FUNCTION__ << ": updated timestampOffset is now "
+ << timestamp_offset->InSecondsF();
+
+ // 4.2. Set group end timestamp equal to group start timestamp.
+ group_end_timestamp_ = group_start_timestamp_;
+
+ // 4.3. Set the need random access point flag on all track buffers to
+ // true.
+ SetAllTrackBuffersNeedRandomAccessPoint();
+
+ // 4.4. Unset group start timestamp.
+ group_start_timestamp_ = kNoTimestamp();
+ }
+
+ // 5. If timestampOffset is not 0, then run the following steps:
+ if (*timestamp_offset != base::TimeDelta()) {
+ // 5.1. Add timestampOffset to the presentation timestamp.
+ // Note: |frame| PTS is only updated if it survives processing.
+ presentation_timestamp += *timestamp_offset;
+
+ // 5.2. Add timestampOffset to the decode timestamp.
+ // Frame DTS is only updated if it survives processing.
+ decode_timestamp += *timestamp_offset;
+ }
+
+ // 6. Let track buffer equal the track buffer that the coded frame will be
+ // added to.
+
+ // Remap audio and video track types to their special singleton identifiers.
+ StreamParser::TrackId track_id = kAudioTrackId;
+ switch (frame->type()) {
+ case DemuxerStream::AUDIO:
+ break;
+ case DemuxerStream::VIDEO:
+ track_id = kVideoTrackId;
+ break;
+ case DemuxerStream::TEXT:
+ track_id = frame->track_id();
+ break;
+ case DemuxerStream::UNKNOWN:
+ case DemuxerStream::NUM_TYPES:
+ DCHECK(false) << ": Invalid frame type " << frame->type();
+ return false;
+ }
+
+ MseTrackBuffer* track_buffer = FindTrack(track_id);
+ if (!track_buffer) {
+ DVLOG(2) << __FUNCTION__ << ": Unknown track: type=" << frame->type()
+ << ", frame processor track id=" << track_id
+ << ", parser track id=" << frame->track_id();
+ return false;
+ }
+
+ // 7. If last decode timestamp for track buffer is set and decode timestamp
+ // is less than last decode timestamp
+ // OR
+ // If last decode timestamp for track buffer is set and the difference
+ // between decode timestamp and last decode timestamp is greater than 2
+ // times last frame duration:
+ base::TimeDelta last_decode_timestamp =
+ track_buffer->last_decode_timestamp();
+ if (last_decode_timestamp != kNoTimestamp()) {
+ base::TimeDelta dts_delta = decode_timestamp - last_decode_timestamp;
+ if (dts_delta < base::TimeDelta() ||
+ dts_delta > 2 * track_buffer->last_frame_duration()) {
+ // 7.1. If mode equals "segments": Set group end timestamp to
+ // presentation timestamp.
+ // If mode equals "sequence": Set group start timestamp equal to
+ // the group end timestamp.
+ if (!sequence_mode_) {
+ group_end_timestamp_ = presentation_timestamp;
+ // This triggers a discontinuity so we need to treat the next frames
+ // appended within the append window as if they were the beginning of
+ // a new segment.
+ *new_media_segment = true;
+ } else {
+ DVLOG(3) << __FUNCTION__ << " : Sequence mode discontinuity, GETS: "
+ << group_end_timestamp_.InSecondsF();
+ DCHECK(kNoTimestamp() != group_end_timestamp_);
+ group_start_timestamp_ = group_end_timestamp_;
+ }
+
+ // 7.2. - 7.5.:
+ Reset();
+
+ // 7.6. Jump to the Loop Top step above to restart processing of the
+ // current coded frame.
+ DVLOG(3) << __FUNCTION__ << ": Discontinuity: reprocessing frame";
+ continue;
+ }
+ }
+
+ // 8. If the presentation timestamp or decode timestamp is less than the
+ // presentation start time, then run the end of stream algorithm with the
+ // error parameter set to "decode", and abort these steps.
+ if (presentation_timestamp < base::TimeDelta() ||
+ decode_timestamp < base::TimeDelta()) {
+ DVLOG(2) << __FUNCTION__
+ << ": frame PTS=" << presentation_timestamp.InSecondsF()
+ << " or DTS=" << decode_timestamp.InSecondsF()
+ << " negative after applying timestampOffset and handling any "
+ << " discontinuity";
+ return false;
+ }
+
+ // 9. Let frame end timestamp equal the sum of presentation timestamp and
+ // frame duration.
+ base::TimeDelta frame_end_timestamp = presentation_timestamp +
+ frame_duration;
+
+ // 10. If presentation timestamp is less than appendWindowStart, then set
+ // the need random access point flag to true, drop the coded frame, and
+ // jump to the top of the loop to start processing the next coded
+ // frame.
+ // Note: We keep the result of partial discard of a buffer that overlaps
+ // |append_window_start| and does not end after |append_window_end|.
+ // 11. If frame end timestamp is greater than appendWindowEnd, then set the
+ // need random access point flag to true, drop the coded frame, and jump
+ // to the top of the loop to start processing the next coded frame.
+ if (presentation_timestamp < append_window_start ||
+ frame_end_timestamp > append_window_end) {
+ // See if a partial discard can be done around |append_window_start|.
+ // TODO(wolenetz): Refactor this into a base helper across legacy and
+ // new frame processors?
+ if (track_buffer->stream()->supports_partial_append_window_trimming() &&
+ presentation_timestamp < append_window_start &&
+ frame_end_timestamp > append_window_start &&
+ frame_end_timestamp <= append_window_end) {
+ DCHECK(frame->IsKeyframe());
+ DVLOG(1) << "Truncating buffer which overlaps append window start."
+ << " presentation_timestamp "
+ << presentation_timestamp.InSecondsF()
+ << " append_window_start " << append_window_start.InSecondsF();
+
+ // Adjust the timestamp of this frame forward to |append_window_start|,
+ // while decreasing the duration appropriately.
+ frame->set_discard_padding(std::make_pair(
+ append_window_start - presentation_timestamp, base::TimeDelta()));
+ presentation_timestamp = append_window_start; // |frame| updated below.
+ decode_timestamp = append_window_start; // |frame| updated below.
+ frame_duration = frame_end_timestamp - presentation_timestamp;
+ frame->set_duration(frame_duration);
+
+ // TODO(dalecurtis): This could also be done with |append_window_end|,
+ // but is not necessary since splice frames covert the overlap there.
+ } else {
+ track_buffer->set_needs_random_access_point(true);
+ DVLOG(3) << "Dropping frame that is outside append window.";
+
+ if (!sequence_mode_) {
+ // This also triggers a discontinuity so we need to treat the next
+ // frames appended within the append window as if they were the
+ // beginning of a new segment.
+ *new_media_segment = true;
+ }
+
+ return true;
+ }
+ }
+
+ // 12. If the need random access point flag on track buffer equals true,
+ // then run the following steps:
+ if (track_buffer->needs_random_access_point()) {
+ // 12.1. If the coded frame is not a random access point, then drop the
+ // coded frame and jump to the top of the loop to start processing
+ // the next coded frame.
+ if (!frame->IsKeyframe()) {
+ DVLOG(3) << __FUNCTION__
+ << ": Dropping frame that is not a random access point";
+ return true;
+ }
+
+ // 12.2. Set the need random access point flag on track buffer to false.
+ track_buffer->set_needs_random_access_point(false);
+ }
+
+ // We now have a processed buffer to append to the track buffer's stream.
+ // If it is the first in a new media segment or following a discontinuity,
+ // notify all the track buffers' streams that a new segment is beginning.
+ if (*new_media_segment) {
+ *new_media_segment = false;
+ NotifyNewMediaSegmentStarting(decode_timestamp);
+ }
+
+ DVLOG(3) << __FUNCTION__ << ": Sending processed frame to stream, "
+ << "PTS=" << presentation_timestamp.InSecondsF()
+ << ", DTS=" << decode_timestamp.InSecondsF();
+ frame->set_timestamp(presentation_timestamp);
+ frame->SetDecodeTimestamp(decode_timestamp);
+
+ // Steps 13-18:
+ // TODO(wolenetz): Collect and emit more than one buffer at a time, if
+ // possible. Also refactor SourceBufferStream to conform to spec GC timing.
+ // See http://crbug.com/371197.
+ StreamParser::BufferQueue buffer_to_append;
+ buffer_to_append.push_back(frame);
+ track_buffer->stream()->Append(buffer_to_append);
+
+ // 19. Set last decode timestamp for track buffer to decode timestamp.
+ track_buffer->set_last_decode_timestamp(decode_timestamp);
+
+ // 20. Set last frame duration for track buffer to frame duration.
+ track_buffer->set_last_frame_duration(frame_duration);
+
+ // 21. If highest presentation timestamp for track buffer is unset or frame
+ // end timestamp is greater than highest presentation timestamp, then
+ // set highest presentation timestamp for track buffer to frame end
+ // timestamp.
+ track_buffer->SetHighestPresentationTimestampIfIncreased(
+ frame_end_timestamp);
+
+ // 22. If frame end timestamp is greater than group end timestamp, then set
+ // group end timestamp equal to frame end timestamp.
+ DCHECK(group_end_timestamp_ >= base::TimeDelta());
+ if (frame_end_timestamp > group_end_timestamp_)
+ group_end_timestamp_ = frame_end_timestamp;
+
+ return true;
+ }
+
+ NOTREACHED();
+ return false;
+}
+
+void FrameProcessor::SetAllTrackBuffersNeedRandomAccessPoint() {
+ for (TrackBufferMap::iterator itr = track_buffers_.begin();
+ itr != track_buffers_.end(); ++itr) {
+ itr->second->set_needs_random_access_point(true);
+ }
+}
+
+} // namespace media
diff --git a/media/filters/frame_processor.h b/media/filters/frame_processor.h
new file mode 100644
index 0000000000..54505e1412
--- /dev/null
+++ b/media/filters/frame_processor.h
@@ -0,0 +1,60 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_FILTERS_FRAME_PROCESSOR_H_
+#define MEDIA_FILTERS_FRAME_PROCESSOR_H_
+
+#include "base/basictypes.h"
+#include "base/callback_forward.h"
+#include "base/time/time.h"
+#include "media/base/media_export.h"
+#include "media/base/stream_parser.h"
+#include "media/filters/frame_processor_base.h"
+
+namespace media {
+
+// Helper class that implements Media Source Extension's coded frame processing
+// algorithm.
+class MEDIA_EXPORT FrameProcessor : public FrameProcessorBase {
+ public:
+ typedef base::Callback<void(base::TimeDelta)> UpdateDurationCB;
+ explicit FrameProcessor(const UpdateDurationCB& update_duration_cb);
+ virtual ~FrameProcessor();
+
+ // FrameProcessorBase implementation
+ virtual void SetSequenceMode(bool sequence_mode) OVERRIDE;
+ virtual bool ProcessFrames(const StreamParser::BufferQueue& audio_buffers,
+ const StreamParser::BufferQueue& video_buffers,
+ const StreamParser::TextBufferQueueMap& text_map,
+ base::TimeDelta append_window_start,
+ base::TimeDelta append_window_end,
+ bool* new_media_segment,
+ base::TimeDelta* timestamp_offset) OVERRIDE;
+
+ private:
+ // Helper that processes one frame with the coded frame processing algorithm.
+ // Returns false on error or true on success.
+ bool ProcessFrame(scoped_refptr<StreamParserBuffer> frame,
+ base::TimeDelta append_window_start,
+ base::TimeDelta append_window_end,
+ base::TimeDelta* timestamp_offset,
+ bool* new_media_segment);
+
+ // Sets the need random access point flag on all track buffers to true.
+ void SetAllTrackBuffersNeedRandomAccessPoint();
+
+ // Tracks the MSE coded frame processing variable of same name. It stores the
+ // highest coded frame end timestamp across all coded frames in the current
+ // coded frame group. It is set to 0 when the SourceBuffer object is created
+ // and gets updated by ProcessFrames().
+ base::TimeDelta group_end_timestamp_;
+
+ UpdateDurationCB update_duration_cb_;
+
+ DISALLOW_COPY_AND_ASSIGN(FrameProcessor);
+};
+
+} // namespace media
+
+#endif // MEDIA_FILTERS_FRAME_PROCESSOR_H_
diff --git a/media/filters/frame_processor_base.cc b/media/filters/frame_processor_base.cc
index 3e088ed5dc..09b1b86c3b 100644
--- a/media/filters/frame_processor_base.cc
+++ b/media/filters/frame_processor_base.cc
@@ -10,7 +10,10 @@
namespace media {
MseTrackBuffer::MseTrackBuffer(ChunkDemuxerStream* stream)
- : needs_random_access_point_(true),
+ : last_decode_timestamp_(kNoTimestamp()),
+ last_frame_duration_(kNoTimestamp()),
+ highest_presentation_timestamp_(kNoTimestamp()),
+ needs_random_access_point_(true),
stream_(stream) {
DCHECK(stream_);
}
@@ -22,11 +25,23 @@ MseTrackBuffer::~MseTrackBuffer() {
void MseTrackBuffer::Reset() {
DVLOG(2) << __FUNCTION__ << "()";
+ last_decode_timestamp_ = kNoTimestamp();
+ last_frame_duration_ = kNoTimestamp();
+ highest_presentation_timestamp_ = kNoTimestamp();
needs_random_access_point_ = true;
}
+void MseTrackBuffer::SetHighestPresentationTimestampIfIncreased(
+ base::TimeDelta timestamp) {
+ if (highest_presentation_timestamp_ == kNoTimestamp() ||
+ timestamp > highest_presentation_timestamp_) {
+ highest_presentation_timestamp_ = timestamp;
+ }
+}
+
FrameProcessorBase::FrameProcessorBase()
- : sequence_mode_(false) {}
+ : sequence_mode_(false),
+ group_start_timestamp_(kNoTimestamp()) {}
FrameProcessorBase::~FrameProcessorBase() {
DVLOG(2) << __FUNCTION__ << "()";
@@ -34,6 +49,14 @@ FrameProcessorBase::~FrameProcessorBase() {
STLDeleteValues(&track_buffers_);
}
+void FrameProcessorBase::SetGroupStartTimestampIfInSequenceMode(
+ base::TimeDelta timestamp_offset) {
+ DVLOG(2) << __FUNCTION__ << "(" << timestamp_offset.InSecondsF() << ")";
+ DCHECK(kNoTimestamp() != timestamp_offset);
+ if (sequence_mode_)
+ group_start_timestamp_ = timestamp_offset;
+}
+
bool FrameProcessorBase::AddTrack(StreamParser::TrackId id,
ChunkDemuxerStream* stream) {
DVLOG(2) << __FUNCTION__ << "(): id=" << id;
@@ -63,4 +86,15 @@ MseTrackBuffer* FrameProcessorBase::FindTrack(StreamParser::TrackId id) {
return itr->second;
}
+void FrameProcessorBase::NotifyNewMediaSegmentStarting(
+ base::TimeDelta segment_timestamp) {
+ DVLOG(2) << __FUNCTION__ << "(" << segment_timestamp.InSecondsF() << ")";
+
+ for (TrackBufferMap::iterator itr = track_buffers_.begin();
+ itr != track_buffers_.end();
+ ++itr) {
+ itr->second->stream()->OnNewMediaSegment(segment_timestamp);
+ }
+}
+
} // namespace media
diff --git a/media/filters/frame_processor_base.h b/media/filters/frame_processor_base.h
index 8841998885..cc143e29d5 100644
--- a/media/filters/frame_processor_base.h
+++ b/media/filters/frame_processor_base.h
@@ -25,6 +25,27 @@ class MseTrackBuffer {
explicit MseTrackBuffer(ChunkDemuxerStream* stream);
~MseTrackBuffer();
+ // Get/set |last_decode_timestamp_|.
+ base::TimeDelta last_decode_timestamp() const {
+ return last_decode_timestamp_;
+ }
+ void set_last_decode_timestamp(base::TimeDelta timestamp) {
+ last_decode_timestamp_ = timestamp;
+ }
+
+ // Get/set |last_frame_duration_|.
+ base::TimeDelta last_frame_duration() const {
+ return last_frame_duration_;
+ }
+ void set_last_frame_duration(base::TimeDelta duration) {
+ last_frame_duration_ = duration;
+ }
+
+ // Gets |highest_presentation_timestamp_|.
+ base::TimeDelta highest_presentation_timestamp() const {
+ return highest_presentation_timestamp_;
+ }
+
// Get/set |needs_random_access_point_|.
bool needs_random_access_point() const {
return needs_random_access_point_;
@@ -36,12 +57,33 @@ class MseTrackBuffer {
// Gets a pointer to this track's ChunkDemuxerStream.
ChunkDemuxerStream* stream() const { return stream_; }
- // Sets |needs_random_access_point_| to true.
- // TODO(wolenetz): Add the rest of the new coded frame processing algorithm
- // track buffer attributes and reset them here. See http://crbug.com/249422.
+ // Unsets |last_decode_timestamp_|, unsets |last_frame_duration_|,
+ // unsets |highest_presentation_timestamp_|, and sets
+ // |needs_random_access_point_| to true.
void Reset();
+ // If |highest_presentation_timestamp_| is unset or |timestamp| is greater
+ // than |highest_presentation_timestamp_|, sets
+ // |highest_presentation_timestamp_| to |timestamp|. Note that bidirectional
+ // prediction between coded frames can cause |timestamp| to not be
+ // monotonically increasing even though the decode timestamps are
+ // monotonically increasing.
+ void SetHighestPresentationTimestampIfIncreased(base::TimeDelta timestamp);
+
private:
+ // The decode timestamp of the last coded frame appended in the current coded
+ // frame group. Initially kNoTimestamp(), meaning "unset".
+ base::TimeDelta last_decode_timestamp_;
+
+ // The coded frame duration of the last coded frame appended in the current
+ // coded frame group. Initially kNoTimestamp(), meaning "unset".
+ base::TimeDelta last_frame_duration_;
+
+ // The highest presentation timestamp encountered in a coded frame appended
+ // in the current coded frame group. Initially kNoTimestamp(), meaning
+ // "unset".
+ base::TimeDelta highest_presentation_timestamp_;
+
// Keeps track of whether the track buffer is waiting for a random access
// point coded frame. Initially set to true to indicate that a random access
// point coded frame is needed before anything can be added to the track
@@ -97,6 +139,10 @@ class MEDIA_EXPORT FrameProcessorBase {
bool* new_media_segment,
base::TimeDelta* timestamp_offset) = 0;
+ // Signals the frame processor to update its group start timestamp to be
+ // |timestamp_offset| if it is in sequence append mode.
+ void SetGroupStartTimestampIfInSequenceMode(base::TimeDelta timestamp_offset);
+
// Adds a new track with unique track ID |id|.
// If |id| has previously been added, returns false to indicate error.
// Otherwise, returns true, indicating future ProcessFrames() will emit
@@ -117,6 +163,10 @@ class MEDIA_EXPORT FrameProcessorBase {
// MseTrackBuffer. Otherwise, returns NULL.
MseTrackBuffer* FindTrack(StreamParser::TrackId id);
+ // Signals all track buffers' streams that a new media segment is starting
+ // with timestamp |segment_timestamp|.
+ void NotifyNewMediaSegmentStarting(base::TimeDelta segment_timestamp);
+
// The AppendMode of the associated SourceBuffer.
// See SetSequenceMode() for interpretation of |sequence_mode_|.
// Per http://www.w3.org/TR/media-source/#widl-SourceBuffer-mode:
@@ -126,6 +176,13 @@ class MEDIA_EXPORT FrameProcessorBase {
// TrackId-indexed map of each track's stream.
TrackBufferMap track_buffers_;
+
+ // Tracks the MSE coded frame processing variable of same name.
+ // Initially kNoTimestamp(), meaning "unset".
+ // Note: LegacyFrameProcessor does not use this member; it's here to reduce
+ // short-term plumbing of SetGroupStartTimestampIfInSequenceMode() until
+ // LegacyFrameProcessor is removed.
+ base::TimeDelta group_start_timestamp_;
};
} // namespace media
diff --git a/media/filters/frame_processor_unittest.cc b/media/filters/frame_processor_unittest.cc
new file mode 100644
index 0000000000..6061bfe976
--- /dev/null
+++ b/media/filters/frame_processor_unittest.cc
@@ -0,0 +1,573 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <map>
+#include <string>
+
+#include "base/bind.h"
+#include "base/message_loop/message_loop.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_split.h"
+#include "base/strings/string_util.h"
+#include "base/time/time.h"
+#include "media/base/mock_filters.h"
+#include "media/base/test_helpers.h"
+#include "media/filters/chunk_demuxer.h"
+#include "media/filters/frame_processor.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using ::testing::InSequence;
+using ::testing::StrictMock;
+using ::testing::Values;
+
+namespace media {
+
+typedef StreamParser::BufferQueue BufferQueue;
+typedef StreamParser::TextBufferQueueMap TextBufferQueueMap;
+typedef StreamParser::TrackId TrackId;
+
+static void LogFunc(const std::string& str) { DVLOG(1) << str; }
+
+// Used for setting expectations on callbacks. Using a StrictMock also lets us
+// test for missing or extra callbacks.
+class FrameProcessorTestCallbackHelper {
+ public:
+ FrameProcessorTestCallbackHelper() {}
+ virtual ~FrameProcessorTestCallbackHelper() {}
+
+ MOCK_METHOD1(PossibleDurationIncrease, void(base::TimeDelta new_duration));
+
+ // Helper that calls the mock method as well as does basic sanity checks on
+ // |new_duration|.
+ void OnPossibleDurationIncrease(base::TimeDelta new_duration) {
+ PossibleDurationIncrease(new_duration);
+ ASSERT_NE(kNoTimestamp(), new_duration);
+ ASSERT_NE(kInfiniteDuration(), new_duration);
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FrameProcessorTestCallbackHelper);
+};
+
+// Test parameter determines indicates if the TEST_P instance is targeted for
+// sequence mode (if true), or segments mode (if false).
+class FrameProcessorTest : public testing::TestWithParam<bool> {
+ protected:
+ FrameProcessorTest()
+ : frame_processor_(new FrameProcessor(base::Bind(
+ &FrameProcessorTestCallbackHelper::OnPossibleDurationIncrease,
+ base::Unretained(&callbacks_)))),
+ append_window_end_(kInfiniteDuration()),
+ new_media_segment_(false),
+ audio_id_(FrameProcessor::kAudioTrackId),
+ video_id_(FrameProcessor::kVideoTrackId),
+ frame_duration_(base::TimeDelta::FromMilliseconds(10)) {
+ }
+
+ enum StreamFlags {
+ HAS_AUDIO = 1 << 0,
+ HAS_VIDEO = 1 << 1
+ };
+
+ void AddTestTracks(int stream_flags) {
+ const bool has_audio = (stream_flags & HAS_AUDIO) != 0;
+ const bool has_video = (stream_flags & HAS_VIDEO) != 0;
+ ASSERT_TRUE(has_audio || has_video);
+
+ if (has_audio) {
+ CreateAndConfigureStream(DemuxerStream::AUDIO);
+ ASSERT_TRUE(audio_);
+ EXPECT_TRUE(frame_processor_->AddTrack(audio_id_, audio_.get()));
+ audio_->Seek(base::TimeDelta());
+ audio_->StartReturningData();
+ }
+ if (has_video) {
+ CreateAndConfigureStream(DemuxerStream::VIDEO);
+ ASSERT_TRUE(video_);
+ EXPECT_TRUE(frame_processor_->AddTrack(video_id_, video_.get()));
+ video_->Seek(base::TimeDelta());
+ video_->StartReturningData();
+ }
+ }
+
+ void SetTimestampOffset(base::TimeDelta new_offset) {
+ timestamp_offset_ = new_offset;
+ frame_processor_->SetGroupStartTimestampIfInSequenceMode(timestamp_offset_);
+ }
+
+ BufferQueue StringToBufferQueue(const std::string& buffers_to_append,
+ const TrackId track_id,
+ const DemuxerStream::Type type) {
+ std::vector<std::string> timestamps;
+ base::SplitString(buffers_to_append, ' ', &timestamps);
+
+ BufferQueue buffers;
+ for (size_t i = 0; i < timestamps.size(); i++) {
+ bool is_keyframe = false;
+ if (EndsWith(timestamps[i], "K", true)) {
+ is_keyframe = true;
+ // Remove the "K" off of the token.
+ timestamps[i] = timestamps[i].substr(0, timestamps[i].length() - 1);
+ }
+
+ int time_in_ms;
+ CHECK(base::StringToInt(timestamps[i], &time_in_ms));
+
+ // Create buffer. Encode the original time_in_ms as the buffer's data to
+ // enable later verification of possible buffer relocation in presentation
+ // timeline due to coded frame processing.
+ const uint8* timestamp_as_data = reinterpret_cast<uint8*>(&time_in_ms);
+ scoped_refptr<StreamParserBuffer> buffer =
+ StreamParserBuffer::CopyFrom(timestamp_as_data, sizeof(time_in_ms),
+ is_keyframe, type, track_id);
+ base::TimeDelta timestamp =
+ base::TimeDelta::FromMilliseconds(time_in_ms);
+ buffer->set_timestamp(timestamp);
+ buffer->SetDecodeTimestamp(timestamp);
+ buffer->set_duration(frame_duration_);
+ buffers.push_back(buffer);
+ }
+ return buffers;
+ }
+
+ void ProcessFrames(const std::string& audio_timestamps,
+ const std::string& video_timestamps) {
+ ASSERT_TRUE(frame_processor_->ProcessFrames(
+ StringToBufferQueue(audio_timestamps, audio_id_, DemuxerStream::AUDIO),
+ StringToBufferQueue(video_timestamps, video_id_, DemuxerStream::VIDEO),
+ empty_text_buffers_,
+ append_window_start_, append_window_end_,
+ &new_media_segment_, &timestamp_offset_));
+ }
+
+ void CheckExpectedRangesByTimestamp(ChunkDemuxerStream* stream,
+ const std::string& expected) {
+ // Note, DemuxerStream::TEXT streams return [0,duration (==infinity here))
+ Ranges<base::TimeDelta> r = stream->GetBufferedRanges(kInfiniteDuration());
+
+ std::stringstream ss;
+ ss << "{ ";
+ for (size_t i = 0; i < r.size(); ++i) {
+ int64 start = r.start(i).InMilliseconds();
+ int64 end = r.end(i).InMilliseconds();
+ ss << "[" << start << "," << end << ") ";
+ }
+ ss << "}";
+ EXPECT_EQ(expected, ss.str());
+ }
+
+ void CheckReadStalls(ChunkDemuxerStream* stream) {
+ int loop_count = 0;
+
+ do {
+ read_callback_called_ = false;
+ stream->Read(base::Bind(&FrameProcessorTest::StoreStatusAndBuffer,
+ base::Unretained(this)));
+ message_loop_.RunUntilIdle();
+ } while (++loop_count < 2 && read_callback_called_ &&
+ last_read_status_ == DemuxerStream::kAborted);
+
+ ASSERT_FALSE(read_callback_called_ &&
+ last_read_status_ == DemuxerStream::kAborted)
+ << "2 kAborted reads in a row. Giving up.";
+ EXPECT_FALSE(read_callback_called_);
+ }
+
+ // Format of |expected| is a space-delimited sequence of
+ // timestamp_in_ms:original_timestamp_in_ms
+ // original_timestamp_in_ms (and the colon) must be omitted if it is the same
+ // as timestamp_in_ms.
+ void CheckReadsThenReadStalls(ChunkDemuxerStream* stream,
+ const std::string& expected) {
+ std::vector<std::string> timestamps;
+ base::SplitString(expected, ' ', &timestamps);
+ std::stringstream ss;
+ for (size_t i = 0; i < timestamps.size(); ++i) {
+ int loop_count = 0;
+
+ do {
+ read_callback_called_ = false;
+ stream->Read(base::Bind(&FrameProcessorTest::StoreStatusAndBuffer,
+ base::Unretained(this)));
+ message_loop_.RunUntilIdle();
+ EXPECT_TRUE(read_callback_called_);
+ } while (++loop_count < 2 &&
+ last_read_status_ == DemuxerStream::kAborted);
+
+ ASSERT_FALSE(last_read_status_ == DemuxerStream::kAborted)
+ << "2 kAborted reads in a row. Giving up.";
+ EXPECT_EQ(DemuxerStream::kOk, last_read_status_);
+ EXPECT_FALSE(last_read_buffer_->end_of_stream());
+
+ if (i > 0)
+ ss << " ";
+
+ int time_in_ms = last_read_buffer_->timestamp().InMilliseconds();
+ ss << time_in_ms;
+
+ // Decode the original_time_in_ms from the buffer's data.
+ int original_time_in_ms;
+ ASSERT_EQ(static_cast<int>(sizeof(original_time_in_ms)),
+ last_read_buffer_->data_size());
+ original_time_in_ms = *(reinterpret_cast<const int*>(
+ last_read_buffer_->data()));
+ if (original_time_in_ms != time_in_ms)
+ ss << ":" << original_time_in_ms;
+ }
+
+ EXPECT_EQ(expected, ss.str());
+ CheckReadStalls(stream);
+ }
+
+ base::MessageLoop message_loop_;
+ StrictMock<FrameProcessorTestCallbackHelper> callbacks_;
+
+ scoped_ptr<FrameProcessor> frame_processor_;
+ base::TimeDelta append_window_start_;
+ base::TimeDelta append_window_end_;
+ bool new_media_segment_;
+ base::TimeDelta timestamp_offset_;
+ scoped_ptr<ChunkDemuxerStream> audio_;
+ scoped_ptr<ChunkDemuxerStream> video_;
+ const TrackId audio_id_;
+ const TrackId video_id_;
+ const base::TimeDelta frame_duration_; // Currently the same for all streams.
+ const BufferQueue empty_queue_;
+ const TextBufferQueueMap empty_text_buffers_;
+
+ // StoreStatusAndBuffer's most recent result.
+ DemuxerStream::Status last_read_status_;
+ scoped_refptr<DecoderBuffer> last_read_buffer_;
+ bool read_callback_called_;
+
+ private:
+ void StoreStatusAndBuffer(DemuxerStream::Status status,
+ const scoped_refptr<DecoderBuffer>& buffer) {
+ if (status == DemuxerStream::kOk && buffer) {
+ DVLOG(3) << __FUNCTION__ << "status: " << status << " ts: "
+ << buffer->timestamp().InSecondsF();
+ } else {
+ DVLOG(3) << __FUNCTION__ << "status: " << status << " ts: n/a";
+ }
+
+ read_callback_called_ = true;
+ last_read_status_ = status;
+ last_read_buffer_ = buffer;
+ }
+
+ void CreateAndConfigureStream(DemuxerStream::Type type) {
+ // TODO(wolenetz/dalecurtis): Also test with splicing disabled?
+ switch (type) {
+ case DemuxerStream::AUDIO:
+ ASSERT_FALSE(audio_);
+ audio_.reset(new ChunkDemuxerStream(DemuxerStream::AUDIO, true));
+ ASSERT_TRUE(audio_->UpdateAudioConfig(
+ AudioDecoderConfig(kCodecVorbis,
+ kSampleFormatPlanarF32,
+ CHANNEL_LAYOUT_STEREO,
+ 1000,
+ NULL,
+ 0,
+ false),
+ base::Bind(&LogFunc)));
+ break;
+ case DemuxerStream::VIDEO:
+ ASSERT_FALSE(video_);
+ video_.reset(new ChunkDemuxerStream(DemuxerStream::VIDEO, true));
+ ASSERT_TRUE(video_->UpdateVideoConfig(TestVideoConfig::Normal(),
+ base::Bind(&LogFunc)));
+ break;
+ // TODO(wolenetz): Test text coded frame processing.
+ case DemuxerStream::TEXT:
+ case DemuxerStream::UNKNOWN:
+ case DemuxerStream::NUM_TYPES:
+ ASSERT_FALSE(true);
+ }
+ }
+
+ DISALLOW_COPY_AND_ASSIGN(FrameProcessorTest);
+};
+
+TEST_F(FrameProcessorTest, WrongTypeInAppendedBuffer) {
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+
+ ASSERT_FALSE(frame_processor_->ProcessFrames(
+ StringToBufferQueue("0K", audio_id_, DemuxerStream::VIDEO),
+ empty_queue_,
+ empty_text_buffers_,
+ append_window_start_, append_window_end_,
+ &new_media_segment_, &timestamp_offset_));
+ EXPECT_TRUE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ }");
+ CheckReadStalls(audio_.get());
+}
+
+TEST_F(FrameProcessorTest, NonMonotonicallyIncreasingTimestampInOneCall) {
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+
+ ASSERT_FALSE(frame_processor_->ProcessFrames(
+ StringToBufferQueue("10K 0K", audio_id_, DemuxerStream::AUDIO),
+ empty_queue_,
+ empty_text_buffers_,
+ append_window_start_, append_window_end_,
+ &new_media_segment_, &timestamp_offset_));
+ EXPECT_TRUE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ }");
+ CheckReadStalls(audio_.get());
+}
+
+TEST_P(FrameProcessorTest, AudioOnly_SingleFrame) {
+ // Tests A: P(A) -> (a)
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_));
+ ProcessFrames("0K", "");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,10) }");
+ CheckReadsThenReadStalls(audio_.get(), "0");
+}
+
+TEST_P(FrameProcessorTest, VideoOnly_SingleFrame) {
+ // Tests V: P(V) -> (v)
+ InSequence s;
+ AddTestTracks(HAS_VIDEO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_));
+ ProcessFrames("", "0K");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(video_.get(), "{ [0,10) }");
+ CheckReadsThenReadStalls(video_.get(), "0");
+}
+
+TEST_P(FrameProcessorTest, AudioOnly_TwoFrames) {
+ // Tests A: P(A0, A10) -> (a0, a10)
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 2));
+ ProcessFrames("0K 10K", "");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }");
+ CheckReadsThenReadStalls(audio_.get(), "0 10");
+}
+
+TEST_P(FrameProcessorTest, AudioOnly_SetOffsetThenSingleFrame) {
+ // Tests A: STSO(50)+P(A0) -> TSO==50,(a0@50)
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+
+ const base::TimeDelta fifty_ms = base::TimeDelta::FromMilliseconds(50);
+ SetTimestampOffset(fifty_ms);
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ + fifty_ms));
+ ProcessFrames("0K", "");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(fifty_ms, timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [50,60) }");
+
+ // We do not stall on reading without seeking to 50ms due to
+ // SourceBufferStream::kSeekToStartFudgeRoom().
+ CheckReadsThenReadStalls(audio_.get(), "50:0");
+}
+
+TEST_P(FrameProcessorTest, AudioOnly_SetOffsetThenFrameTimestampBelowOffset) {
+ // Tests A: STSO(50)+P(A20) ->
+ // if sequence mode: TSO==30,(a20@50)
+ // if segments mode: TSO==50,(a20@70)
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ bool using_sequence_mode = GetParam();
+ if (using_sequence_mode)
+ frame_processor_->SetSequenceMode(true);
+
+ const base::TimeDelta fifty_ms = base::TimeDelta::FromMilliseconds(50);
+ const base::TimeDelta twenty_ms = base::TimeDelta::FromMilliseconds(20);
+ SetTimestampOffset(fifty_ms);
+
+ if (using_sequence_mode) {
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(
+ fifty_ms + frame_duration_));
+ } else {
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(
+ fifty_ms + twenty_ms + frame_duration_));
+ }
+
+ ProcessFrames("20K", "");
+ EXPECT_FALSE(new_media_segment_);
+
+ // We do not stall on reading without seeking to 50ms / 70ms due to
+ // SourceBufferStream::kSeekToStartFudgeRoom().
+ if (using_sequence_mode) {
+ EXPECT_EQ(fifty_ms - twenty_ms, timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [50,60) }");
+ CheckReadsThenReadStalls(audio_.get(), "50:20");
+ } else {
+ EXPECT_EQ(fifty_ms, timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [70,80) }");
+ CheckReadsThenReadStalls(audio_.get(), "70:20");
+ }
+}
+
+TEST_P(FrameProcessorTest, AudioOnly_SequentialProcessFrames) {
+ // Tests A: P(A0,A10)+P(A20,A30) -> (a0,a10,a20,a30)
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 2));
+ ProcessFrames("0K 10K", "");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }");
+
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 4));
+ ProcessFrames("20K 30K", "");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,40) }");
+
+ CheckReadsThenReadStalls(audio_.get(), "0 10 20 30");
+}
+
+TEST_P(FrameProcessorTest, AudioOnly_NonSequentialProcessFrames) {
+ // Tests A: P(A20,A30)+P(A0,A10) ->
+ // if sequence mode: TSO==-20 after first P(), 20 after second P(), and
+ // a(20@0,a30@10,a0@20,a10@30)
+ // if segments mode: TSO==0,(a0,a10,a20,a30)
+ InSequence s;
+ AddTestTracks(HAS_AUDIO);
+ new_media_segment_ = true;
+ bool using_sequence_mode = GetParam();
+ if (using_sequence_mode) {
+ frame_processor_->SetSequenceMode(true);
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 2));
+ } else {
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 4));
+ }
+
+ ProcessFrames("20K 30K", "");
+ EXPECT_FALSE(new_media_segment_);
+
+ if (using_sequence_mode) {
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }");
+ EXPECT_EQ(frame_duration_ * -2, timestamp_offset_);
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 4));
+ } else {
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [20,40) }");
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 2));
+ }
+
+ ProcessFrames("0K 10K", "");
+ EXPECT_FALSE(new_media_segment_);
+
+ if (using_sequence_mode) {
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,40) }");
+ EXPECT_EQ(frame_duration_ * 2, timestamp_offset_);
+ CheckReadsThenReadStalls(audio_.get(), "0:20 10:30 20:0 30:10");
+ } else {
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,40) }");
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ // TODO(wolenetz): Fix this need to seek to 0ms, possibly by having
+ // SourceBufferStream defer initial seek until next read. See
+ // http://crbug.com/371493.
+ audio_->AbortReads();
+ audio_->Seek(base::TimeDelta());
+ audio_->StartReturningData();
+ CheckReadsThenReadStalls(audio_.get(), "0 10 20 30");
+ }
+}
+
+TEST_P(FrameProcessorTest, AudioVideo_SequentialProcessFrames) {
+ // Tests AV: P(A0,A10;V0k,V10,V20)+P(A20,A30,A40,V30) ->
+ // (a0,a10,a20,a30,a40);(v0,v10,v20,v30)
+ InSequence s;
+ AddTestTracks(HAS_AUDIO | HAS_VIDEO);
+ new_media_segment_ = true;
+ if (GetParam())
+ frame_processor_->SetSequenceMode(true);
+
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 3));
+ ProcessFrames("0K 10K", "0K 10 20");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,20) }");
+ CheckExpectedRangesByTimestamp(video_.get(), "{ [0,30) }");
+
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 5));
+ ProcessFrames("20K 30K 40K", "30");
+ EXPECT_FALSE(new_media_segment_);
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,50) }");
+ CheckExpectedRangesByTimestamp(video_.get(), "{ [0,40) }");
+
+ CheckReadsThenReadStalls(audio_.get(), "0 10 20 30 40");
+ CheckReadsThenReadStalls(video_.get(), "0 10 20 30");
+}
+
+TEST_P(FrameProcessorTest, AudioVideo_Discontinuity) {
+ // Tests AV: P(A0,A10,A30,A40,A50;V0k,V10,V40,V50key) ->
+ // if sequence mode: TSO==10,(a0,a10,a30,a40,a50@60);(v0,v10,v50@60)
+ // if segments mode: TSO==0,(a0,a10,a30,a40,a50);(v0,v10,v50)
+ // This assumes A40K is processed before V40, which depends currently on
+ // MergeBufferQueues() behavior.
+ InSequence s;
+ AddTestTracks(HAS_AUDIO | HAS_VIDEO);
+ new_media_segment_ = true;
+ bool using_sequence_mode = GetParam();
+ if (using_sequence_mode) {
+ frame_processor_->SetSequenceMode(true);
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 7));
+ } else {
+ EXPECT_CALL(callbacks_, PossibleDurationIncrease(frame_duration_ * 6));
+ }
+
+ ProcessFrames("0K 10K 30K 40K 50K", "0K 10 40 50K");
+ EXPECT_FALSE(new_media_segment_);
+
+ if (using_sequence_mode) {
+ EXPECT_EQ(frame_duration_, timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,70) }");
+ CheckExpectedRangesByTimestamp(video_.get(), "{ [0,70) }");
+ CheckReadsThenReadStalls(audio_.get(), "0 10 30 40 60:50");
+ CheckReadsThenReadStalls(video_.get(), "0 10 60:50");
+ } else {
+ EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
+ CheckExpectedRangesByTimestamp(audio_.get(), "{ [0,60) }");
+ CheckExpectedRangesByTimestamp(video_.get(), "{ [0,20) [50,60) }");
+ CheckReadsThenReadStalls(audio_.get(), "0 10 30 40 50");
+ CheckReadsThenReadStalls(video_.get(), "0 10");
+ video_->AbortReads();
+ video_->Seek(frame_duration_ * 5);
+ video_->StartReturningData();
+ CheckReadsThenReadStalls(video_.get(), "50");
+ }
+}
+
+INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
+INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
+
+} // namespace media
diff --git a/media/filters/legacy_frame_processor.cc b/media/filters/legacy_frame_processor.cc
index 71c280183f..ef8f89f922 100644
--- a/media/filters/legacy_frame_processor.cc
+++ b/media/filters/legacy_frame_processor.cc
@@ -50,10 +50,6 @@ bool LegacyFrameProcessor::ProcessFrames(
MseTrackBuffer* video_track = FindTrack(kVideoTrackId);
DCHECK(video_buffers.empty() || video_track);
- // TODO(wolenetz): DCHECK + return false if any of these buffers have UNKNOWN
- // type() in upcoming coded frame processing compliant implementation. See
- // http://crbug.com/249422.
-
StreamParser::BufferQueue filtered_audio;
StreamParser::BufferQueue filtered_video;
StreamParser::TextBufferQueueMap filtered_text;
@@ -110,13 +106,8 @@ bool LegacyFrameProcessor::ProcessFrames(
}
*new_media_segment = false;
-
DCHECK(segment_timestamp != kInfiniteDuration());
- for (TrackBufferMap::iterator itr = track_buffers_.begin();
- itr != track_buffers_.end();
- ++itr) {
- itr->second->stream()->OnNewMediaSegment(segment_timestamp);
- }
+ NotifyNewMediaSegmentStarting(segment_timestamp);
}
if (!filtered_audio.empty() &&
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index 2d4c4d9ebe..2920816d89 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -449,10 +449,7 @@ class MockMediaSource {
// Test parameter determines which coded frame processor is used to process
// appended data, and is only applicable in tests where the pipeline is using a
// (Mock)MediaSource (which are TEST_P, not TEST_F). If true,
-// LegacyFrameProcessor is used. Otherwise, (not yet supported), a more
-// compliant frame processor is used.
-// TODO(wolenetz): Enable usage of new frame processor based on this flag.
-// See http://crbug.com/249422.
+// LegacyFrameProcessor is used. Otherwise, the new FrameProcessor is used.
class PipelineIntegrationTest
: public testing::TestWithParam<bool>,
public PipelineIntegrationTestBase {
@@ -1319,8 +1316,10 @@ TEST_F(PipelineIntegrationTest,
ASSERT_TRUE(WaitUntilOnEnded());
}
-// TODO(wolenetz): Enable MSE testing of new frame processor based on this flag,
-// once the new processor has landed. See http://crbug.com/249422.
+// For MediaSource tests, generate two sets of tests: one using FrameProcessor,
+// and one using LegacyFrameProcessor.
+INSTANTIATE_TEST_CASE_P(NewFrameProcessor, PipelineIntegrationTest,
+ Values(false));
INSTANTIATE_TEST_CASE_P(LegacyFrameProcessor, PipelineIntegrationTest,
Values(true));
diff --git a/media/filters/video_renderer_impl.cc b/media/filters/video_renderer_impl.cc
index 6b6711ed21..b86f661e7a 100644
--- a/media/filters/video_renderer_impl.cc
+++ b/media/filters/video_renderer_impl.cc
@@ -28,6 +28,7 @@ VideoRendererImpl::VideoRendererImpl(
video_frame_stream_(task_runner, decoders.Pass(), set_decryptor_ready_cb),
low_delay_(false),
received_end_of_stream_(false),
+ rendered_end_of_stream_(false),
frame_available_(&lock_),
state_(kUninitialized),
thread_(),
@@ -75,6 +76,7 @@ void VideoRendererImpl::Flush(const base::Closure& callback) {
// stream and needs to drain it before flushing it.
ready_frames_.clear();
received_end_of_stream_ = false;
+ rendered_end_of_stream_ = false;
video_frame_stream_.Reset(
base::Bind(&VideoRendererImpl::OnVideoFrameStreamResetDone,
weak_factory_.GetWeakPtr()));
@@ -253,12 +255,9 @@ void VideoRendererImpl::ThreadMain() {
// Remain idle until we have the next frame ready for rendering.
if (ready_frames_.empty()) {
- if (received_end_of_stream_) {
- state_ = kEnded;
+ if (received_end_of_stream_ && !rendered_end_of_stream_) {
+ rendered_end_of_stream_ = true;
ended_cb_.Run();
-
- // No need to sleep here as we idle when |state_ != kPlaying|.
- continue;
}
UpdateStatsAndWait_Locked(kIdleTimeDelta);
@@ -468,7 +467,6 @@ void VideoRendererImpl::AttemptRead_Locked() {
case kInitializing:
case kFlushing:
case kFlushed:
- case kEnded:
case kStopped:
case kError:
return;
@@ -484,6 +482,7 @@ void VideoRendererImpl::OnVideoFrameStreamResetDone() {
DCHECK(!pending_read_);
DCHECK(ready_frames_.empty());
DCHECK(!received_end_of_stream_);
+ DCHECK(!rendered_end_of_stream_);
state_ = kFlushed;
last_timestamp_ = kNoTimestamp();
diff --git a/media/filters/video_renderer_impl.h b/media/filters/video_renderer_impl.h
index a7dccf2f98..8980447b2b 100644
--- a/media/filters/video_renderer_impl.h
+++ b/media/filters/video_renderer_impl.h
@@ -144,8 +144,10 @@ class MEDIA_EXPORT VideoRendererImpl
typedef std::deque<scoped_refptr<VideoFrame> > VideoFrameQueue;
VideoFrameQueue ready_frames_;
- // Keeps track of whether we received the end of stream buffer.
+ // Keeps track of whether we received the end of stream buffer and finished
+ // rendering.
bool received_end_of_stream_;
+ bool rendered_end_of_stream_;
// Used to signal |thread_| as frames are added to |frames_|. Rule of thumb:
// always check |state_| to see if it was set to STOPPED after waking up!
@@ -168,10 +170,7 @@ class MEDIA_EXPORT VideoRendererImpl
// | | Pause() ^
// | V Play() |
// | [kPlaying]---------------------------|
- // | | Pause() ^
- // | V Receive EOF frame. | Pause()
- // | [kEnded]-----------------------------+
- // | ^
+ // | Pause() ^ Pause()
// | |
// +-----> [kStopped] [Any state other than]
// [kUninitialized/kError]
@@ -186,7 +185,6 @@ class MEDIA_EXPORT VideoRendererImpl
kFlushed,
kPrerolling,
kPlaying,
- kEnded,
kStopped,
kError,
};
diff --git a/media/media.gyp b/media/media.gyp
index a7990284c5..5a974aa704 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -391,6 +391,8 @@
'filters/ffmpeg_video_decoder.h',
'filters/file_data_source.cc',
'filters/file_data_source.h',
+ 'filters/frame_processor.cc',
+ 'filters/frame_processor.h',
'filters/frame_processor_base.cc',
'filters/frame_processor_base.h',
'filters/gpu_video_accelerator_factories.cc',
@@ -1043,6 +1045,7 @@
'filters/ffmpeg_glue_unittest.cc',
'filters/ffmpeg_video_decoder_unittest.cc',
'filters/file_data_source_unittest.cc',
+ 'filters/frame_processor_unittest.cc',
'filters/h264_bit_reader_unittest.cc',
'filters/h264_parser_unittest.cc',
'filters/in_memory_url_protocol_unittest.cc',
diff --git a/media/media.target.darwin-arm.mk b/media/media.target.darwin-arm.mk
index 72e88e7271..25665479fd 100644
--- a/media/media.target.darwin-arm.mk
+++ b/media/media.target.darwin-arm.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -265,6 +266,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -388,6 +390,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.darwin-arm64.mk b/media/media.target.darwin-arm64.mk
index 5d1cd0852f..0a0c22ff41 100644
--- a/media/media.target.darwin-arm64.mk
+++ b/media/media.target.darwin-arm64.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -262,6 +263,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -381,6 +383,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.darwin-mips.mk b/media/media.target.darwin-mips.mk
index 16aded3483..c78a9d8189 100644
--- a/media/media.target.darwin-mips.mk
+++ b/media/media.target.darwin-mips.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -265,6 +266,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -388,6 +390,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.darwin-x86.mk b/media/media.target.darwin-x86.mk
index 872d6166c1..380395fd23 100644
--- a/media/media.target.darwin-x86.mk
+++ b/media/media.target.darwin-x86.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -267,6 +268,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -390,6 +392,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.darwin-x86_64.mk b/media/media.target.darwin-x86_64.mk
index dcf21c1f3c..a9d194e81b 100644
--- a/media/media.target.darwin-x86_64.mk
+++ b/media/media.target.darwin-x86_64.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -267,6 +268,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -390,6 +392,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.linux-arm.mk b/media/media.target.linux-arm.mk
index 72e88e7271..25665479fd 100644
--- a/media/media.target.linux-arm.mk
+++ b/media/media.target.linux-arm.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -265,6 +266,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -388,6 +390,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.linux-arm64.mk b/media/media.target.linux-arm64.mk
index 5d1cd0852f..0a0c22ff41 100644
--- a/media/media.target.linux-arm64.mk
+++ b/media/media.target.linux-arm64.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -262,6 +263,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -381,6 +383,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.linux-mips.mk b/media/media.target.linux-mips.mk
index 16aded3483..c78a9d8189 100644
--- a/media/media.target.linux-mips.mk
+++ b/media/media.target.linux-mips.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -265,6 +266,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -388,6 +390,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.linux-x86.mk b/media/media.target.linux-x86.mk
index 872d6166c1..380395fd23 100644
--- a/media/media.target.linux-x86.mk
+++ b/media/media.target.linux-x86.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -267,6 +268,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -390,6 +392,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media.target.linux-x86_64.mk b/media/media.target.linux-x86_64.mk
index dcf21c1f3c..a9d194e81b 100644
--- a/media/media.target.linux-x86_64.mk
+++ b/media/media.target.linux-x86_64.mk
@@ -140,6 +140,7 @@ LOCAL_SRC_FILES := \
media/filters/decrypting_demuxer_stream.cc \
media/filters/decrypting_video_decoder.cc \
media/filters/file_data_source.cc \
+ media/filters/frame_processor.cc \
media/filters/frame_processor_base.cc \
media/filters/gpu_video_accelerator_factories.cc \
media/filters/gpu_video_decoder.cc \
@@ -267,6 +268,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
@@ -390,6 +392,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DDISABLE_USER_INPUT_MONITOR' \
'-DSK_ENABLE_INST_COUNT=0' \
diff --git a/media/media_android_imageformat_list.target.darwin-arm.mk b/media/media_android_imageformat_list.target.darwin-arm.mk
index c238050ad1..377ea20565 100644
--- a/media/media_android_imageformat_list.target.darwin-arm.mk
+++ b/media/media_android_imageformat_list.target.darwin-arm.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.darwin-arm64.mk b/media/media_android_imageformat_list.target.darwin-arm64.mk
index 47464f8462..b4b10a0b7e 100644
--- a/media/media_android_imageformat_list.target.darwin-arm64.mk
+++ b/media/media_android_imageformat_list.target.darwin-arm64.mk
@@ -88,6 +88,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.darwin-mips.mk b/media/media_android_imageformat_list.target.darwin-mips.mk
index 7693d151f5..9606db7e52 100644
--- a/media/media_android_imageformat_list.target.darwin-mips.mk
+++ b/media/media_android_imageformat_list.target.darwin-mips.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.darwin-x86.mk b/media/media_android_imageformat_list.target.darwin-x86.mk
index 9f4f8ca48b..89cd515da0 100644
--- a/media/media_android_imageformat_list.target.darwin-x86.mk
+++ b/media/media_android_imageformat_list.target.darwin-x86.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -175,6 +176,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.darwin-x86_64.mk b/media/media_android_imageformat_list.target.darwin-x86_64.mk
index 23b7e79177..26a0c2fca2 100644
--- a/media/media_android_imageformat_list.target.darwin-x86_64.mk
+++ b/media/media_android_imageformat_list.target.darwin-x86_64.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -175,6 +176,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.linux-arm.mk b/media/media_android_imageformat_list.target.linux-arm.mk
index c238050ad1..377ea20565 100644
--- a/media/media_android_imageformat_list.target.linux-arm.mk
+++ b/media/media_android_imageformat_list.target.linux-arm.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.linux-arm64.mk b/media/media_android_imageformat_list.target.linux-arm64.mk
index 47464f8462..b4b10a0b7e 100644
--- a/media/media_android_imageformat_list.target.linux-arm64.mk
+++ b/media/media_android_imageformat_list.target.linux-arm64.mk
@@ -88,6 +88,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.linux-mips.mk b/media/media_android_imageformat_list.target.linux-mips.mk
index 7693d151f5..9606db7e52 100644
--- a/media/media_android_imageformat_list.target.linux-mips.mk
+++ b/media/media_android_imageformat_list.target.linux-mips.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -174,6 +175,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.linux-x86.mk b/media/media_android_imageformat_list.target.linux-x86.mk
index 9f4f8ca48b..89cd515da0 100644
--- a/media/media_android_imageformat_list.target.linux-x86.mk
+++ b/media/media_android_imageformat_list.target.linux-x86.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -175,6 +176,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_imageformat_list.target.linux-x86_64.mk b/media/media_android_imageformat_list.target.linux-x86_64.mk
index 23b7e79177..26a0c2fca2 100644
--- a/media/media_android_imageformat_list.target.linux-x86_64.mk
+++ b/media/media_android_imageformat_list.target.linux-x86_64.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -175,6 +176,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.darwin-arm.mk b/media/media_android_jni_headers.target.darwin-arm.mk
index 3a80b56499..5398e2bdc5 100644
--- a/media/media_android_jni_headers.target.darwin-arm.mk
+++ b/media/media_android_jni_headers.target.darwin-arm.mk
@@ -180,6 +180,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -263,6 +264,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.darwin-arm64.mk b/media/media_android_jni_headers.target.darwin-arm64.mk
index 123a3e5208..20ad9535b3 100644
--- a/media/media_android_jni_headers.target.darwin-arm64.mk
+++ b/media/media_android_jni_headers.target.darwin-arm64.mk
@@ -177,6 +177,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -256,6 +257,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.darwin-mips.mk b/media/media_android_jni_headers.target.darwin-mips.mk
index 902eff7670..7109ba6897 100644
--- a/media/media_android_jni_headers.target.darwin-mips.mk
+++ b/media/media_android_jni_headers.target.darwin-mips.mk
@@ -180,6 +180,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -263,6 +264,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.darwin-x86.mk b/media/media_android_jni_headers.target.darwin-x86.mk
index 46366f17db..33ae2a3bf3 100644
--- a/media/media_android_jni_headers.target.darwin-x86.mk
+++ b/media/media_android_jni_headers.target.darwin-x86.mk
@@ -181,6 +181,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -264,6 +265,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.darwin-x86_64.mk b/media/media_android_jni_headers.target.darwin-x86_64.mk
index 7022a20529..2d3bcdcb8d 100644
--- a/media/media_android_jni_headers.target.darwin-x86_64.mk
+++ b/media/media_android_jni_headers.target.darwin-x86_64.mk
@@ -181,6 +181,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -264,6 +265,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.linux-arm.mk b/media/media_android_jni_headers.target.linux-arm.mk
index 3a80b56499..5398e2bdc5 100644
--- a/media/media_android_jni_headers.target.linux-arm.mk
+++ b/media/media_android_jni_headers.target.linux-arm.mk
@@ -180,6 +180,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -263,6 +264,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.linux-arm64.mk b/media/media_android_jni_headers.target.linux-arm64.mk
index 123a3e5208..20ad9535b3 100644
--- a/media/media_android_jni_headers.target.linux-arm64.mk
+++ b/media/media_android_jni_headers.target.linux-arm64.mk
@@ -177,6 +177,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -256,6 +257,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.linux-mips.mk b/media/media_android_jni_headers.target.linux-mips.mk
index 902eff7670..7109ba6897 100644
--- a/media/media_android_jni_headers.target.linux-mips.mk
+++ b/media/media_android_jni_headers.target.linux-mips.mk
@@ -180,6 +180,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -263,6 +264,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.linux-x86.mk b/media/media_android_jni_headers.target.linux-x86.mk
index 46366f17db..33ae2a3bf3 100644
--- a/media/media_android_jni_headers.target.linux-x86.mk
+++ b/media/media_android_jni_headers.target.linux-x86.mk
@@ -181,6 +181,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -264,6 +265,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_android_jni_headers.target.linux-x86_64.mk b/media/media_android_jni_headers.target.linux-x86_64.mk
index 7022a20529..2d3bcdcb8d 100644
--- a/media/media_android_jni_headers.target.linux-x86_64.mk
+++ b/media/media_android_jni_headers.target.linux-x86_64.mk
@@ -181,6 +181,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -264,6 +265,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_asm.target.darwin-x86.mk b/media/media_asm.target.darwin-x86.mk
index 63ce5d2f21..8c3b223053 100644
--- a/media/media_asm.target.darwin-x86.mk
+++ b/media/media_asm.target.darwin-x86.mk
@@ -181,6 +181,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -264,6 +265,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_asm.target.darwin-x86_64.mk b/media/media_asm.target.darwin-x86_64.mk
index ac60c0f18e..bde14a08ed 100644
--- a/media/media_asm.target.darwin-x86_64.mk
+++ b/media/media_asm.target.darwin-x86_64.mk
@@ -203,6 +203,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -286,6 +287,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_asm.target.linux-x86.mk b/media/media_asm.target.linux-x86.mk
index 63ce5d2f21..8c3b223053 100644
--- a/media/media_asm.target.linux-x86.mk
+++ b/media/media_asm.target.linux-x86.mk
@@ -181,6 +181,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -264,6 +265,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_asm.target.linux-x86_64.mk b/media/media_asm.target.linux-x86_64.mk
index ac60c0f18e..bde14a08ed 100644
--- a/media/media_asm.target.linux-x86_64.mk
+++ b/media/media_asm.target.linux-x86_64.mk
@@ -203,6 +203,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -286,6 +287,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/media_mmx.target.darwin-x86.mk b/media/media_mmx.target.darwin-x86.mk
index 337698d3c0..757e8bf242 100644
--- a/media/media_mmx.target.darwin-x86.mk
+++ b/media/media_mmx.target.darwin-x86.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_mmx.target.darwin-x86_64.mk b/media/media_mmx.target.darwin-x86_64.mk
index ffdaf62b07..73bdda2459 100644
--- a/media/media_mmx.target.darwin-x86_64.mk
+++ b/media/media_mmx.target.darwin-x86_64.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_mmx.target.linux-x86.mk b/media/media_mmx.target.linux-x86.mk
index 337698d3c0..757e8bf242 100644
--- a/media/media_mmx.target.linux-x86.mk
+++ b/media/media_mmx.target.linux-x86.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_mmx.target.linux-x86_64.mk b/media/media_mmx.target.linux-x86_64.mk
index ffdaf62b07..73bdda2459 100644
--- a/media/media_mmx.target.linux-x86_64.mk
+++ b/media/media_mmx.target.linux-x86_64.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse.target.darwin-x86.mk b/media/media_sse.target.darwin-x86.mk
index facedebb27..0211f41054 100644
--- a/media/media_sse.target.darwin-x86.mk
+++ b/media/media_sse.target.darwin-x86.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse.target.darwin-x86_64.mk b/media/media_sse.target.darwin-x86_64.mk
index 6c64cd5a86..4f2c5f42d5 100644
--- a/media/media_sse.target.darwin-x86_64.mk
+++ b/media/media_sse.target.darwin-x86_64.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse.target.linux-x86.mk b/media/media_sse.target.linux-x86.mk
index facedebb27..0211f41054 100644
--- a/media/media_sse.target.linux-x86.mk
+++ b/media/media_sse.target.linux-x86.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse.target.linux-x86_64.mk b/media/media_sse.target.linux-x86_64.mk
index 6c64cd5a86..4f2c5f42d5 100644
--- a/media/media_sse.target.linux-x86_64.mk
+++ b/media/media_sse.target.linux-x86_64.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse2.target.darwin-x86.mk b/media/media_sse2.target.darwin-x86.mk
index 8f5b3259b7..b56a2d2309 100644
--- a/media/media_sse2.target.darwin-x86.mk
+++ b/media/media_sse2.target.darwin-x86.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse2.target.darwin-x86_64.mk b/media/media_sse2.target.darwin-x86_64.mk
index 4d894734d8..3cdb355ad9 100644
--- a/media/media_sse2.target.darwin-x86_64.mk
+++ b/media/media_sse2.target.darwin-x86_64.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse2.target.linux-x86.mk b/media/media_sse2.target.linux-x86.mk
index 8f5b3259b7..b56a2d2309 100644
--- a/media/media_sse2.target.linux-x86.mk
+++ b/media/media_sse2.target.linux-x86.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/media_sse2.target.linux-x86_64.mk b/media/media_sse2.target.linux-x86_64.mk
index 4d894734d8..3cdb355ad9 100644
--- a/media/media_sse2.target.linux-x86_64.mk
+++ b/media/media_sse2.target.linux-x86_64.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/player_android.target.darwin-arm.mk b/media/player_android.target.darwin-arm.mk
index 1d9f9fc832..3fc58b95f1 100644
--- a/media/player_android.target.darwin-arm.mk
+++ b/media/player_android.target.darwin-arm.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.darwin-arm64.mk b/media/player_android.target.darwin-arm64.mk
index 15f9345560..e262f53a4d 100644
--- a/media/player_android.target.darwin-arm64.mk
+++ b/media/player_android.target.darwin-arm64.mk
@@ -88,6 +88,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -180,6 +181,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.darwin-mips.mk b/media/player_android.target.darwin-mips.mk
index f425f1976a..2a6d62223d 100644
--- a/media/player_android.target.darwin-mips.mk
+++ b/media/player_android.target.darwin-mips.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.darwin-x86.mk b/media/player_android.target.darwin-x86.mk
index eae727054d..04f2bb6e01 100644
--- a/media/player_android.target.darwin-x86.mk
+++ b/media/player_android.target.darwin-x86.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -188,6 +189,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.darwin-x86_64.mk b/media/player_android.target.darwin-x86_64.mk
index a1ff6892d4..c6f759502b 100644
--- a/media/player_android.target.darwin-x86_64.mk
+++ b/media/player_android.target.darwin-x86_64.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -188,6 +189,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.linux-arm.mk b/media/player_android.target.linux-arm.mk
index 1d9f9fc832..3fc58b95f1 100644
--- a/media/player_android.target.linux-arm.mk
+++ b/media/player_android.target.linux-arm.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.linux-arm64.mk b/media/player_android.target.linux-arm64.mk
index 15f9345560..e262f53a4d 100644
--- a/media/player_android.target.linux-arm64.mk
+++ b/media/player_android.target.linux-arm64.mk
@@ -88,6 +88,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -180,6 +181,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.linux-mips.mk b/media/player_android.target.linux-mips.mk
index f425f1976a..2a6d62223d 100644
--- a/media/player_android.target.linux-mips.mk
+++ b/media/player_android.target.linux-mips.mk
@@ -91,6 +91,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.linux-x86.mk b/media/player_android.target.linux-x86.mk
index eae727054d..04f2bb6e01 100644
--- a/media/player_android.target.linux-x86.mk
+++ b/media/player_android.target.linux-x86.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -188,6 +189,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/player_android.target.linux-x86_64.mk b/media/player_android.target.linux-x86_64.mk
index a1ff6892d4..c6f759502b 100644
--- a/media/player_android.target.linux-x86_64.mk
+++ b/media/player_android.target.linux-x86_64.mk
@@ -92,6 +92,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
@@ -188,6 +189,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DMESA_EGL_NO_X11_HEADERS' \
'-DUSE_OPENSSL=1' \
diff --git a/media/shared_memory_support.target.darwin-arm.mk b/media/shared_memory_support.target.darwin-arm.mk
index b4a0245862..6a3c55a3cd 100644
--- a/media/shared_memory_support.target.darwin-arm.mk
+++ b/media/shared_memory_support.target.darwin-arm.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.darwin-arm64.mk b/media/shared_memory_support.target.darwin-arm64.mk
index 2c6ce1667c..961d511bfa 100644
--- a/media/shared_memory_support.target.darwin-arm64.mk
+++ b/media/shared_memory_support.target.darwin-arm64.mk
@@ -78,6 +78,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -160,6 +161,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.darwin-mips.mk b/media/shared_memory_support.target.darwin-mips.mk
index ea707d3d5c..1097a18ad3 100644
--- a/media/shared_memory_support.target.darwin-mips.mk
+++ b/media/shared_memory_support.target.darwin-mips.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.darwin-x86.mk b/media/shared_memory_support.target.darwin-x86.mk
index 4155f3e2da..7fbb8aa1db 100644
--- a/media/shared_memory_support.target.darwin-x86.mk
+++ b/media/shared_memory_support.target.darwin-x86.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.darwin-x86_64.mk b/media/shared_memory_support.target.darwin-x86_64.mk
index 523ca62183..3504a65b30 100644
--- a/media/shared_memory_support.target.darwin-x86_64.mk
+++ b/media/shared_memory_support.target.darwin-x86_64.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.linux-arm.mk b/media/shared_memory_support.target.linux-arm.mk
index b4a0245862..6a3c55a3cd 100644
--- a/media/shared_memory_support.target.linux-arm.mk
+++ b/media/shared_memory_support.target.linux-arm.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.linux-arm64.mk b/media/shared_memory_support.target.linux-arm64.mk
index 2c6ce1667c..961d511bfa 100644
--- a/media/shared_memory_support.target.linux-arm64.mk
+++ b/media/shared_memory_support.target.linux-arm64.mk
@@ -78,6 +78,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -160,6 +161,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.linux-mips.mk b/media/shared_memory_support.target.linux-mips.mk
index ea707d3d5c..1097a18ad3 100644
--- a/media/shared_memory_support.target.linux-mips.mk
+++ b/media/shared_memory_support.target.linux-mips.mk
@@ -81,6 +81,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -167,6 +168,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.linux-x86.mk b/media/shared_memory_support.target.linux-x86.mk
index 4155f3e2da..7fbb8aa1db 100644
--- a/media/shared_memory_support.target.linux-x86.mk
+++ b/media/shared_memory_support.target.linux-x86.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support.target.linux-x86_64.mk b/media/shared_memory_support.target.linux-x86_64.mk
index 523ca62183..3504a65b30 100644
--- a/media/shared_memory_support.target.linux-x86_64.mk
+++ b/media/shared_memory_support.target.linux-x86_64.mk
@@ -82,6 +82,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -168,6 +169,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support_sse.target.darwin-x86.mk b/media/shared_memory_support_sse.target.darwin-x86.mk
index ba3889e0bf..26e7bd3cc5 100644
--- a/media/shared_memory_support_sse.target.darwin-x86.mk
+++ b/media/shared_memory_support_sse.target.darwin-x86.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support_sse.target.darwin-x86_64.mk b/media/shared_memory_support_sse.target.darwin-x86_64.mk
index 3904a33f72..6ed208bdca 100644
--- a/media/shared_memory_support_sse.target.darwin-x86_64.mk
+++ b/media/shared_memory_support_sse.target.darwin-x86_64.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support_sse.target.linux-x86.mk b/media/shared_memory_support_sse.target.linux-x86.mk
index ba3889e0bf..26e7bd3cc5 100644
--- a/media/shared_memory_support_sse.target.linux-x86.mk
+++ b/media/shared_memory_support_sse.target.linux-x86.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/shared_memory_support_sse.target.linux-x86_64.mk b/media/shared_memory_support_sse.target.linux-x86_64.mk
index 3904a33f72..6ed208bdca 100644
--- a/media/shared_memory_support_sse.target.linux-x86_64.mk
+++ b/media/shared_memory_support_sse.target.linux-x86_64.mk
@@ -80,6 +80,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
@@ -166,6 +167,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DMEDIA_IMPLEMENTATION' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
diff --git a/media/video_capture_android_jni_headers.target.darwin-arm.mk b/media/video_capture_android_jni_headers.target.darwin-arm.mk
index 16facb0319..db58cbad2a 100644
--- a/media/video_capture_android_jni_headers.target.darwin-arm.mk
+++ b/media/video_capture_android_jni_headers.target.darwin-arm.mk
@@ -103,6 +103,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -186,6 +187,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.darwin-arm64.mk b/media/video_capture_android_jni_headers.target.darwin-arm64.mk
index 58e2d44256..2ab1fefff7 100644
--- a/media/video_capture_android_jni_headers.target.darwin-arm64.mk
+++ b/media/video_capture_android_jni_headers.target.darwin-arm64.mk
@@ -100,6 +100,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -179,6 +180,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.darwin-mips.mk b/media/video_capture_android_jni_headers.target.darwin-mips.mk
index 91661bd717..c298cd8b39 100644
--- a/media/video_capture_android_jni_headers.target.darwin-mips.mk
+++ b/media/video_capture_android_jni_headers.target.darwin-mips.mk
@@ -103,6 +103,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -186,6 +187,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.darwin-x86.mk b/media/video_capture_android_jni_headers.target.darwin-x86.mk
index 06d6b7aec4..ca52d75535 100644
--- a/media/video_capture_android_jni_headers.target.darwin-x86.mk
+++ b/media/video_capture_android_jni_headers.target.darwin-x86.mk
@@ -104,6 +104,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.darwin-x86_64.mk b/media/video_capture_android_jni_headers.target.darwin-x86_64.mk
index 12bad0a955..f06e06225a 100644
--- a/media/video_capture_android_jni_headers.target.darwin-x86_64.mk
+++ b/media/video_capture_android_jni_headers.target.darwin-x86_64.mk
@@ -104,6 +104,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.linux-arm.mk b/media/video_capture_android_jni_headers.target.linux-arm.mk
index 16facb0319..db58cbad2a 100644
--- a/media/video_capture_android_jni_headers.target.linux-arm.mk
+++ b/media/video_capture_android_jni_headers.target.linux-arm.mk
@@ -103,6 +103,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -186,6 +187,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.linux-arm64.mk b/media/video_capture_android_jni_headers.target.linux-arm64.mk
index 58e2d44256..2ab1fefff7 100644
--- a/media/video_capture_android_jni_headers.target.linux-arm64.mk
+++ b/media/video_capture_android_jni_headers.target.linux-arm64.mk
@@ -100,6 +100,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -179,6 +180,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.linux-mips.mk b/media/video_capture_android_jni_headers.target.linux-mips.mk
index 91661bd717..c298cd8b39 100644
--- a/media/video_capture_android_jni_headers.target.linux-mips.mk
+++ b/media/video_capture_android_jni_headers.target.linux-mips.mk
@@ -103,6 +103,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -186,6 +187,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.linux-x86.mk b/media/video_capture_android_jni_headers.target.linux-x86.mk
index 06d6b7aec4..ca52d75535 100644
--- a/media/video_capture_android_jni_headers.target.linux-x86.mk
+++ b/media/video_capture_android_jni_headers.target.linux-x86.mk
@@ -104,6 +104,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
diff --git a/media/video_capture_android_jni_headers.target.linux-x86_64.mk b/media/video_capture_android_jni_headers.target.linux-x86_64.mk
index 12bad0a955..f06e06225a 100644
--- a/media/video_capture_android_jni_headers.target.linux-x86_64.mk
+++ b/media/video_capture_android_jni_headers.target.linux-x86_64.mk
@@ -104,6 +104,7 @@ MY_DEFS_Debug := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \
@@ -187,6 +188,7 @@ MY_DEFS_Release := \
'-DCLD_VERSION=1' \
'-DENABLE_PRINTING=1' \
'-DENABLE_MANAGED_USERS=1' \
+ '-DVIDEO_HOLE=1' \
'-DUSE_OPENSSL=1' \
'-DUSE_OPENSSL_CERTS=1' \
'-D__STDC_CONSTANT_MACROS' \