Android Question Camera2 library example question

CyberDroidWare

Member
Licensed User
Dear community,

I note the very useful Camera2 example for video recording. No other threads were open for comment, so I ask this afresh.

I note how it saves the MP4 to a temp-filename.mp4 recording in real time, then it performs a file copy at the end to create the final .mp4. I have managed to (in another async process) gain read only access to this file and read it with RandomAccessFile in real time in my quest to make a "streaming video" server. This is certainly not efficient or viable.

Can I ask, before I look to making my own library or updating the existing one, is there not an event that is fired, or a variable with the filestream that can be accessed directly from Camera2 in real time, so that i can forward packets in real time to a server by either TCP or UDP?

Thanks,
S
 

CyberDroidWare

Member
Licensed User
Thankyou Erel, yes I've looked at this, alongside the prospect of making a duplex Walkie Talkie addition, and also the prospect of using WebRTC, but note all of their limitations.

I am confident if I can merely swap the file I/O for a socket I/O then (based on quality/bitrate) I would achieve a much better result with proper synch.

I wonder if it could be a feature request to have an event raised on write to file in Camera2, which passes a variable argument ByRef merely consisting of the byte array that it is just about to write?
 
Upvote 0
Top