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

Side by Side Diff: content/renderer/media/video_frame_deliverer.h

Issue 246433006: Change MediaStreamVideoSource to output different resolutions to different tracks depending on the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_FRAME_DELIVERER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_FRAME_DELIVERER_H_
6 #define CONTENT_RENDERER_MEDIA_VIDEO_FRAME_DELIVERER_H_ 6 #define CONTENT_RENDERER_MEDIA_VIDEO_FRAME_DELIVERER_H_
7 7
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/message_loop/message_loop_proxy.h" 13 #include "base/message_loop/message_loop_proxy.h"
14 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
15 #include "content/common/media/video_capture.h" 15 #include "content/common/media/video_capture.h"
16 #include "media/base/video_frame.h" 16 #include "media/base/video_frame.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 // VideoFrameDeliverer is a helper class used for registering 20 // VideoFrameDeliverer is a helper class used for registering
21 // VideoCaptureDeliverFrameCB on the main render thread to receive video frames 21 // VideoCaptureDeliverFrameCB on the main render thread to receive video frames
22 // on the IO-thread. 22 // on the IO-thread.
23 // Its used by MediaStreamVideoTrack and MediaStreamVideoSource. 23 // Its used by MediaStreamVideoTrack.
24 class VideoFrameDeliverer 24 class VideoFrameDeliverer
25 : public base::RefCountedThreadSafe<VideoFrameDeliverer> { 25 : public base::RefCountedThreadSafe<VideoFrameDeliverer> {
26 public: 26 public:
27 explicit VideoFrameDeliverer( 27 explicit VideoFrameDeliverer(
28 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); 28 const scoped_refptr<base::MessageLoopProxy>& io_message_loop);
29 29
30 // Add |callback| to receive video frames on the IO-thread. 30 // Add |callback| to receive video frames on the IO-thread.
31 // Must be called on the main render thread. 31 // Must be called on the main render thread.
32 void AddCallback(void* id, const VideoCaptureDeliverFrameCB& callback); 32 void AddCallback(void* id, const VideoCaptureDeliverFrameCB& callback);
33 33
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 typedef std::pair<void*, VideoCaptureDeliverFrameCB> VideoIdCallbackPair; 72 typedef std::pair<void*, VideoCaptureDeliverFrameCB> VideoIdCallbackPair;
73 std::vector<VideoIdCallbackPair> callbacks_; 73 std::vector<VideoIdCallbackPair> callbacks_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(VideoFrameDeliverer); 75 DISALLOW_COPY_AND_ASSIGN(VideoFrameDeliverer);
76 }; 76 };
77 77
78 } // namespace content 78 } // namespace content
79 79
80 #endif // CONTENT_RENDERER_MEDIA_VIDEO_FRAME_DELIVERER_H_ 80 #endif // CONTENT_RENDERER_MEDIA_VIDEO_FRAME_DELIVERER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/mock_media_stream_video_source.cc ('k') | content/renderer/media/video_track_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698