views:

28

answers:

1

Can I do it only with the lti-Civil classes or I need FMJ or JMF ? do I use the actual Stream or set of captured Images from CaptureObserver?

Thanks.


    captureStream = system.openCaptureDeviceStream(info.getDeviceID());
            captureStream.setObserver(new CaptureObserver(){

                public void onError(CaptureStream arg0, CaptureException arg1) {
                }

                public void onNewImage(CaptureStream streamSource, Image image) {
                    try
                    {
                        imageFrame.setImage(AWTImageConverter.toBufferedImage(image));
                        bufferedImage = AWTImageConverter.toBufferedImage(image);
                    }
                    catch (Throwable t)
                    {   t.printStackTrace(); }

                }

            });
captureStream.start();
A: 

If I understand your question correctly, the introduction on Lti-civil site have the answer:

LTI-CIVIL is a Java library for capturing images from a video source such as a USB camera. It provides a simple API and does not depend on or use JMF! The FMJ project integrates LTI CIVIL into the JMF architecture by providing a civil: datasource. For more information, visit screenshots and project status sections of this website

As far as I can see your code is not using any JMF specific classes so the above code should work with plain LTI-CIVIL.

EDIT:

Based on your clarification, I think you will need additional support for encoding the video as LTI-CIVIL seems to be focused solely on capturing. Out of FMJ and JMF, FMJ is probably a better choice as JMF's development appears to be ceased. For other alternatives see this section of wikipedia article about JMF

Tahir Akhtar
this code works perfect, but the main question is how to make/encode/process a video file from the camera...
i.Psi
see my edited answer.
Tahir Akhtar