OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 ScopedLocalRefFrame local_ref_frame(jni()); | 243 ScopedLocalRefFrame local_ref_frame(jni()); |
244 jmethodID m = GetMethodID( | 244 jmethodID m = GetMethodID( |
245 jni(), *j_observer_class_, "onIceConnectionChange", | 245 jni(), *j_observer_class_, "onIceConnectionChange", |
246 "(Lorg/webrtc/PeerConnection$IceConnectionState;)V"); | 246 "(Lorg/webrtc/PeerConnection$IceConnectionState;)V"); |
247 jobject new_state_enum = JavaEnumFromIndex( | 247 jobject new_state_enum = JavaEnumFromIndex( |
248 jni(), "PeerConnection$IceConnectionState", new_state); | 248 jni(), "PeerConnection$IceConnectionState", new_state); |
249 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); | 249 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); |
250 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; | 250 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
251 } | 251 } |
252 | 252 |
| 253 void OnIceConnectionReceivingChange(bool receiving) override { |
| 254 ScopedLocalRefFrame local_ref_frame(jni()); |
| 255 jmethodID m = GetMethodID( |
| 256 jni(), *j_observer_class_, "onIceConnectionReceivingChange", "(Z)V"); |
| 257 jni()->CallVoidMethod(*j_observer_global_, m, receiving); |
| 258 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
| 259 } |
| 260 |
253 void OnIceGatheringChange( | 261 void OnIceGatheringChange( |
254 PeerConnectionInterface::IceGatheringState new_state) override { | 262 PeerConnectionInterface::IceGatheringState new_state) override { |
255 ScopedLocalRefFrame local_ref_frame(jni()); | 263 ScopedLocalRefFrame local_ref_frame(jni()); |
256 jmethodID m = GetMethodID( | 264 jmethodID m = GetMethodID( |
257 jni(), *j_observer_class_, "onIceGatheringChange", | 265 jni(), *j_observer_class_, "onIceGatheringChange", |
258 "(Lorg/webrtc/PeerConnection$IceGatheringState;)V"); | 266 "(Lorg/webrtc/PeerConnection$IceGatheringState;)V"); |
259 jobject new_state_enum = JavaEnumFromIndex( | 267 jobject new_state_enum = JavaEnumFromIndex( |
260 jni(), "PeerConnection$IceGatheringState", new_state); | 268 jni(), "PeerConnection$IceGatheringState", new_state); |
261 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); | 269 jni()->CallVoidMethod(*j_observer_global_, m, new_state_enum); |
262 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; | 270 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; |
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 } | 1693 } |
1686 | 1694 |
1687 JOW(void, VideoTrack_nativeRemoveRenderer)( | 1695 JOW(void, VideoTrack_nativeRemoveRenderer)( |
1688 JNIEnv* jni, jclass, | 1696 JNIEnv* jni, jclass, |
1689 jlong j_video_track_pointer, jlong j_renderer_pointer) { | 1697 jlong j_video_track_pointer, jlong j_renderer_pointer) { |
1690 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( | 1698 reinterpret_cast<VideoTrackInterface*>(j_video_track_pointer)->RemoveRenderer( |
1691 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); | 1699 reinterpret_cast<VideoRendererInterface*>(j_renderer_pointer)); |
1692 } | 1700 } |
1693 | 1701 |
1694 } // namespace webrtc_jni | 1702 } // namespace webrtc_jni |
OLD | NEW |