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

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

Issue 264363005: Cast: deliver video frames on the IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ThreadCheckerImpl Created 6 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
« no previous file with comments | « content/renderer/media/video_frame_deliverer.cc ('k') | content/renderer/media/video_source_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_source_handler.h
diff --git a/content/renderer/media/video_source_handler.h b/content/renderer/media/video_source_handler.h
index 7337d804fbcce8a6176f6ef0b695333768990fdd..ead167a0a5b6e7100740487a202ccac63c3e9f07 100644
--- a/content/renderer/media/video_source_handler.h
+++ b/content/renderer/media/video_source_handler.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
@@ -50,22 +51,24 @@ class CONTENT_EXPORT VideoSourceHandler {
// Returns true on success and false on failure.
bool Close(FrameReaderInterface* reader);
- // Gets the MediaStreamVideoSink associated with |reader|.
- // Made it public only for testing purpose.
- MediaStreamVideoSink* GetReceiver(FrameReaderInterface* reader);
-
private:
+ FRIEND_TEST_ALL_PREFIXES(VideoSourceHandlerTest, OpenClose);
+
struct SourceInfo {
SourceInfo(const blink::WebMediaStreamTrack& blink_track,
FrameReaderInterface* reader);
~SourceInfo();
scoped_ptr<PpFrameReceiver> receiver_;
- blink::WebMediaStreamTrack track_;
};
typedef std::map<FrameReaderInterface*, SourceInfo*> SourceInfoMap;
+ // Deliver VideoFrame to the MediaStreamVideoSink associated with
+ // |reader|. For testing only.
+ void DeliverFrameForTesting(FrameReaderInterface* reader,
+ const scoped_refptr<media::VideoFrame>& frame);
+
blink::WebMediaStreamTrack GetFirstVideoTrack(const std::string& url);
MediaStreamRegistryInterface* registry_;
@@ -79,4 +82,3 @@ class CONTENT_EXPORT VideoSourceHandler {
} // namespace content
#endif // CONTENT_RENDERER_MEDIA_VIDEO_SOURCE_HANDLER_H_
-
« no previous file with comments | « content/renderer/media/video_frame_deliverer.cc ('k') | content/renderer/media/video_source_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698