[jitsi-dev] [libjitsi~svn:9752] BufferedImage of visual component - Mac webcam support


#1

Hi all,

since the revision 9752 I have two major problem with libjitsi.
In our app, I need to take sometimes screenshots of the video component. This worked perfectly until revision 9752 came out.
final BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
synchronized (contentPane.getTreeLock()) {
    Graphics2D g2d = image.createGraphics();
    g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
    if (aaHintValue != null)
        g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, aaHintValue);
        contentPane.paint(g2d);
    }
    // paint screenshot to a new panel
    pnlScreenshot = new JPanel() {
        public void paintComponent(Graphics g) {
            g.drawImage(image, 0, 0, this);
        }
    };
    pnlScreenshot.setSize(contentPane.getSize());
}

Now after the update the visual component is painted correctly but doesn't appear in the buffered image anymore.

The second problem is that this code doesn't return the built in webcam on an iMac anymore which was the case before:

DeviceConfiguration conf = ((MediaServiceImpl) LibJitsi.getMediaService()).getDeviceConfiguration();
return conf.getAvailableVideoCaptureDevices(MediaUseCase.CALL);

It would be great if someone could have a look into this.
Cheers René.


#2

since the revision 9752 I have two major problem with libjitsi.
In our app, I need to take sometimes screenshots of the video component. This worked perfectly until revision 9752 came out.

We've fixed a failure which could cause our optimised and accelerated video renderer to be replaced by another video renderer not optimised for our use cases and not supporting all features that we depend on. Our video renderer is not designed and implemented to support the described screenshot taking.

Could you please report the operating system on which you're experiencing the problem?

A possible workaround could be to delete the *jnawtrenderer.* files from the libjitsi/lib/native hierarchy.

The second problem is that this code doesn't return the built in webcam on an iMac anymore which was the case before:

DeviceConfiguration conf = ((MediaServiceImpl) LibJitsi.getMediaService()).getDeviceConfiguration();
return conf.getAvailableVideoCaptureDevices(MediaUseCase.CALL);

Could we ask you to please report the architecture and the version of the operating system?

···

On Jul 25, 2012, at 7:02 PM, Rene Lamotte <chummer25@gmx.net> wrote:


#3

since the revision 9752 I have two major problem with libjitsi.
In our app, I need to take sometimes screenshots of the video component. This worked perfectly until revision 9752 came out.

We've fixed a failure which could cause our optimised and accelerated video renderer to be replaced by another video renderer not optimised for our use cases and not supporting all features that we depend on. Our video renderer is not designed and implemented to support the described screenshot taking.

Could you please report the operating system on which you're experiencing the problem?

This happens as well on windows 7, windows XP and OSX 10.7.4.
When rolling back to the "old" libjitsi before 9752 all problems disappear.
Some further info:
When refreshing a jcomponent holding a visual component showing video (doing validate for example), the visual component turns white while laying out the jcomponent. After repainting, the video is shown again. This happens on all os'es written above.

A possible workaround could be to delete the *jnawtrenderer.* files from the libjitsi/lib/native hierarchy.

Will give that a try tomorrow.

The second problem is that this code doesn't return the built in webcam on an iMac anymore which was the case before:

DeviceConfiguration conf = ((MediaServiceImpl) LibJitsi.getMediaService()).getDeviceConfiguration();
return conf.getAvailableVideoCaptureDevices(MediaUseCase.CALL);

Could we ask you to please report the architecture and the version of the operating system?

iMac with OSX 10.7.4 and a built in face time cam. As above, with libjitsi before 9752 cam is detected and working fine.


#4

Hey Rene,

···

On Thu, Jul 26, 2012 at 2:13 AM, Rene Lamotte <chummer25@gmx.net> wrote:

A possible workaround could be to delete the *jnawtrenderer.* files from
the libjitsi/lib/native hierarchy.

Will give that a try tomorrow.

Note that this would mean you'll be getting a significantly poorer
quality during video rendering. The best thing would be to add
screenshort support to the native renderer..

Cheers,
Emil


#5

Would about validate() issue of the parent container? Is this the same issue? I think so.
When validating a container containing a visual component showing video, the visual component turns white until validate() has terminated.

···

--------------------------------------------------

From: "Emil Ivov" <emcho@jitsi.org>

Sent: Thursday, July 26, 2012 9:40 AM
To: <dev@jitsi.java.net>
Subject: [jitsi-dev] Re: [libjitsi~svn:9752] BufferedImage of visual component - Mac webcam support

Hey Rene,

On Thu, Jul 26, 2012 at 2:13 AM, Rene Lamotte <chummer25@gmx.net> wrote:

A possible workaround could be to delete the *jnawtrenderer.* files from
the libjitsi/lib/native hierarchy.

Will give that a try tomorrow.

Note that this would mean you'll be getting a significantly poorer
quality during video rendering. The best thing would be to add
screenshort support to the native renderer..

Cheers,
Emil