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

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

Issue 287313002: Pass a TimeTicks along video capture pipeline to represent capture time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged and land Created 6 years, 6 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_TRACK_ADAPTER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_
6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ 6 #define CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/time/time.h"
12 #include "content/renderer/media/media_stream_video_track.h" 13 #include "content/renderer/media/media_stream_video_track.h"
13 #include "media/base/video_frame.h" 14 #include "media/base/video_frame.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 // VideoTrackAdapter is a helper class used by MediaStreamVideoSource used for 18 // VideoTrackAdapter is a helper class used by MediaStreamVideoSource used for
18 // adapting the video resolution from a source implementation to the resolution 19 // adapting the video resolution from a source implementation to the resolution
19 // a track requires. Different tracks can have different resolution constraints. 20 // a track requires. Different tracks can have different resolution constraints.
20 // The constraints can be set as max width and height as well as max and min 21 // The constraints can be set as max width and height as well as max and min
21 // aspect ratio. 22 // aspect ratio.
(...skipping 15 matching lines...) Expand all
37 VideoCaptureDeliverFrameCB frame_callback, 38 VideoCaptureDeliverFrameCB frame_callback,
38 int max_width, int max_height, 39 int max_width, int max_height,
39 double min_aspect_ratio, 40 double min_aspect_ratio,
40 double max_aspect_ratio); 41 double max_aspect_ratio);
41 void RemoveTrack(const MediaStreamVideoTrack* track); 42 void RemoveTrack(const MediaStreamVideoTrack* track);
42 43
43 // Delivers |frame| to all tracks that have registered a callback. 44 // Delivers |frame| to all tracks that have registered a callback.
44 // Must be called on the IO-thread. 45 // Must be called on the IO-thread.
45 void DeliverFrameOnIO( 46 void DeliverFrameOnIO(
46 const scoped_refptr<media::VideoFrame>& frame, 47 const scoped_refptr<media::VideoFrame>& frame,
47 const media::VideoCaptureFormat& format); 48 const media::VideoCaptureFormat& format,
49 const base::TimeTicks& estimated_capture_time);
48 50
49 const scoped_refptr<base::MessageLoopProxy>& io_message_loop() { 51 const scoped_refptr<base::MessageLoopProxy>& io_message_loop() {
50 DCHECK(thread_checker_.CalledOnValidThread()); 52 DCHECK(thread_checker_.CalledOnValidThread());
51 return io_message_loop_; 53 return io_message_loop_;
52 } 54 }
53 55
54 private: 56 private:
55 virtual ~VideoTrackAdapter(); 57 virtual ~VideoTrackAdapter();
56 friend class base::RefCountedThreadSafe<VideoTrackAdapter>; 58 friend class base::RefCountedThreadSafe<VideoTrackAdapter>;
57 59
(...skipping 21 matching lines...) Expand all
79 typedef std::vector<scoped_refptr<VideoFrameResolutionAdapter> > 81 typedef std::vector<scoped_refptr<VideoFrameResolutionAdapter> >
80 FrameAdapters; 82 FrameAdapters;
81 FrameAdapters adapters_; 83 FrameAdapters adapters_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter); 85 DISALLOW_COPY_AND_ASSIGN(VideoTrackAdapter);
84 }; 86 };
85 87
86 } // namespace content 88 } // namespace content
87 89
88 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_ 90 #endif // CONTENT_RENDERER_MEDIA_VIDEO_TRACK_ADAPTER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/video_source_handler.cc ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698