Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial support for ppc64le #551

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
</classpath>
<sysproperty
key="java.library.path"
path="lib/native/linux-x86-64:lib/native/linux-x86:lib/native/darwin:lib/native/win32-x86-64:lib/native/win32-x86" />
path="lib/native/linux-ppc64le:lib/native/linux-x86-64:lib/native/linux-x86:lib/native/darwin:lib/native/win32-x86-64:lib/native/win32-x86" />
</java>
</target>

Expand Down Expand Up @@ -237,6 +237,12 @@
<zipfileset dir="lib/native/linux-x86-64" includes="*.so"
prefix="lib/native/linux-x86-64"/>
</zip>
<zip destfile="${dist}/linux/libjitsi-${build.label}-ppc64le.zip">
<zipfileset file="libjitsi.jar" />
<zipfileset dir="lib" includes="*.jar" prefix="lib"/>
<zipfileset dir="lib/native/linux-ppc64le" includes="*.so"
prefix="lib/native/linux-ppc64le"/>
</zip>
<zip destfile="${dist}/src/libjitsi-src-${build.label}.zip">
<zipfileset dir="." prefix="libjitsi">
<exclude name="classes/"/>
Expand All @@ -254,7 +260,7 @@
<classpath refid="test.class.path"/>
<sysproperty
key="java.library.path"
path="lib/native/linux-x86-64:lib/native/linux-x86:lib/native/darwin:lib/native/win32-x86-64:lib/native/win32-x86" />
path="lib/native/linux-ppc64le:lib/native/linux-x86-64:lib/native/linux-x86:lib/native/darwin:lib/native/win32-x86-64:lib/native/win32-x86" />
<test name="org.jitsi.sctp4j.SctpTestSuite"
todir="${junit.reports}"/>
</junit>
Expand Down
Binary file added lib/native/linux-ppc64le/libjnopus.so
Binary file not shown.
Binary file added lib/native/linux-ppc64le/libjnportaudio.so
Binary file not shown.
Binary file added lib/native/linux-ppc64le/libjnpulseaudio.so
Binary file not shown.
Binary file added lib/native/linux-ppc64le/libjnscreencapture.so
Binary file not shown.
Binary file added lib/native/linux-ppc64le/libjnsctp.so
Binary file not shown.
Binary file added lib/native/linux-ppc64le/libjnspeex.so
Binary file not shown.
Binary file added lib/native/linux-ppc64le/libjnvideo4linux2.so
Binary file not shown.
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@
linux-x86-64/libjnspeex.so;
linux-x86-64/libjnvideo4linux2.so;
linux-x86-64/libjnvpx.so;osname=Linux;processor=x86-64,
linux-ppc64le/libjnopus.so;
linux-ppc64le/libjnportaudio.so;
linux-ppc64le/libjnpulseaudio.so;
linux-ppc64le/libjnscreencapture.so;
linux-ppc64le/libjnsctp.so;
linux-ppc64le/libjnspeex.so;
linux-ppc64le/libjnvideo4linux2.so;
<!--linux-ppc64le/libjnvpx.so;-->osname=Linux;processor=ppc64le,
win32-x86/jnawtrenderer.dll;
win32-x86/jndirectshow.dll;
win32-x86/jnopus.dll;
Expand Down
45 changes: 45 additions & 0 deletions src/native/linux/pulseaudio/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright @ 2015 Atlassian Pty Ltd
# Copyright @ 2021 Raptor Engineering, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

CC=gcc

JNI_HEADERS = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
PULSEAUDIO_HEADERS = -I"/usr/include/"

CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(PULSEAUDIO_HEADERS)

OBJS = org_jitsi_impl_neomedia_pulseaudio_PA.c

LIBS = -lpulse -lpthread

libjnpulseaudio.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnpulseaudio.so $(LIBS)

install32: libjnpulseaudio.so
cp libjnpulseaudio.so "../../../../lib/native/linux-x86/libjnpulseaudio.so"
cp libjnpulseaudio.so "../../../../../jitsi-videobridge/lib/native/linux/libjnpulseaudio.so"

install64: libjnpulseaudio.so
cp libjnpulseaudio.so "../../../../lib/native/linux-x86-64/libjnpulseaudio.so"
cp libjnpulseaudio.so "../../../../../jitsi-videobridge/lib/native/linux-64/libjnpulseaudio.so"

installppc64: libjnpulseaudio.so
cp libjnpulseaudio.so "../../../../lib/native/linux-ppc64le/libjnpulseaudio.so"
cp libjnpulseaudio.so "../../../../../jitsi-videobridge/lib/native/linux-ppc64le/libjnpulseaudio.so"

clean:
rm -f *.so
45 changes: 45 additions & 0 deletions src/native/linux/video4linux2/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright @ 2015 Atlassian Pty Ltd
# Copyright @ 2021 Raptor Engineering, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

CC=gcc

JNI_HEADERS = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
VIDEO4LINUX2_HEADERS = -I"/usr/include/"

CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(VIDEO4LINUX2_HEADERS)

OBJS = org_jitsi_impl_neomedia_jmfext_media_protocol_video4linux2_Video4Linux2.c

LIBS = -lv4l2 -lpthread

libjnvideo4linux2.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnvideo4linux2.so $(LIBS)

install32: libjnvideo4linux2.so
cp libjnvideo4linux2.so "../../../../lib/native/linux-x86/libjnvideo4linux2.so"
cp libjnvideo4linux2.so "../../../../../jitsi-videobridge/lib/native/linux/libjnvideo4linux2.so"

install64: libjnvideo4linux2.so
cp libjnvideo4linux2.so "../../../../lib/native/linux-x86-64/libjnvideo4linux2.so"
cp libjnvideo4linux2.so "../../../../../jitsi-videobridge/lib/native/linux-64/libjnvideo4linux2.so"

installppc64: libjnvideo4linux2.so
cp libjnvideo4linux2.so "../../../../lib/native/linux-ppc64le/libjnvideo4linux2.so"
cp libjnvideo4linux2.so "../../../../../jitsi-videobridge/lib/native/linux-ppc64le/libjnvideo4linux2.so"

clean:
rm -f *.so
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/select.h>
#include <unistd.h>

#include <linux/videodev2.h>
Expand Down
45 changes: 45 additions & 0 deletions src/native/opus/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright @ 2015 Atlassian Pty Ltd
# Copyright @ 2021 Raptor Engineering, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

CC=gcc

JNI_HEADERS = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
OPUS_HEADERS = -I"/usr/include/opus"

CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(OPUS_HEADERS)

OBJS = org_jitsi_impl_neomedia_codec_audio_opus_Opus.c

LIBS = -lopus -lpthread

libjnopus.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnopus.so $(LIBS)

install32: libjnopus.so
cp libjnopus.so "../../../lib/native/linux-x86/libjnopus.so"
cp libjnopus.so "../../../../jitsi-videobridge/lib/native/linux/libjnopus.so"

install64: libjnopus.so
cp libjnopus.so "../../../lib/native/linux-x86-64/libjnopus.so"
cp libjnopus.so "../../../../jitsi-videobridge/lib/native/linux-64/libjnopus.so"

installppc64: libjnopus.so
cp libjnopus.so "../../../lib/native/linux-ppc64le/libjnopus.so"
cp libjnopus.so "../../../../jitsi-videobridge/lib/native/linux-ppc64le/libjnopus.so"

clean:
rm -f *.so
2 changes: 2 additions & 0 deletions src/native/portaudio/README
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Get portaudio-hotplug branch:
$ git clone https://github.com/jitsi/portaudio
$ git checkout libjitsi
$ cp -Rp /usr/share/misc/config.guess .
$ autoreconf -i (OS X and Linux only)
$ ./configure --disable-shared --enable-static --with-pic --with-jack=no
$ make/gmake
Expand Down
45 changes: 45 additions & 0 deletions src/native/portaudio/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright @ 2015 Atlassian Pty Ltd
# Copyright @ 2021 Raptor Engineering, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

CC=gcc

JNI_HEADERS = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
PORTAUDIO_HEADERS = -I"portaudio/include/"

CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(PORTAUDIO_HEADERS)

OBJS = org_jitsi_impl_neomedia_portaudio_Pa.c WMME_DSound.c

LIBS = -Lportaudio/lib/.libs -lportaudio -lpthread

libjnportaudio.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnportaudio.so $(LIBS)

install32: libjnportaudio.so
cp libjnportaudio.so "../../../lib/native/linux-x86/libjnportaudio.so"
cp libjnportaudio.so "../../../../jitsi-videobridge/lib/native/linux/libjnportaudio.so"

install64: libjnportaudio.so
cp libjnportaudio.so "../../../lib/native/linux-x86-64/libjnportaudio.so"
cp libjnportaudio.so "../../../../jitsi-videobridge/lib/native/linux-64/libjnportaudio.so"

installppc64: libjnportaudio.so
cp libjnportaudio.so "../../../lib/native/linux-ppc64le/libjnportaudio.so"
cp libjnportaudio.so "../../../../jitsi-videobridge/lib/native/linux-ppc64le/libjnportaudio.so"

clean:
rm -f *.so
45 changes: 45 additions & 0 deletions src/native/screencapture/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright @ 2015 Atlassian Pty Ltd
# Copyright @ 2021 Raptor Engineering, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

CC=gcc

JNI_HEADERS = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
SCREENCAPTURE_HEADERS = -I"/usr/include"

CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(SCREENCAPTURE_HEADERS)

OBJS = org_jitsi_impl_neomedia_imgstreaming_ScreenCapture.c

LIBS = -lpthread

libjnscreencapture.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnscreencapture.so $(LIBS)

install32: libjnscreencapture.so
cp libjnscreencapture.so "../../../lib/native/linux-x86/libjnscreencapture.so"
cp libjnscreencapture.so "../../../../jitsi-videobridge/lib/native/linux/libjnscreencapture.so"

install64: libjnscreencapture.so
cp libjnscreencapture.so "../../../lib/native/linux-x86-64/libjnscreencapture.so"
cp libjnscreencapture.so "../../../../jitsi-videobridge/lib/native/linux-64/libjnscreencapture.so"

installppc64: libjnscreencapture.so
cp libjnscreencapture.so "../../../lib/native/linux-ppc64le/libjnscreencapture.so"
cp libjnscreencapture.so "../../../../jitsi-videobridge/lib/native/linux-ppc64le/libjnscreencapture.so"

clean:
rm -f *.so
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ static int x11_grab_screen(jbyte* data, unsigned int displayIndex, int x, int y,
size_t off = 0;
int i = 0;
int j = 0;
size_t size = 0;
uint32_t test = 1;
int little_endian = *((uint8_t*)&test);
char buf[16];
Expand Down Expand Up @@ -442,8 +441,6 @@ static int x11_grab_screen(jbyte* data, unsigned int displayIndex, int x, int y,
return -1;
}

size = w * h;

/* test is XServer support SHM */
shm_support = XShmQueryExtension(display);

Expand Down
7 changes: 6 additions & 1 deletion src/native/sctp/makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
# Copyright @ 2015 Atlassian Pty Ltd
# Copyright @ 2021 Raptor Engineering, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -24,7 +25,7 @@ CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(SCTP_HEADERS) -DSCTP_DEBUG=1 -D

OBJS = org_jitsi_sctp4j_Sctp.c

LIBS = -L"usrsctp/.libs" -lusrsctp -lpthread
LIBS = -L"usrsctp/usrsctplib/.libs" -lusrsctp -lpthread

libjnsctp.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnsctp.so $(LIBS)
Expand All @@ -37,5 +38,9 @@ install64: libjnsctp.so
cp libjnsctp.so "../../../lib/native/linux-x86-64/libjnsctp.so"
cp libjnsctp.so "../../../../jitsi-videobridge/lib/native/linux-64/libjnsctp.so"

installppc64: libjnsctp.so
cp libjnsctp.so "../../../lib/native/linux-ppc64le/libjnsctp.so"
cp libjnsctp.so "../../../../jitsi-videobridge/lib/native/linux-ppc64le/libjnsctp.so"

clean:
rm -f *.so
45 changes: 45 additions & 0 deletions src/native/speex/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#
# Copyright @ 2015 Atlassian Pty Ltd
# Copyright @ 2021 Raptor Engineering, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

CC=gcc

JNI_HEADERS = -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
SPEEX_HEADERS = -I"/usr/include"

CFLAGS = -Wall -Werror -std=c99 $(JNI_HEADERS) $(SPEEX_HEADERS)

OBJS = org_jitsi_impl_neomedia_codec_audio_speex_Speex.c

LIBS = -lspeex -lpthread

libjnspeex.so: clean
$(CC) $(CFLAGS) -fPIC -shared $(OBJS) -o libjnspeex.so $(LIBS)

install32: libjnspeex.so
cp libjnspeex.so "../../../lib/native/linux-x86/libjnspeex.so"
cp libjnspeex.so "../../../../jitsi-videobridge/lib/native/linux/libjnspeex.so"

install64: libjnspeex.so
cp libjnspeex.so "../../../lib/native/linux-x86-64/libjnspeex.so"
cp libjnspeex.so "../../../../jitsi-videobridge/lib/native/linux-64/libjnspeex.so"

installppc64: libjnspeex.so
cp libjnspeex.so "../../../lib/native/linux-ppc64le/libjnspeex.so"
cp libjnspeex.so "../../../../jitsi-videobridge/lib/native/linux-ppc64le/libjnspeex.so"

clean:
rm -f *.so