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

Unified Diff: content/renderer/pepper/pepper_media_stream_video_track_host.h

Issue 1834323002: MediaStream audio: Refactor 3 separate "glue" implementations into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE + Workaround to ensure MediaStreamAudioProcessor is destroyed on the main thread. Created 4 years, 7 months 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
Index: content/renderer/pepper/pepper_media_stream_video_track_host.h
diff --git a/content/renderer/pepper/pepper_media_stream_video_track_host.h b/content/renderer/pepper/pepper_media_stream_video_track_host.h
index b510377001ceb21ae3de00bbc76d9e436fd7a8ea..e4e603c43cd3cdf60373d9ab71963e844cb94834 100644
--- a/content/renderer/pepper/pepper_media_stream_video_track_host.h
+++ b/content/renderer/pepper/pepper_media_stream_video_track_host.h
@@ -10,8 +10,8 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "content/public/common/media_stream_request.h"
#include "content/public/renderer/media_stream_video_sink.h"
-#include "content/renderer/media/media_stream_video_source.h"
#include "content/renderer/pepper/pepper_media_stream_track_host_base.h"
#include "media/base/video_frame.h"
#include "ppapi/c/ppb_video_frame.h"
@@ -21,9 +21,10 @@
namespace content {
+class MediaStreamSource;
+
class PepperMediaStreamVideoTrackHost : public PepperMediaStreamTrackHostBase,
- public MediaStreamVideoSink,
- public MediaStreamVideoSource {
+ public MediaStreamVideoSink {
public:
// Input mode constructor.
// In input mode, this class passes video frames from |track| to the
@@ -47,6 +48,11 @@ class PepperMediaStreamVideoTrackHost : public PepperMediaStreamTrackHostBase,
blink::WebMediaStreamTrack track() { return track_; }
private:
+ // Implements a MediaStreamVideoSource that drives this host (output mode
+ // only). VideoSource holds a weak reference to the host, and sets/clears
+ // |frame_deliverer_|.
+ class VideoSource;
+
void InitBuffers();
// PepperMediaStreamTrackHostBase overrides:
@@ -60,20 +66,6 @@ class PepperMediaStreamVideoTrackHost : public PepperMediaStreamTrackHostBase,
void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame,
base::TimeTicks estimated_capture_time);
- // MediaStreamVideoSource overrides:
- void GetCurrentSupportedFormats(
- int max_requested_width,
- int max_requested_height,
- double max_requested_frame_rate,
- const VideoCaptureDeviceFormatsCB& callback) override;
-
- void StartSourceImpl(
- const media::VideoCaptureFormat& format,
- const blink::WebMediaConstraints& constraints,
- const VideoCaptureDeliverFrameCB& frame_callback) override;
-
- void StopSourceImpl() override;
-
// ResourceHost overrides:
void DidConnectPendingHostToResource() override;
@@ -115,7 +107,6 @@ class PepperMediaStreamVideoTrackHost : public PepperMediaStreamTrackHostBase,
// TODO(ronghuawu): Remove |type_| and split PepperMediaStreamVideoTrackHost
// into 2 classes for read and write.
TrackType type_;
- bool output_started_;
// Internal class used for delivering video frames on the IO-thread to
// the MediaStreamVideoSource implementation.

Powered by Google App Engine
This is Rietveld 408576698