[Ffmpeg-devel] [PATCH] AVISynth support

Steve Lhomme steve.lhomme
Fri Aug 18 16:18:28 CEST 2006


Hi,

Here is the modified patch with all the fixes done.

Yeah it's smaller but it does less than the other patch.

Steve

Michael Niedermayer wrote:
> Hi
> 
> On Thu, Aug 17, 2006 at 11:22:03PM +0200, Steve Lhomme wrote:
>> Michael Niedermayer wrote:
>>> Hi
>>>
>>> On Thu, Aug 17, 2006 at 04:58:45PM +0200, Steve Lhomme wrote:
>>>> Reimar D?ffinger wrote:
>>>>> Hello,
>>>>> On Thu, Aug 17, 2006 at 04:31:16PM +0200, Steve Lhomme wrote:
>>>>>> I'm actually adding a small header in the raw virtual stream so that I 
>>>>>> can add a probe to the demuxer. It's not that hard. But adding RIFF 
>>>>>> headers is a lot more work. Especially since the virtual file is 
>>>>>> usually much bigger than 4GB. I know it should be OpenDML but I don't 
>>>>>> know how it's interleaved.
>>>>> If you don't support seeking IIRC there is no point in using OpenDML, if
>>>>> you want to support that I think that will be problematic anyway and
>>>>> probably not possible while keeping the stream/demuxer split, since you
>>>>> must give AVISynth the frame number you want but stream layer works with
>>>>> byte position. Or am I missing something?
>>>> Actually doing the header in the virtual stream is easy. But when I read 
>>>> the packets I need to set the position at the right packet boundaries so 
>>>> I have to access the virtual stream even more to do so... So I won't add 
>>>> it in the end. It's an extra hack for no real life use.
>>>>
>>>> Yes, seeking is not only needed in the virtual stream (also called 
>>>> protocol) but I don't think it would work otherwise with av_stream_info 
>>>> and stuff like that. At first I just made a demuxer and no virtual 
>>>> stream. It was working fine but url_ftell() was always wrong and that's 
>>>> what we use in DrDivX to track progress in the encoding/analysis so I 
>>>> added the virtual stream.
>>> hmm, implementing avisynth support purely in the demxuer without any
>>> stream/protocol also sounds acceptable, do you still have that code?
>>> the url_ftell() issue can maybe be solved by using AVPacket.pos or
>>> using AVPacket.dts and AVstream.duration instead
>> Here is a patch with the older version.
>>
>> Steve
> 
> [configure / Makefile part left to respective maintainers]
> 
> [...]
> 
>> +    avs->streams = av_malloc(info.dwStreams * sizeof(AVISynthStream));
>> +    memset(avs->streams, 0, info.dwStreams * sizeof(AVISynthStream));
> 
> av_mallocz()
> 
> 
> [...]
> 
>> +
>> +    // little trick to make sure url_ftell doesn't report 0
>> +    get_buffer(&s->pb, dummy, sizeof(dummy));
> 
> iam against such hacks
> 
> 
> 
> [...]
> 
>> +    stream = &avs->streams[avs->next_stream];
>> +    avs->next_stream++;
>> +    if (avs->next_stream == avs->nb_streams)
>> +        avs->next_stream = 0;
> 
> avs->next_stream= (avs->next_stream+1) % avs->nb_streams;
> 
> 
> [...]
> 
> except these minor issues, iam fine with the patch assuming it doesnt
> break building on linux and mingw/cygwin
> its also just half the size of the demuxer+stream avisync mess ...
> 

-- 
robUx4 on blog <http://robux4.blogspot.com/>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: avisynth-input_v3.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060818/3793c0f8/attachment.asc>



More information about the ffmpeg-devel mailing list