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

Side by Side Diff: talk/media/base/capturemanager.h

Issue 1594973006: New rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use rtc::VideoSinkInterface on the call chain VideoSource --> CaptureRenderAdapter Created 4 years, 11 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Possibly restarts the capturer. If |options| is set to kRequestRestart, 73 // Possibly restarts the capturer. If |options| is set to kRequestRestart,
74 // the CaptureManager chooses whether this request can be handled with the 74 // the CaptureManager chooses whether this request can be handled with the
75 // current state or if a restart is actually needed. If |options| is set to 75 // current state or if a restart is actually needed. If |options| is set to
76 // kForceRestart, the capturer is restarted. 76 // kForceRestart, the capturer is restarted.
77 virtual bool RestartVideoCapture(VideoCapturer* video_capturer, 77 virtual bool RestartVideoCapture(VideoCapturer* video_capturer,
78 const VideoFormat& previous_format, 78 const VideoFormat& previous_format,
79 const VideoFormat& desired_format, 79 const VideoFormat& desired_format,
80 RestartOptions options); 80 RestartOptions options);
81 81
82 virtual bool AddVideoRenderer(VideoCapturer* video_capturer, 82 // TODO(nisse): Return values are mostly useless. Currently, these
83 VideoRenderer* video_renderer); 83 // methods tolerate nullptr inputs, probably not needed.
84 virtual bool RemoveVideoRenderer(VideoCapturer* video_capturer, 84 virtual bool AddVideoSink(VideoCapturer* video_capturer,
85 VideoRenderer* video_renderer); 85 rtc::VideoSinkInterface<VideoFrame>* sink);
pthatcher1 2016/01/27 01:11:03 Can you just make these void? You can either retu
nisse-webrtc 2016/01/27 09:08:51 Done, deleting return values also for the ChannelM
86 virtual bool RemoveVideoSink(VideoCapturer* video_capturer,
87 rtc::VideoSinkInterface<VideoFrame>* sink);
86 88
87 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange; 89 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange;
88 90
89 private: 91 private:
90 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates; 92 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates;
91 93
92 bool IsCapturerRegistered(VideoCapturer* video_capturer) const; 94 bool IsCapturerRegistered(VideoCapturer* video_capturer) const;
93 bool RegisterVideoCapturer(VideoCapturer* video_capturer); 95 bool RegisterVideoCapturer(VideoCapturer* video_capturer);
94 void UnregisterVideoCapturer(VideoCapturerState* capture_state); 96 void UnregisterVideoCapturer(VideoCapturerState* capture_state);
95 97
96 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info, 98 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info,
97 VideoCapturer* video_capturer); 99 VideoCapturer* video_capturer);
98 100
99 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const; 101 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const;
100 CaptureRenderAdapter* GetAdapter(VideoCapturer* video_capturer) const; 102 CaptureRenderAdapter* GetAdapter(VideoCapturer* video_capturer) const;
101 103
102 rtc::ThreadChecker thread_checker_; 104 rtc::ThreadChecker thread_checker_;
103 CaptureStates capture_states_; 105 CaptureStates capture_states_;
104 }; 106 };
105 107
106 } // namespace cricket 108 } // namespace cricket
107 109
108 #endif // TALK_MEDIA_BASE_CAPTUREMANAGER_H_ 110 #endif // TALK_MEDIA_BASE_CAPTUREMANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698