Package com.avpkit.core.io

An API for extending AVPKit to read and write from arbitrary data sources.

AVPKit needs to process raw media file data in order to decode and encode those files. What's worse, is the only input AVPKit can give to FFMPEG is a URL.

By default, AVPKit can read any "file:" URL. In fact if you don't specify a protocol, we will assume "file:". But what happens if you want to read data from an arbitrary source (like FMS, Red5, Wowza, etc)?

That's where this package comes in. Using the IO package you can implement a IURLProtocolHandler that can respond to FFMPEG requests to read or write buffers. From there any type of integration is possible.


Here's an architecture diagram for how it works: architecture diagram
And here's a details call flow diagram showing how we move from Java to native code to FFMPEG and back: call flow diagram

To begin with this class, see URLProtocolManager and take a look at the example source code for FileProtocolHandler and FileProtocolHandlerFactory classes.