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

How to capture an image #13

Open
dasun opened this issue Dec 5, 2013 · 5 comments
Open

How to capture an image #13

dasun opened this issue Dec 5, 2013 · 5 comments

Comments

@dasun
Copy link

dasun commented Dec 5, 2013

I want to capture an image from the camera while streaming is running. How can I do it with libstreaming?

@fyhertz
Copy link
Owner

fyhertz commented Dec 9, 2013

Hi,

If you use the mediacodec branch (I will merge it with master when it will be more stable), you could do that with some modifications of the lib: look at onPreviewCallback(...) in VideoStream.java, you have a buffer there that contains the last image (more or less...) from the camera (which is given to a MediaCodec instance).

The image is encoded in the NV21 color format, so you will also need to convert it back to RGB :(

If you are using the master branch, well you can't do that, you need to stop the stream first...

@kartickPatil
Copy link

Hi fyhertz,

try1 :
I wanted to capture image while streaming video for this i have edited example3 and removed library from libs and added libstreaming master project library. I edited the videostream.java and Session.java file to capture image and it works but further when i try to stream the video application hangs(streaming does not takes place).

try2: - using library.jar file

i have used this and streaming works supper fine thank to you. Further if i want to capture image from stream i cant do it as obvious that i wont get acces to camera.

Is there any way that we can work with the master project where we can implement this.

any idea or any way or any sort input you have will be great so that even i can share things if i am able to achive this.

any ways thanks a lot for your wonderful effort.

regards,
karthick patil

@AmitSari
Copy link

libstreaming.jar file missing from libstreaming project

@ghost
Copy link

ghost commented Jul 22, 2015

Represent sample codes for solving the problem, please.

@jamesvanhallen
Copy link

Is it possible now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants