Android: Generate JNI code for MediaConstraints
Also improves ownership model by using std::unique_ptr in a couple of places instead of raw pointers. Bug: webrtc:8278 Change-Id: I0429ec3c416b5baa1ffa21dad71e0d64b004c446 Reviewed-on: https://webrtc-review.googlesource.com/25020 Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20863}
This commit is contained in:

committed by
Commit Bot

parent
f281853c11
commit
3ecdd0f02a
@ -28,10 +28,12 @@ public class MediaConstraints {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@CalledByNative("KeyValuePair")
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
@CalledByNative("KeyValuePair")
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
@ -83,4 +85,14 @@ public class MediaConstraints {
|
||||
return "mandatory: " + stringifyKeyValuePairList(mandatory) + ", optional: "
|
||||
+ stringifyKeyValuePairList(optional);
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
List<KeyValuePair> getMandatory() {
|
||||
return mandatory;
|
||||
}
|
||||
|
||||
@CalledByNative
|
||||
List<KeyValuePair> getOptional() {
|
||||
return optional;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user