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

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: Workaround to not break chrome. Created 4 years, 10 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
« no previous file with comments | « talk/app/webrtc/videosourceproxy.h ('k') | talk/media/base/capturemanager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 virtual void AddVideoSink(VideoCapturer* video_capturer,
83 VideoRenderer* video_renderer); 83 rtc::VideoSinkInterface<VideoFrame>* sink);
84 virtual bool RemoveVideoRenderer(VideoCapturer* video_capturer, 84 virtual void RemoveVideoSink(VideoCapturer* video_capturer,
85 VideoRenderer* video_renderer); 85 rtc::VideoSinkInterface<VideoFrame>* sink);
86 86
87 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange; 87 sigslot::repeater2<VideoCapturer*, CaptureState> SignalCapturerStateChange;
88 88
89 private: 89 private:
90 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates; 90 typedef std::map<VideoCapturer*, VideoCapturerState*> CaptureStates;
91 91
92 bool IsCapturerRegistered(VideoCapturer* video_capturer) const; 92 bool IsCapturerRegistered(VideoCapturer* video_capturer) const;
93 bool RegisterVideoCapturer(VideoCapturer* video_capturer); 93 bool RegisterVideoCapturer(VideoCapturer* video_capturer);
94 void UnregisterVideoCapturer(VideoCapturerState* capture_state); 94 void UnregisterVideoCapturer(VideoCapturerState* capture_state);
95 95
96 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info, 96 bool StartWithBestCaptureFormat(VideoCapturerState* capture_info,
97 VideoCapturer* video_capturer); 97 VideoCapturer* video_capturer);
98 98
99 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const; 99 VideoCapturerState* GetCaptureState(VideoCapturer* video_capturer) const;
100 CaptureRenderAdapter* GetAdapter(VideoCapturer* video_capturer) const; 100 CaptureRenderAdapter* GetAdapter(VideoCapturer* video_capturer) const;
101 101
102 rtc::ThreadChecker thread_checker_; 102 rtc::ThreadChecker thread_checker_;
103 CaptureStates capture_states_; 103 CaptureStates capture_states_;
104 }; 104 };
105 105
106 } // namespace cricket 106 } // namespace cricket
107 107
108 #endif // TALK_MEDIA_BASE_CAPTUREMANAGER_H_ 108 #endif // TALK_MEDIA_BASE_CAPTUREMANAGER_H_
OLDNEW
« no previous file with comments | « talk/app/webrtc/videosourceproxy.h ('k') | talk/media/base/capturemanager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698