[jitsi-dev] Current implementation of Desktop Sharing

Hi All,

I am trying to understand the way you have implemented the current Screen
Sharing. As I figured out it is developed Operating System specifically.

I found the following files regarding this task:

1*)
net_java_sip_communicator_impl_neomedia_imgstreaming_NativeScreenCapture.c*file
,a header file (located in
*src/native/screencapture)*

2) An ant *build.xml* file(located in *src/native*) which has a target(
*screencapture*) to compile the above .c file.

As I understood this target can build the above .c file specifically to the
OS as a shared library. As an example for my machine which is running
Ubuntu 13.04 64bit, it generates "libjnscreencapture.so" in
*lib/native/linux-64* location.

I have two problems regarding this.

*1)* *How is this library loaded in the Jitsi java source? * I tried using
linux find command to search through all files in search of files which
contain the string "libjnscreencapture" but I didn't get any result.

*2) I tried to build the existing
net_java_sip_communicator_impl_neomedia_imgstreaming_NativeScreenCapture.c
using "ant screencapture". *I have installed the library libx11-dev. It
gives the "Build Successful" message and creates the above
"libjnscreencapture.so" file. Then I completely build the source and run
Jitsi and checked the functionality by taking a Screen Sharing call to
another client. But unfortunately it doesn't work.* I am using the exact .c
file without any modification that is in git repo[1]*. I have already
enabled (Info) logging in Jitsi and Surprisingly I could not find any
Warning or Severe kind of messages in the console regarding this. So can
you suggest me some other way to find out what is going on?

FYI: I enabled ant logging using <record> in the "screencapture" target and
it gave the following result.

       [cc] Starting dependency analysis for 1 files.
       [cc] Parsing
../screencapture/net_java_sip_communicator_impl_neomedia_imgstreaming_NativeScreenCapture.c
       [cc] Parsing
../screencapture/net_java_sip_communicator_impl_neomedia_imgstreaming_NativeScreenCapture.h
       [cc] 1 files are up to date.
       [cc] 0 files to be recompiled from dependency analysis.
       [cc] 0 total files to be compiled.
       [cc] Starting link
       [cc] gcc -m64 -shared -o libjnscreencapture.so
../../../src/native/native_obj/net_java_sip_communicator_impl_neomedia_imgstreaming_NativeScreenCapture.o
-lX11

.......

Any help is highly appreciated.

[1] https://github.com/jitsi/jitsi/tree/master/src/native/screencapture

Thank you.

Regards,
Malintha Amarasinghe.

Hello,

Hi All,

I am trying to understand the way you have implemented the current
Screen Sharing. As I figured out it is developed Operating System
specifically.

I found the following files regarding this task:

1/)
net_java_sip_communicator_impl_neomedia_imgstreaming_NativeScreenCapture.c/
file ,a header file (located in /src/native/screencapture)/

2) An ant /build.xml/ file(located in /src/native/) which has a
target(/screencapture/) to compile the above .c file.

As far as I see, this code is not used anymore. It has been moved to
libjitsi (libjitsi/src/native/screencapture).

To the developers: does anyone see a reason to not remove it from Jitsi?

As I understood this target can build the above .c file specifically to
the OS as a shared library. As an example for my machine which is
running Ubuntu 13.04 64bit, it generates "libjnscreencapture.so" in
/lib/native/linux-64/ location.

I have two problems regarding this.

*1)* *How is this library loaded in the Jitsi java source? * I tried
using linux find command to search through all files in search of files
which contain the string "libjnscreencapture" but I didn't get any result.

The "lib" prefix is not used when loading a library, try searching for
just "jnscreencapture".

*2) I tried to build the existing
/net_java_sip_communicator_impl_neomedia_imgstreaming_NativeScreenCapture.c
/using "ant screencapture". *I have installed the library libx11-dev. It
gives the "Build Successful" message and creates the above
"libjnscreencapture.so" file. Then I completely build the source and run
Jitsi and checked the functionality by taking a Screen Sharing call to
another client. But unfortunately it doesn't work.*I am using the exact
.c file without any modification that is in git repo[1]*.

The version from the jitsi sources won't work (package names have
changed), the with the one in libjitsi.

Regards,
Boris

···

On 10/03/14 12:21, Malintha Amarasinghe wrote: