3 * Copyright (C) 2014-2015 Matthew Waters <matthew@centricular.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 package org.freedesktop.gstreamer;
23 import java.io.Closeable;
24 import android.view.Surface;
25 import android.content.Context;
26 import org.freedesktop.gstreamer.GStreamer;
28 public class WebRTC implements Closeable {
29 private static native void nativeClassInit();
30 public static void init(Context context) throws Exception {
31 System.loadLibrary("gstreamer_android");
32 GStreamer.init(context);
34 System.loadLibrary("gstwebrtc");
38 private long native_webrtc;
39 private native void nativeNew();
44 private native void nativeFree();
50 private Surface surface;
51 private native void nativeSetSurface(Surface surface);
52 public void setSurface(Surface surface) {
53 this.surface = surface;
54 nativeSetSurface(surface);
57 public Surface getSurface() {
61 private String signallingServer;
62 private native void nativeSetSignallingServer(String server);
63 public void setSignallingServer(String server) {
64 this.signallingServer = server;
65 nativeSetSignallingServer(server);
68 public String getSignallingServer() {
69 return this.signallingServer;
72 private String callID;
73 private native void nativeSetCallID(String ID);
74 public void setCallID(String ID) {
79 public String getCallID() {
83 private native void nativeCallOtherParty();
84 public void callOtherParty() {
85 nativeCallOtherParty();
88 private native void nativeEndCall();
89 public void endCall() {