Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1748)

Unified Diff: content/renderer/media/webmediaplayer_ms_compositor.h

Issue 1417533006: Unit test for WebMediaPlayerMS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Kill Memory Leak Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | content/renderer/media/webmediaplayer_ms_compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webmediaplayer_ms_compositor.h
diff --git a/content/renderer/media/webmediaplayer_ms_compositor.h b/content/renderer/media/webmediaplayer_ms_compositor.h
index bc7e46824b70231bc685819901d1d16f1e6f0ce7..28adb0302b8ea8f34b7f35351940b97b5da37ea0 100644
--- a/content/renderer/media/webmediaplayer_ms_compositor.h
+++ b/content/renderer/media/webmediaplayer_ms_compositor.h
@@ -14,6 +14,7 @@
#include "base/synchronization/lock.h"
#include "base/threading/thread_checker.h"
#include "cc/layers/video_frame_provider.h"
+#include "content/common/content_export.h"
namespace base {
class SingleThreadTaskRunner;
@@ -44,13 +45,18 @@ class WebMediaPlayerMS;
// smoothness, if REFERENCE_TIMEs are populated for incoming VideoFrames.
// Otherwise, WebMediaPlayerMSCompositor will simply store the most recent
// frame, and submit it whenever asked by the compositor.
-class WebMediaPlayerMSCompositor : public cc::VideoFrameProvider {
+class CONTENT_EXPORT WebMediaPlayerMSCompositor
+ : public NON_EXPORTED_BASE(cc::VideoFrameProvider) {
public:
- // This |url| represents the media stream we are rendering.
+ // This |url| represents the media stream we are rendering. |url| is used to
+ // find out what web stream this WebMediaPlayerMSCompositor is playing, and
+ // together with flag "--disable-rtc-smoothness-algorithm" determine whether
+ // we enable algorithm or not.
WebMediaPlayerMSCompositor(
const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner,
const blink::WebURL& url,
const base::WeakPtr<WebMediaPlayerMS>& player);
+
~WebMediaPlayerMSCompositor() override;
void EnqueueFrame(const scoped_refptr<media::VideoFrame>& frame);
@@ -75,6 +81,8 @@ class WebMediaPlayerMSCompositor : public cc::VideoFrameProvider {
void ReplaceCurrentFrameWithACopy();
private:
+ friend class WebMediaPlayerMSTest;
+
bool MapTimestampsToRenderTimeTicks(
const std::vector<base::TimeDelta>& timestamps,
std::vector<base::TimeTicks>* wall_clock_times);
@@ -88,6 +96,8 @@ class WebMediaPlayerMSCompositor : public cc::VideoFrameProvider {
void StartRenderingInternal();
void StopRenderingInternal();
+ void SetAlgorithmEnabledForTesting(bool algorithm_enabled);
+
// Used for DCHECKs to ensure method calls executed in the correct thread.
base::ThreadChecker thread_checker_;
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | content/renderer/media/webmediaplayer_ms_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698