[FFmpeg-devel] [RFC] Move ffplay engine to separate library

Nicolas George george at nsup.org
Sat Nov 23 20:28:57 CET 2013


Le tridi 3 frimaire, an CCXXII, Stefano Sabatini a écrit :
> Right now the user has to create a source, create a sink, setup
> inputs/outputs and parse the provided graph, then finally configure
> the resulting filtergraph. This could be probably embedded by some
> high-level utilities.

I agree.

> For a player this could be a bit simpler, since you could use a movie
> to work as source (and letting it do the decoding), the feasibility of
> this approach has to be verified yet (since I never did it, and other
> users usually provides no feedback so we basically don't know).

I suppose we would need to include a process_command() method to src_movie
to implement things like interactive seeking.

As a side point, it would be nice to be able to use the lavd output devices
for the output of a player. Right now, it mostly works for audio, but video
would also require some way of reporting user interaction. Running in a
separate thread to handle refreshes and events may also prove necessary.

Furthermore, the lavd interface is quite inconvenient: it requires the
frames to be encoded into PCM or raw video, which means a lot of memcpy for
nothing. Also, it does not allow format negotiation with the rest of the
filter graph.

I have a plan to make this better, but not yet had time to start anything. I
might as well share it here:

1. Allow muxers to accept AVFrames directly (probably creating a new
   write_decoded_frame() method in the AVOutputFormat structure).
   (This would be kind of like AVFMT_RAWPICTURE except it would be
   transparent for the application that does not want to use it.)

2. Implement that in the relevant output devices.

3. Create a lavfi sink for each output device.

If that were to happen, then you could implement an audio player by just
connecting the amovie source to the ALSA sink, and focus on the UI.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131123/71f8bdfd/attachment.asc>


More information about the ffmpeg-devel mailing list