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

Side by Side Diff: webrtc/api/java/src/org/webrtc/RtpSender.java

Issue 1819553002: Added the JNI interface to get and set RtpParameters and the maximum bitrate limits. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Removed the dependency on the rtc::Optional CL Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 28 matching lines...) Expand all
39 } 39 }
40 cachedTrack = track; 40 cachedTrack = track;
41 ownsTrack = takeOwnership; 41 ownsTrack = takeOwnership;
42 return true; 42 return true;
43 } 43 }
44 44
45 public MediaStreamTrack track() { 45 public MediaStreamTrack track() {
46 return cachedTrack; 46 return cachedTrack;
47 } 47 }
48 48
49 public boolean setParameters(RtpParameters parameters) {
50 return nativeSetParameters(nativeRtpSender, parameters);
51 }
52
53 public RtpParameters getParameters() {
54 return nativeGetParameters(nativeRtpSender);
55 }
56
49 public String id() { 57 public String id() {
50 return nativeId(nativeRtpSender); 58 return nativeId(nativeRtpSender);
51 } 59 }
52 60
53 public void dispose() { 61 public void dispose() {
54 if (cachedTrack != null && ownsTrack) { 62 if (cachedTrack != null && ownsTrack) {
55 cachedTrack.dispose(); 63 cachedTrack.dispose();
56 } 64 }
57 free(nativeRtpSender); 65 free(nativeRtpSender);
58 } 66 }
59 67
60 private static native boolean nativeSetTrack(long nativeRtpSender, 68 private static native boolean nativeSetTrack(long nativeRtpSender,
61 long nativeTrack); 69 long nativeTrack);
62 70
63 // This should increment the reference count of the track. 71 // This should increment the reference count of the track.
64 // Will be released in dispose() or setTrack(). 72 // Will be released in dispose() or setTrack().
65 private static native long nativeGetTrack(long nativeRtpSender); 73 private static native long nativeGetTrack(long nativeRtpSender);
66 74
75 private static native boolean nativeSetParameters(long nativeRtpSender, RtpPar ameters parameters);
76
77 private static native RtpParameters nativeGetParameters(long nativeRtpSender);
78
67 private static native String nativeId(long nativeRtpSender); 79 private static native String nativeId(long nativeRtpSender);
68 80
69 private static native void free(long nativeRtpSender); 81 private static native void free(long nativeRtpSender);
70 } 82 }
71 ; 83 ;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698