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

Unified Diff: webrtc/api/androidvideocapturer.h

Issue 1973873003: Delete AndroidVideoCapturer::FrameFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address nits. Created 4 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 | « no previous file | webrtc/api/androidvideocapturer.cc » ('j') | webrtc/api/java/jni/native_handle_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/androidvideocapturer.h
diff --git a/webrtc/api/androidvideocapturer.h b/webrtc/api/androidvideocapturer.h
index 4c73f3159874e76323fdee76a04702c6d575969d..842a2700eae915add9085bb9cdecc4027c4cf7ee 100644
--- a/webrtc/api/androidvideocapturer.h
+++ b/webrtc/api/androidvideocapturer.h
@@ -17,6 +17,14 @@
#include "webrtc/base/thread_checker.h"
#include "webrtc/common_video/include/video_frame_buffer.h"
#include "webrtc/media/base/videocapturer.h"
+#include "third_party/libyuv/include/libyuv/rotate.h"
+
+namespace webrtc_jni {
+
+struct NativeHandleImpl;
+class SurfaceTextureHelper;
+
+} // namespace webrtc_jni
namespace webrtc {
@@ -41,19 +49,28 @@ class AndroidVideoCapturerDelegate : public rtc::RefCountInterface {
// PeerConnection.
class AndroidVideoCapturer : public cricket::VideoCapturer {
public:
- explicit AndroidVideoCapturer(
- const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate);
+ AndroidVideoCapturer(
+ const rtc::scoped_refptr<AndroidVideoCapturerDelegate>& delegate,
+ rtc::scoped_refptr<webrtc_jni::SurfaceTextureHelper> helper);
virtual ~AndroidVideoCapturer();
// Called from JNI when the capturer has been started.
void OnCapturerStarted(bool success);
// Called from JNI when a new frame has been captured.
- // Argument |buffer| is intentionally by value, for use with rtc::Bind.
- void OnIncomingFrame(
- const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
- int rotation,
- int64_t time_stamp);
+ void OnNV21Frame(const uint8_t* video_frame,
+ int length,
+ int width,
+ int height,
+ webrtc::VideoRotation rotation,
+ int64_t timestamp_ns);
+
+ // Called from JNI when a new frame has been captured.
+ void OnTextureFrame(int width,
+ int height,
+ webrtc::VideoRotation rotation,
+ int64_t timestamp_ns,
+ const webrtc_jni::NativeHandleImpl& handle);
// Called from JNI to request a new video format.
void OnOutputFormatRequest(int width, int height, int fps);
@@ -77,12 +94,9 @@ class AndroidVideoCapturer : public cricket::VideoCapturer {
bool running_;
rtc::scoped_refptr<AndroidVideoCapturerDelegate> delegate_;
-
+ rtc::scoped_refptr<webrtc_jni::SurfaceTextureHelper> surface_texture_helper_;
rtc::ThreadChecker thread_checker_;
- class FrameFactory;
- FrameFactory* frame_factory_; // Owned by cricket::VideoCapturer.
-
cricket::CaptureState current_state_;
};
« no previous file with comments | « no previous file | webrtc/api/androidvideocapturer.cc » ('j') | webrtc/api/java/jni/native_handle_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698