sunyinhui / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Add a Socket-based FrameGrabber #422

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Background:
A common way to interact with a Camera on Android devices is to use 
MediaRecorder. The only way to intercept its output is to have it write to a 
socket (i.e. give it 
ParcelFileDescriptor.fromSocket(outputSocket).getFileDescriptor()).

Request:
It would be super useful if there was a FrameGrabber that could read from a 
socket (ie I would have MediaRecorder write to a local socket, then create a 
mirror socket receiving the data, and it would be this mirror socket that I 
would create the FrameGrabber from).

Original issue reported on code.google.com by eug...@wearableintelligence.com on 6 Feb 2014 at 2:40

GoogleCodeExporter commented 9 years ago
Do you know if FFmpeg itself supports something like that? Or would we have to 
implement something on top of FFmpeg to get it working?

Original comment by samuel.a...@gmail.com on 9 Feb 2014 at 1:59

GoogleCodeExporter commented 9 years ago
Apparently, not. However, I found this: 
http://www.codeproject.com/Tips/489450/Creating-Custom-FFmpeg-IO-Context, where 
the author claims to have done it.

Also, it would be great if the constructor took a generic InputStream. Then I 
could pipe it to whatever I wanted.

Original comment by eug...@wearableintelligence.com on 9 Feb 2014 at 5:39

GoogleCodeExporter commented 9 years ago
Actually, there are a couple of other people who would like to grab from an 
InputStream, so let's merge that with issue #363.

Original comment by samuel.a...@gmail.com on 11 Feb 2014 at 1:58