Hi! Sorry if those questions have been asked before, I went back a couple of months in the archive but I couldn't find anything, so I hope those are (relatively) new questions.
I'm working on an audio player and I'm using libavformat/codec to decode audio. I've been able to play multiple audio files at the same time, works really nicely and it sounds great too. Thanks so much for this library; I originally wanted to write my own mp3 decoder but after reading a bit of the mp3 spec I just knew that this was a bad idea. I'm using D, so it was a bit of a fight to get it working, but now it's running very smoothly. Anyway, here's my first question: Is it possible to open the same file multiple times? Since the duration isn't always correct after opening files I'm currently working on a scan feature. The player should start playing immediately after dragging in a file, but at the same time it should start a scan to see how far it can read until it hits the end (and build a waveform display at the same time). Now the problem is that it doesn't work if I'm opening the same file twice. I can read one file and scan another, but with the same file it doesn't work (my scan always signals eof). I'm asking if it's possible to do that in principle, so I know if I just screwed up my code or if I should come up with another way to do that. (I should maybe add that I use one dedicated decoder thread, so I don't think it's a multi-threading issue.) The second question would be: Is there a standard way of reading a file in reverse? I'm thinking av_seek_frame-ing backwards, I think this should work, but my experiments (jumping forward/backward by adding/subtracting the duration to/from the current frame's pts and seeking to that position) haven't been successful so far. One possibility is extending my planned file scan to build a list a valid pts values, but it seems to be a bit overkill and I'd rather like to find some simpler method to do that. Is there a way to jump to the next/previous frame easily? And the last question, which isn't that important, just curious: Are there plans to support 32 bit floating point audio? Or is there a way to do that already and I'm just too blind to find it in the documentation? Thanks for your time! Regards, Mike _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
