OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license | |
5 * that can be found in the LICENSE file in the root of the source | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #include "webrtc/api/mediastreaminterface.h" | |
12 #include "webrtc/sdk/android/src/jni/jni_helpers.h" | |
13 | |
14 namespace webrtc_jni { | |
15 | |
16 JOW(jboolean, MediaStream_nativeAddAudioTrack) | |
17 (JNIEnv* jni, jclass, jlong pointer, jlong j_audio_track_pointer) { | |
18 return reinterpret_cast<webrtc::MediaStreamInterface*>(pointer)->AddTrack( | |
19 reinterpret_cast<webrtc::AudioTrackInterface*>(j_audio_track_pointer)); | |
20 } | |
21 | |
22 JOW(jboolean, MediaStream_nativeAddVideoTrack) | |
23 (JNIEnv* jni, jclass, jlong pointer, jlong j_video_track_pointer) { | |
24 return reinterpret_cast<webrtc::MediaStreamInterface*>(pointer)->AddTrack( | |
25 reinterpret_cast<webrtc::VideoTrackInterface*>(j_video_track_pointer)); | |
26 } | |
27 | |
28 JOW(jboolean, MediaStream_nativeRemoveAudioTrack) | |
29 (JNIEnv* jni, jclass, jlong pointer, jlong j_audio_track_pointer) { | |
30 return reinterpret_cast<webrtc::MediaStreamInterface*>(pointer)->RemoveTrack( | |
31 reinterpret_cast<webrtc::AudioTrackInterface*>(j_audio_track_pointer)); | |
32 } | |
33 | |
34 JOW(jboolean, MediaStream_nativeRemoveVideoTrack) | |
35 (JNIEnv* jni, jclass, jlong pointer, jlong j_video_track_pointer) { | |
36 return reinterpret_cast<webrtc::MediaStreamInterface*>(pointer)->RemoveTrack( | |
37 reinterpret_cast<webrtc::VideoTrackInterface*>(j_video_track_pointer)); | |
38 } | |
39 | |
40 JOW(jstring, MediaStream_nativeLabel)(JNIEnv* jni, jclass, jlong j_p) { | |
41 return JavaStringFromStdString( | |
42 jni, reinterpret_cast<webrtc::MediaStreamInterface*>(j_p)->label()); | |
43 } | |
44 | |
45 JOW(void, MediaStream_free)(JNIEnv*, jclass, jlong j_p) { | |
46 CHECK_RELEASE(reinterpret_cast<webrtc::MediaStreamInterface*>(j_p)); | |
47 } | |
48 | |
49 } // namespace webrtc_jni | |
OLD | NEW |