OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 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 46 matching lines...) Loading... |
57 void Stop() override; | 57 void Stop() override; |
58 | 58 |
59 void ReturnBuffer(int64 time_stamp) override; | 59 void ReturnBuffer(int64 time_stamp) override; |
60 | 60 |
61 std::string GetSupportedFormats() override; | 61 std::string GetSupportedFormats() override; |
62 | 62 |
63 // Called from VideoCapturerAndroid::NativeObserver on a Java thread. | 63 // Called from VideoCapturerAndroid::NativeObserver on a Java thread. |
64 void OnCapturerStarted(bool success); | 64 void OnCapturerStarted(bool success); |
65 void OnIncomingFrame(void* video_frame, | 65 void OnIncomingFrame(void* video_frame, |
66 int length, | 66 int length, |
| 67 int width, |
| 68 int height, |
67 int rotation, | 69 int rotation, |
68 int64 time_stamp); | 70 int64 time_stamp); |
69 void OnOutputFormatRequest(int width, int height, int fps); | 71 void OnOutputFormatRequest(int width, int height, int fps); |
70 protected: | 72 protected: |
71 AndroidVideoCapturerJni(JNIEnv* jni, jobject j_video_capturer); | 73 AndroidVideoCapturerJni(JNIEnv* jni, jobject j_video_capturer); |
72 ~AndroidVideoCapturerJni(); | 74 ~AndroidVideoCapturerJni(); |
73 | 75 |
74 private: | 76 private: |
75 bool Init(jstring device_name); | 77 bool Init(jstring device_name); |
76 | 78 |
77 void OnCapturerStarted_w(bool success); | 79 void OnCapturerStarted_w(bool success); |
78 void OnCapturerStopped_w(); | 80 void OnCapturerStopped_w(); |
79 void OnIncomingFrame_w(void* video_frame, | 81 void OnIncomingFrame_w(void* video_frame, |
80 int length, | 82 int length, |
| 83 int width, |
| 84 int height, |
81 int rotation, | 85 int rotation, |
82 int64 time_stamp); | 86 int64 time_stamp); |
83 void OnOutputFormatRequest_w(int width, int height, int fps); | 87 void OnOutputFormatRequest_w(int width, int height, int fps); |
84 void ReturnBuffer_w(int64 time_stamp); | 88 void ReturnBuffer_w(int64 time_stamp); |
85 | 89 |
86 JNIEnv* jni(); | 90 JNIEnv* jni(); |
87 | 91 |
88 const ScopedGlobalRef<jobject> j_capturer_global_; | 92 const ScopedGlobalRef<jobject> j_capturer_global_; |
89 const ScopedGlobalRef<jclass> j_video_capturer_class_; | 93 const ScopedGlobalRef<jclass> j_video_capturer_class_; |
90 const ScopedGlobalRef<jclass> j_observer_class_; | 94 const ScopedGlobalRef<jclass> j_observer_class_; |
(...skipping 10 matching lines...) Loading... |
101 rtc::AsyncInvoker invoker_; | 105 rtc::AsyncInvoker invoker_; |
102 | 106 |
103 static jobject application_context_; | 107 static jobject application_context_; |
104 | 108 |
105 DISALLOW_COPY_AND_ASSIGN(AndroidVideoCapturerJni); | 109 DISALLOW_COPY_AND_ASSIGN(AndroidVideoCapturerJni); |
106 }; | 110 }; |
107 | 111 |
108 } // namespace webrtc_jni | 112 } // namespace webrtc_jni |
109 | 113 |
110 #endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ | 114 #endif // TALK_APP_WEBRTC_JAVA_JNI_ANDROIDVIDEOCAPTURER_JNI_H_ |
OLD | NEW |