I am working on an app to take the raw data stream from libeic66813 (ie, DV from raw1394), and decode it into video/audio frames. Since the data coming from libeic66813 is already muxed in a DV or MPEG2-TS stream, I simply need to find a way to push that muxed data into libavformat/libavcodec.
I am still debating the best way to do this, but it appears I have a few options: Option 1) by-pass libavformat directly, do my own demuxing, and pass the data to libavcodec to do the actual decoding. Option 2) override the functions in current instance of AVInputFormat, to read the data produced by libeic66813. Specifically, read_packet() to read from libeic* rather than from AVFormatContext->pb. Option 3) implement new AVInputFormat(s), derived from dv_demuxer/mpegts_demuxer. Option 4) implement a new URL handler, to provide a ByteIOContext that reads/writes data to libeic*. My gut tells me that Option 4 is the best option, but looking through the code, I'm not having any luck figuring out how I'd go about doing this. Also, from what I can tell, this would fall into libavdevice (its hard to tell, and libavdevice appears to be relatively new, and possibly unstable. Option 3 seems viable, but something of a hack, given the option 4. Options 1 and 2 are real hacks that probably would just cause me more grief, since I'd have to take a lot of the code onto myself, and hope I did stuff right. I'd appreciate input from anyone who is interest, and who has a clue (because I don't). I will also need to eventually write encoded data back to the device, and I'd like to ultimately contribute the code back to ffmpeg, if possible. I think it would be a great feature to decode/transcode in real-time DV/MPEG2-TS footage via Firewire, as well and transcode/encode/transmit arbitrary streams over Firewire in the same various protocols. Thanks Kyle Mallory _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
