summaryrefslogtreecommitdiffstats
path: root/media/base/null_video_sink.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/base/null_video_sink.h')
-rw-r--r--media/base/null_video_sink.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/media/base/null_video_sink.h b/media/base/null_video_sink.h
index f1e076c..66ff79f 100644
--- a/media/base/null_video_sink.h
+++ b/media/base/null_video_sink.h
@@ -6,7 +6,6 @@
#define MEDIA_AUDIO_NULL_VIDEO_SINK_H_
#include "base/cancelable_callback.h"
-#include "base/md5.h"
#include "base/memory/scoped_ptr.h"
#include "base/time/default_tick_clock.h"
#include "base/time/tick_clock.h"
@@ -18,7 +17,7 @@ class SingleThreadTaskRunner;
namespace media {
-class MEDIA_EXPORT NullVideoSink : NON_EXPORTED_BASE(public VideoRendererSink) {
+class NullVideoSink : public VideoRendererSink {
public:
using NewFrameCB = base::Callback<void(const scoped_refptr<VideoFrame>&)>;
@@ -38,9 +37,6 @@ class MEDIA_EXPORT NullVideoSink : NON_EXPORTED_BASE(public VideoRendererSink) {
void PaintFrameUsingOldRenderingPath(
const scoped_refptr<VideoFrame>& frame) override;
- // Allows tests to simulate suspension of Render() callbacks.
- void PauseRenderCallbacks(base::TimeTicks pause_until);
-
void set_tick_clock_for_testing(base::TickClock* tick_clock) {
tick_clock_ = tick_clock;
}
@@ -52,6 +48,10 @@ class MEDIA_EXPORT NullVideoSink : NON_EXPORTED_BASE(public VideoRendererSink) {
bool is_started() const { return started_; }
+ void set_background_render(bool is_background_rendering) {
+ background_render_ = is_background_rendering;
+ }
+
private:
// Task that periodically calls Render() to consume video data.
void CallRender();
@@ -74,9 +74,6 @@ class MEDIA_EXPORT NullVideoSink : NON_EXPORTED_BASE(public VideoRendererSink) {
// to maintain stable periodicity of callbacks.
base::TimeTicks current_render_time_;
- // Used to suspend Render() callbacks to |callback_| for some time.
- base::TimeTicks pause_end_time_;
-
// Allow for an injectable tick clock for testing.
base::DefaultTickClock default_tick_clock_;
base::TimeTicks last_now_;
@@ -87,6 +84,9 @@ class MEDIA_EXPORT NullVideoSink : NON_EXPORTED_BASE(public VideoRendererSink) {
// If set, called when Stop() is called.
base::Closure stop_cb_;
+ // Value passed to RenderCallback::Render().
+ bool background_render_;
+
DISALLOW_COPY_AND_ASSIGN(NullVideoSink);
};