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

Unified Diff: talk/app/webrtc/fakemediacontroller.h

Issue 1363573002: Wire up transport sequence number / send time callbacks to webrtc via libjingle. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanup Created 5 years, 2 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 | talk/app/webrtc/mediacontroller.h » ('j') | talk/app/webrtc/peerconnectionfactory.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/fakemediacontroller.h
diff --git a/talk/app/webrtc/java/jni/native_handle_impl.cc b/talk/app/webrtc/fakemediacontroller.h
similarity index 64%
copy from talk/app/webrtc/java/jni/native_handle_impl.cc
copy to talk/app/webrtc/fakemediacontroller.h
index 98af4d8b7de98f698f363aa33329ce95e1d37399..5bf3e5fcf8556b914436c948d887468241ae2fae 100644
--- a/talk/app/webrtc/java/jni/native_handle_impl.cc
+++ b/talk/app/webrtc/fakemediacontroller.h
@@ -25,23 +25,31 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "talk/app/webrtc/java/jni/native_handle_impl.h"
+#ifndef TALK_APP_WEBRTC_FAKEMEDIACONTROLLER_H_
+#define TALK_APP_WEBRTC_FAKEMEDIACONTROLLER_H_
+#include "talk/app/webrtc/mediacontroller.h"
#include "webrtc/base/checks.h"
-namespace webrtc_jni {
+namespace cricket {
-NativeHandleImpl::NativeHandleImpl(JNIEnv* jni,
- jint j_oes_texture_id,
- jfloatArray j_transform_matrix)
- : oes_texture_id(j_oes_texture_id) {
- RTC_CHECK_EQ(16, jni->GetArrayLength(j_transform_matrix));
- jfloat* transform_matrix_ptr =
- jni->GetFloatArrayElements(j_transform_matrix, nullptr);
- for (int i = 0; i < 16; ++i) {
- sampling_matrix[i] = transform_matrix_ptr[i];
+class FakeMediaController : public webrtc::MediaControllerInterface {
+ public:
+ explicit FakeMediaController(cricket::ChannelManager* channel_manager,
+ webrtc::Call* call)
+ : channel_manager_(channel_manager), call_(call) {
+ RTC_DCHECK(nullptr != channel_manager_);
+ RTC_DCHECK(nullptr != call_);
+ }
+ ~FakeMediaController() override {}
+ webrtc::Call* call_w() override { return call_; }
+ cricket::ChannelManager* channel_manager() const override {
+ return channel_manager_;
}
- jni->ReleaseFloatArrayElements(j_transform_matrix, transform_matrix_ptr, 0);
-}
-} // namespace webrtc_jni
+ private:
+ cricket::ChannelManager* channel_manager_;
+ webrtc::Call* call_;
+};
+} // namespace cricket
+#endif // TALK_APP_WEBRTC_FAKEMEDIACONTROLLER_H_
« no previous file with comments | « no previous file | talk/app/webrtc/mediacontroller.h » ('j') | talk/app/webrtc/peerconnectionfactory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698