On Wed, Feb 06, 2008 at 02:22:42PM +0300, Pavel Modilaynen wrote:
Tuesday, February 5, 2008, 7:18:12 PM, Reimar Doffinger wrote:
On Tue, Feb 05, 2008 at 06:47:33PM +0300, Pavel Modilaynen wrote:
New files: - vz.c/vz.h - main audio visualization functionality (like ad.c, vf.c,.. ), table of visualizers, entries; - vz_xxx.c - visualizer's implementation itself / access to external libs (sticking to the conception of libmpcodecs)
I don't see why you can't just use a normal video filter. Just add a new IMGFMT_AUDIO or so.
And how in this case will I work with audio path inside video filter? It doesn't know and doesn't have to know about any audio. This would be real mess if not. And IMGFMT_AUDIO sounds crazy IMHO :)
If you're using audio samples as source for an image after processing by a filter, then it sounds like an "image format" to me. At least that's the only useful abstraction mplayer has for it..
In my proposed approach video filter support, of course, remains. And what is really important - it's exactly the same. As I read in MPlayer documentation - the purpose of vf is resize/reformat/recolor and not "generation of video or images".
So, I think, the best place for entry - is the audio demuxer (or mplayer.c itself ??).
Audio demuxer is not an acceptable place for dealing with decoded audio samples. Period. mplayer.c might be appropriate but doing as much of it as you can in the video filter layer is ideal.
There is nothing awful in this - we just ask an audio demuxer - would you please convert the audio going through to the video. And it answers - yes, of course, which conversion do you want? dimensions?fps?spectrum?
The awful part is mixing unrelated code. This is fundamentally bad design and will not be allowed.
And you still have possibility to use any vf like in case of true video.
You can of course do this if you use the existing video filter framework to implement the visualizations, and then it's easier to add new ones too. Rich