[sip-comm-dev] Video capture problems


#1

The SC on my system has problems with video capture, see blow.
The preview screen is always black.

When switching the window, thus stopping video capture, I got
the following messages. In addition the X Window server did
not respond anymore and I have to kill and restart it.

Any ideas?

Regards,
Werner

Log messages:

19:12:10.683 FEIN: fmj.connect() civil: connect
19:12:10.687 FEIN: fmj.connect() Opening /dev/video0
19:12:10.719 FEIN: fmj.connect() civil: connect
19:12:10.903 FEIN: fmj.start() civil: start
19:12:10.982 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: Not a JPG file ?
: 0
com.lti.civil.CaptureException: Not a JPG file ?
: 0
        at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
        at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)
19:12:11.008 FEIN: fmj.stop() civil: stop
19:12:11.119 FEIN: fmj.stop() civil: stop
19:12:11.120 FEIN: fmj.start() civil: start
19:12:25.321 FEIN: fmj.stop() civil: stop
19:12:25.326 FEIN: fmj.stop() civil: stop
19:12:25.328 FEIN: fmj.stop() civil: stop
19:12:25.331 FEIN: fmj.disconnect() civil: disconnect
19:12:25.334 FEIN: fmj.stop() civil: stop
V4L2CaptureStream::dispose()
V4L2CaptureStream::dispose: waiting for thread to stop

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi,

It maybe your camera is not supported, but it must not lock the X.
Can you show us the output of the following command :

$ v4l-info

on my ubuntu its in the v4l-conf package.

Thanks
damencho

···

On Wed, Apr 21, 2010 at 9:21 PM, Werner Dittmann <Werner.Dittmann@t-online.de> wrote:

The SC on my system has problems with video capture, see blow.
The preview screen is always black.

When switching the window, thus stopping video capture, I got
the following messages. In addition the X Window server did
not respond anymore and I have to kill and restart it.

Any ideas?

Regards,
Werner

Log messages:

19:12:10.683 FEIN: fmj.connect() civil: connect
19:12:10.687 FEIN: fmj.connect() Opening /dev/video0
19:12:10.719 FEIN: fmj.connect() civil: connect
19:12:10.903 FEIN: fmj.start() civil: start
19:12:10.982 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: Not a JPG file ?
: 0
com.lti.civil.CaptureException: Not a JPG file ?
: 0
at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)
19:12:11.008 FEIN: fmj.stop() civil: stop
19:12:11.119 FEIN: fmj.stop() civil: stop
19:12:11.120 FEIN: fmj.start() civil: start
19:12:25.321 FEIN: fmj.stop() civil: stop
19:12:25.326 FEIN: fmj.stop() civil: stop
19:12:25.328 FEIN: fmj.stop() civil: stop
19:12:25.331 FEIN: fmj.disconnect() civil: disconnect
19:12:25.334 FEIN: fmj.stop() civil: stop
V4L2CaptureStream::dispose()
V4L2CaptureStream::dispose: waiting for thread to stop

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Hi Damian,

the camera works with luvcview and IIRC some time ago (some month?)
I had a preview picture in the media setup. Also other programs
are able to handle the cam (gstreamer for example)

Regards,
Werner

However, here is the of v4l-info:

### v4l2 device info [/dev/video0] ###
general info
    VIDIOC_QUERYCAP
        driver : "uvcvideo"
        card : "Philips SPC 1030NC Webcam"
        bus_info : "usb-0000:00:12.2-3.1"
        version : 0.1.0
        capabilities : 0x4000001 [VIDEO_CAPTURE,STREAMING]

standards

inputs
    VIDIOC_ENUMINPUT(0)
        index : 0
        name : "Camera 1"
        type : CAMERA
        audioset : 0
        tuner : 0
        std : 0x0 []
        status : 0x0 []

video capture
    VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
        index : 0
        type : VIDEO_CAPTURE
        flags : 0
        description : "YUV 4:2:2 (YUYV)"
        pixelformat : 0x56595559 [YUYV]
    VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)
        index : 1
        type : VIDEO_CAPTURE
        flags : 1
        description : "MJPEG"
        pixelformat : 0x47504a4d [MJPG]
    VIDIOC_G_FMT(VIDEO_CAPTURE)
        type : VIDEO_CAPTURE
        fmt.pix.width : 640
        fmt.pix.height : 480
        fmt.pix.pixelformat : 0x56595559 [YUYV]
        fmt.pix.field : NONE
        fmt.pix.bytesperline : 1280
        fmt.pix.sizeimage : 2773824786
        fmt.pix.colorspace : unknown
        fmt.pix.priv : 0

controls
    VIDIOC_QUERYCTRL(BASE+0)
        id : 9963776
        type : INTEGER
        name : "Brightness"
        minimum : -64
        maximum : 64
        step : 1
        default_value : 0
        flags : 0
    VIDIOC_QUERYCTRL(BASE+1)
        id : 9963777
        type : INTEGER
        name : "Contrast"
        minimum : 0
        maximum : 64
        step : 1
        default_value : 32
        flags : 0
    VIDIOC_QUERYCTRL(BASE+2)
        id : 9963778
        type : INTEGER
        name : "Saturation"
        minimum : 0
        maximum : 128
        step : 1
        default_value : 64
        flags : 0
    VIDIOC_QUERYCTRL(BASE+3)
        id : 9963779
        type : INTEGER
        name : "Hue"
        minimum : -40
        maximum : 40
        step : 1
        default_value : 0
        flags : 0

### video4linux device info [/dev/video0] ###
general info
    VIDIOCGCAP
        name : "Philips SPC 1030NC Webcam"
        type : 0x1 [CAPTURE]
        channels : 1
        audios : 0
        maxwidth : 1280
        maxheight : 1024
        minwidth : 48
        minheight : 32

channels
    VIDIOCGCHAN(0)
        channel : 0
        name : "Camera 1"
        tuners : 0
        flags : 0x0 []
        type : CAMERA
        norm : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
ioctl VIDIOCGAUDIO: Invalid argument

picture
    VIDIOCGPICT
        brightness : 32768
        hue : 32768
        colour : 32768
        contrast : 32768
        whiteness : 4287
        depth : 16
        palette : YUYV

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
    VIDIOCGWIN
        x : 0
        y : 0
        width : 640
        height : 480
        chromakey : 0
        flags : 0

···

Am 22.04.2010 08:26, schrieb Damian Minkov:

Hi,

It maybe your camera is not supported, but it must not lock the X.
Can you show us the output of the following command :

$ v4l-info

on my ubuntu its in the v4l-conf package.

Thanks
damencho

On Wed, Apr 21, 2010 at 9:21 PM, Werner Dittmann > <Werner.Dittmann@t-online.de> wrote:

The SC on my system has problems with video capture, see blow.
The preview screen is always black.

When switching the window, thus stopping video capture, I got
the following messages. In addition the X Window server did
not respond anymore and I have to kill and restart it.

Any ideas?

Regards,
Werner

Log messages:

19:12:10.683 FEIN: fmj.connect() civil: connect
19:12:10.687 FEIN: fmj.connect() Opening /dev/video0
19:12:10.719 FEIN: fmj.connect() civil: connect
19:12:10.903 FEIN: fmj.start() civil: start
19:12:10.982 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: Not a JPG file ?
: 0
com.lti.civil.CaptureException: Not a JPG file ?
: 0
       at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
       at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)
19:12:11.008 FEIN: fmj.stop() civil: stop
19:12:11.119 FEIN: fmj.stop() civil: stop
19:12:11.120 FEIN: fmj.start() civil: start
19:12:25.321 FEIN: fmj.stop() civil: stop
19:12:25.326 FEIN: fmj.stop() civil: stop
19:12:25.328 FEIN: fmj.stop() civil: stop
19:12:25.331 FEIN: fmj.disconnect() civil: disconnect
19:12:25.334 FEIN: fmj.stop() civil: stop
V4L2CaptureStream::dispose()
V4L2CaptureStream::dispose: waiting for thread to stop

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Hi,

I was asking that cause lti-civil doesn't have support for all cams.
Apparently yours is supported as you have preview in the Media Options
(YUV 4:2:2, 0x56595559). The strange thing is that your camera seems
to be with source format V4L2_PIX_FMT_YUV420 but at one point it
changes to V4L2_PIX_FMT_JPEG, and parsing of data fails. From there
comes the log "Not a JPG file". But this is normal exception thrown
from jni to java and unfortunately I can't see anything suspicious
there that can block your X.

damencho

···

On Thu, Apr 22, 2010 at 9:44 PM, Werner Dittmann <Werner.Dittmann@t-online.de> wrote:

Hi Damian,

the camera works with luvcview and IIRC some time ago (some month?)
I had a preview picture in the media setup. Also other programs
are able to handle the cam (gstreamer for example)

Regards,
Werner

However, here is the of v4l-info:

### v4l2 device info [/dev/video0] ###
general info
VIDIOC_QUERYCAP
driver : "uvcvideo"
card : "Philips SPC 1030NC Webcam"
bus_info : "usb-0000:00:12.2-3.1"
version : 0.1.0
capabilities : 0x4000001 [VIDEO_CAPTURE,STREAMING]

standards

inputs
VIDIOC_ENUMINPUT(0)
index : 0
name : "Camera 1"
type : CAMERA
audioset : 0
tuner : 0
std : 0x0 []
status : 0x0 []

video capture
VIDIOC_ENUM_FMT(0,VIDEO_CAPTURE)
index : 0
type : VIDEO_CAPTURE
flags : 0
description : "YUV 4:2:2 (YUYV)"
pixelformat : 0x56595559 [YUYV]
VIDIOC_ENUM_FMT(1,VIDEO_CAPTURE)
index : 1
type : VIDEO_CAPTURE
flags : 1
description : "MJPEG"
pixelformat : 0x47504a4d [MJPG]
VIDIOC_G_FMT(VIDEO_CAPTURE)
type : VIDEO_CAPTURE
fmt.pix.width : 640
fmt.pix.height : 480
fmt.pix.pixelformat : 0x56595559 [YUYV]
fmt.pix.field : NONE
fmt.pix.bytesperline : 1280
fmt.pix.sizeimage : 2773824786
fmt.pix.colorspace : unknown
fmt.pix.priv : 0

controls
VIDIOC_QUERYCTRL(BASE+0)
id : 9963776
type : INTEGER
name : "Brightness"
minimum : -64
maximum : 64
step : 1
default_value : 0
flags : 0
VIDIOC_QUERYCTRL(BASE+1)
id : 9963777
type : INTEGER
name : "Contrast"
minimum : 0
maximum : 64
step : 1
default_value : 32
flags : 0
VIDIOC_QUERYCTRL(BASE+2)
id : 9963778
type : INTEGER
name : "Saturation"
minimum : 0
maximum : 128
step : 1
default_value : 64
flags : 0
VIDIOC_QUERYCTRL(BASE+3)
id : 9963779
type : INTEGER
name : "Hue"
minimum : -40
maximum : 40
step : 1
default_value : 0
flags : 0

### video4linux device info [/dev/video0] ###
general info
VIDIOCGCAP
name : "Philips SPC 1030NC Webcam"
type : 0x1 [CAPTURE]
channels : 1
audios : 0
maxwidth : 1280
maxheight : 1024
minwidth : 48
minheight : 32

channels
VIDIOCGCHAN(0)
channel : 0
name : "Camera 1"
tuners : 0
flags : 0x0 []
type : CAMERA
norm : 0

tuner
ioctl VIDIOCGTUNER: Invalid argument

audio
ioctl VIDIOCGAUDIO: Invalid argument

picture
VIDIOCGPICT
brightness : 32768
hue : 32768
colour : 32768
contrast : 32768
whiteness : 4287
depth : 16
palette : YUYV

buffer
ioctl VIDIOCGFBUF: Invalid argument

window
VIDIOCGWIN
x : 0
y : 0
width : 640
height : 480
chromakey : 0
flags : 0

Am 22.04.2010 08:26, schrieb Damian Minkov:

Hi,

It maybe your camera is not supported, but it must not lock the X.
Can you show us the output of the following command :

$ v4l-info

on my ubuntu its in the v4l-conf package.

Thanks
damencho

On Wed, Apr 21, 2010 at 9:21 PM, Werner Dittmann >> <Werner.Dittmann@t-online.de> wrote:

The SC on my system has problems with video capture, see blow.
The preview screen is always black.

When switching the window, thus stopping video capture, I got
the following messages. In addition the X Window server did
not respond anymore and I have to kill and restart it.

Any ideas?

Regards,
Werner

Log messages:

19:12:10.683 FEIN: fmj.connect() civil: connect
19:12:10.687 FEIN: fmj.connect() Opening /dev/video0
19:12:10.719 FEIN: fmj.connect() civil: connect
19:12:10.903 FEIN: fmj.start() civil: start
19:12:10.982 SCHWERWIEGEND: lti-civil.run() com.lti.civil.CaptureException: Not a JPG file ?
: 0
com.lti.civil.CaptureException: Not a JPG file ?
: 0
at com.lti.civil.impl.jni.NativeCaptureStream.threadMain(Native Method)
at com.lti.civil.impl.jni.NativeCaptureStream$NativeCaptureStreamThread.run(NativeCaptureStream.java:94)
19:12:11.008 FEIN: fmj.stop() civil: stop
19:12:11.119 FEIN: fmj.stop() civil: stop
19:12:11.120 FEIN: fmj.start() civil: start
19:12:25.321 FEIN: fmj.stop() civil: stop
19:12:25.326 FEIN: fmj.stop() civil: stop
19:12:25.328 FEIN: fmj.stop() civil: stop
19:12:25.331 FEIN: fmj.disconnect() civil: disconnect
19:12:25.334 FEIN: fmj.stop() civil: stop
V4L2CaptureStream::dispose()
V4L2CaptureStream::dispose: waiting for thread to stop

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hi Damian,

actually I don't see any video in the media options panel :slight_smile: .

Can you provide some links/info wher to find lti-civil and the
native sources and other stuf that are involed in this case? Then
I can rebuild the whole stuff and try to dig into this problem a
bit more.

At least I can reproduce it and try to figure out what happens.

Regards,
Werner

···

Am 23.04.2010 07:44, schrieb Damian Minkov:

Hi,

I was asking that cause lti-civil doesn't have support for all cams.
Apparently yours is supported as you have preview in the Media Options
(YUV 4:2:2, 0x56595559). The strange thing is that your camera seems
to be with source format V4L2_PIX_FMT_YUV420 but at one point it
changes to V4L2_PIX_FMT_JPEG, and parsing of data fails. From there
comes the log "Not a JPG file". But this is normal exception thrown
from jni to java and unfortunately I can't see anything suspicious
there that can block your X.

damencho

On Thu, Apr 22, 2010 at 9:44 PM, Werner Dittmann > <Werner.Dittmann@t-online.de> wrote:

Hi Damian,

the camera works with luvcview and IIRC some time ago (some month?)
I had a preview picture in the media setup. Also other programs
are able to handle the cam (gstreamer for example)

<SNIP --- SNAP>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#6

Hi,

we use latest cvs source from lti-civil, you can find it at :
http://lti-civil.org/download.php
And some patches about formats:
http://sourceforge.net/mailarchive/forum.php?thread_name=49A68696.9030009%40damencho.com&forum_name=fmj-devel

If you have any problems with it ask :slight_smile: cause the patch is not really a patch.

Cheers
damencho

···

On Fri, Apr 23, 2010 at 5:02 PM, Werner Dittmann <Werner.Dittmann@t-online.de> wrote:

Hi Damian,

actually I don't see any video in the media options panel :slight_smile: .

Can you provide some links/info wher to find lti-civil and the
native sources and other stuf that are involed in this case? Then
I can rebuild the whole stuff and try to dig into this problem a
bit more.

At least I can reproduce it and try to figure out what happens.

Regards,
Werner

Am 23.04.2010 07:44, schrieb Damian Minkov:

Hi,

I was asking that cause lti-civil doesn't have support for all cams.
Apparently yours is supported as you have preview in the Media Options
(YUV 4:2:2, 0x56595559). The strange thing is that your camera seems
to be with source format V4L2_PIX_FMT_YUV420 but at one point it
changes to V4L2_PIX_FMT_JPEG, and parsing of data fails. From there
comes the log "Not a JPG file". But this is normal exception thrown
from jni to java and unfortunately I can't see anything suspicious
there that can block your X.

damencho

On Thu, Apr 22, 2010 at 9:44 PM, Werner Dittmann >> <Werner.Dittmann@t-online.de> wrote:

Hi Damian,

the camera works with luvcview and IIRC some time ago (some month?)
I had a preview picture in the media setup. Also other programs
are able to handle the cam (gstreamer for example)

<SNIP --- SNAP>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#7

Hi Damian,

thanks for the links. I was able to track down the problem for V4L2.

Looking at the new code (in the "not patches" part :slight_smile: ) I swa that you
converted to lti-civil code to support multi-threading, mainly in the
source "V4L2CaptureStream.cpp".

Multi-threading caused problems with one function in "v4l2capture.c": getFrameBuffer(...).
Inside this functions is a static field and the address of that field
is stored and returned. Because it is a static field this causes problems
in real multi-threaded environments (I was even able to produce a kernel oops
because some mapped addresses were overwritten :slight_smile: ). It seems that
lti-civil was not designed with multi-threading in mind.

After modifying the code because one commented line gave a a hint there to
use memcpy, just a few bytes actually and modifying the data structure it
now works like charm. Inside SC I don't get any exception regarding JPEG etc.
See console output below, I did some switch on / switch off of the video
device.

I try to prepare a small patch for you (its just a few lines to fix).
We somehow need to monitor the bug fixes because somehow the lti project is not
very active at the moment, isn't it?

Regards,
Werner

Console output when showing the media options window:

     [java] 16:49:35.588 FEIN: fmj.addCaptureDevices() CaptureDevicePlugger: Added civil:/dev/video0
     [java] 16:49:54.579 FEIN: fmj.connect() civil: connect
     [java] 16:49:54.583 FEIN: fmj.connect() Opening /dev/video0
     [java] 16:49:54.603 FEIN: fmj.connect() civil: connect
     [java] 16:49:54.694 FEIN: fmj.start() civil: start
     [java] 16:49:54.698 FEIN: fmj.stop() civil: stop
     [java] opened v4l2 device
     [java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
     [java] discover_inputs()
     [java] Found sources: 1
     [java] 0 - Camera 1 (2)
     [java] V4L2CaptureStream::dispose()
     [java] opened v4l2 device
     [java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
     [java] discover_inputs()
     [java] Found sources: 1
     [java] 0 - Camera 1 (2)
     [java] opened v4l2 device
     [java] Found Philips SPC 1030NC Webcam card with uvcvideo v4l2 driver
     [java] discover_inputs()
     [java] Found sources: 1
     [java] 0 - Camera 1 (2)
     [java] Assigning buffers
     [java] assignMBufs()
     [java] Adding buffers to dirver Queue
     [java] Turning streaming on
     [java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
     [java] Capturing started
     [java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
     [java] BasicTrackControl:prefetchTrack():96 2 bm = com.sun.media.BasicFilterModule@256e9494
     [java] BasicTrackControl:prefetchTrack():96 2 bm = com.sun.media.BasicRendererModule@7edc93be
     [java] BasicRendererModule.doPrefetch:155 Render : true
     [java] BasicRenderModule.doPrefetch:159 Render : com.sun.media.renderer.video.AWTRenderer@34287ca7
     [java] 16:49:54.803 FEIN: fmj.stop() civil: stop
     [java] 16:49:54.804 FEIN: fmj.start() civil: start
     [java] 16:50:11.044 FEIN: fmj.stop() civil: stop
     [java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopping...
     [java] Java_com_lti_civil_impl_jni_NativeCaptureStream_stop, stopped.
     [java] 16:50:11.048 FEIN: fmj.stop() civil: stop
     [java] 16:50:11.051 FEIN: fmj.stop() civil: stop
     [java] 16:50:11.052 FEIN: fmj.disconnect() civil: disconnect
     [java] 16:50:11.054 FEIN: fmj.stop() civil: stop
     [java] V4L2CaptureStream::dispose()
     [java] V4L2CaptureStream::dispose: waiting for thread to stop
     [java] stopping capturing
     [java] stopping streaminfg
     [java] Releasing buffers
     [java] capture stopped

···

Am 23.04.2010 19:09, schrieb Damian Minkov:

Hi,

we use latest cvs source from lti-civil, you can find it at :
http://lti-civil.org/download.php
And some patches about formats:
http://sourceforge.net/mailarchive/forum.php?thread_name=49A68696.9030009%40damencho.com&forum_name=fmj-devel

If you have any problems with it ask :slight_smile: cause the patch is not really a patch.

Cheers
damencho

On Fri, Apr 23, 2010 at 5:02 PM, Werner Dittmann > <Werner.Dittmann@t-online.de> wrote:

Hi Damian,

actually I don't see any video in the media options panel :slight_smile: .

Can you provide some links/info wher to find lti-civil and the
native sources and other stuf that are involed in this case? Then
I can rebuild the whole stuff and try to dig into this problem a
bit more.

At least I can reproduce it and try to figure out what happens.

Regards,
Werner

Am 23.04.2010 07:44, schrieb Damian Minkov:

Hi,

I was asking that cause lti-civil doesn't have support for all cams.
Apparently yours is supported as you have preview in the Media Options
(YUV 4:2:2, 0x56595559). The strange thing is that your camera seems
to be with source format V4L2_PIX_FMT_YUV420 but at one point it
changes to V4L2_PIX_FMT_JPEG, and parsing of data fails. From there
comes the log "Not a JPG file". But this is normal exception thrown
from jni to java and unfortunately I can't see anything suspicious
there that can block your X.

damencho

On Thu, Apr 22, 2010 at 9:44 PM, Werner Dittmann >>> <Werner.Dittmann@t-online.de> wrote:

Hi Damian,

the camera works with luvcview and IIRC some time ago (some month?)
I had a preview picture in the media setup. Also other programs
are able to handle the cam (gstreamer for example)

<SNIP --- SNAP>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#8

Hi Damian,

do you know who is responsible for lti-civil and the patches?

To do my first tests to locate the problem (see below) I just added
the file that are contained in the ZIP file. After some tweaking
of build.xml and removing dependcies of QuickTime for Java I was
able to build and fix the problem.

Working a bit further I applied the windows patch (7000 threads problem)
to the source. Now I cant even compile the native sources anymore
because this patch introduces are HARDCODED dependency on Windows in the
common source tree. Thus it is not possible to compile the common source
for AMD with "ant compile-so-amd64" on a Linux system.

Are there plans to resolve this issue? IMHO the build process of lti-civil
is, well, sub-optimal to state it politely. Are there plans to enhance this
situation? Otherwise: how can we use this software and keep it up-to-date?

Regards,
Werner

···

Am 24.04.2010 17:11, schrieb Werner Dittmann:

Hi Damian,

thanks for the links. I was able to track down the problem for V4L2.

Looking at the new code (in the "not patches" part :slight_smile: ) I swa that you
converted to lti-civil code to support multi-threading, mainly in the
source "V4L2CaptureStream.cpp".

Multi-threading caused problems with one function in "v4l2capture.c": getFrameBuffer(...).
Inside this functions is a static field and the address of that field
is stored and returned. Because it is a static field this causes problems
in real multi-threaded environments (I was even able to produce a kernel oops
because some mapped addresses were overwritten :slight_smile: ). It seems that
lti-civil was not designed with multi-threading in mind.

After modifying the code because one commented line gave a a hint there to
use memcpy, just a few bytes actually and modifying the data structure it
now works like charm. Inside SC I don't get any exception regarding JPEG etc.
See console output below, I did some switch on / switch off of the video
device.

I try to prepare a small patch for you (its just a few lines to fix).
We somehow need to monitor the bug fixes because somehow the lti project is not
very active at the moment, isn't it?

Regards,
Werner

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#9

Hi Werner,

do you know who is responsible for lti-civil and the patches?

Both Damian and I have write access to the lti-civil CVS repository.

Working a bit further I applied the windows patch (7000 threads problem)
to the source. Now I cant even compile the native sources anymore
because this patch introduces are HARDCODED dependency on Windows in the
common source tree. Thus it is not possible to compile the common source
for AMD with "ant compile-so-amd64" on a Linux system.

I'm in the process of backpedaling on the Windows patch and providing
a simpler solution which will hopefully not be Windows specific. Due
to higher priorities and the lack of easy access to Windows on my side
though this will likely be taken care of with a slow pace.

Are there plans to resolve this issue? IMHO the build process of lti-civil
is, well, sub-optimal to state it politely. Are there plans to enhance this
situation? Otherwise: how can we use this software and keep it up-to-date?

I'm currently working on integrating our patches into the lti-civil
CVS repository.

Best regards,
Lubo

···

On Sun, Apr 25, 2010 at 11:07 AM, Werner Dittmann <Werner.Dittmann@t-online.de> wrote:

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#10

Hi Lubo,

thanks for the info. Seems that access to Windows development
is a common problem :slight_smile: .

Hi Werner,

do you know who is responsible for lti-civil and the patches?

Both Damian and I have write access to the lti-civil CVS repository.

Ok. Attached a tar file that contains the two files that I modified to
fix the problem described in my previous mails. These two files go
into "native/src/camerav4l2/camerav4l2" directory. Just a few modified
lines in both files.

I'm currently working on integrating our patches into the lti-civil
CVS repository.

That's great

Best regards,
Werner

v4l2capture.tar.gz (7.62 KB)

···

Am 25.04.2010 10:19, schrieb Lubomir Marinov:

On Sun, Apr 25, 2010 at 11:07 AM, Werner Dittmann > <Werner.Dittmann@t-online.de> wrote:

Best regards,
Lubo

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net