[FFmpeg-devel] [PATCH] ALSA for libavdevice
Nicolas George
nicolas.george
Mon Dec 15 14:34:04 CET 2008
Le quintidi 25 frimaire, an CCXVII, Michael Niedermayer a ?crit?:
> you add 2 values, one being nanoseconds, one being samples. The timebase
> choosen is a multiple of neither.
Neither timebase can represent the value exactly, but both are accurate
enough so that it does not matter. Then the choice should be done, I think,
based on which one is more practical. And IMHO, a second-based unit is more
practical when it comes to integration with other parts of the software.
But I do not insist on it, and I will leave you the final word: if you just
tell me the solution you prefer, I will implement it. As far as I remember,
the possibilities are: nanoseconds, microseconds, samples, 128th of samples;
and the origin may be the Epoch or the initialization of the stream.
> Before you add them you round both incorrectly, correct being to the next
> closest integer.
You are perfectly right. For now I fixed that with a "+500" and a
"+st->codec->sample_rate/2".
> where can any localtime be passed to display?
> This localtime isnt ending up in an encoded file, is it? This would be a
> security issue
I have never actually seen the conversion done, but I have seen several live
streams where the timestamp looked suspiciously like an Unix time.
I do not see how it would be a security issue: a lot of things expose the
system time (the HTTP date header, IP timestamps) or the
creation/modification time of a file (headers in an archive). This is hardly
a confidential information.
> please explain me how av sync works if the samplerate is changed and thrown
> away?
An output format can not change the parameters of its streams, can it? That
means it must simply fail if the requested sample rate is not available. I
think I like this solution better anyway.
> NULL is not a good context, besides this line is likely not that usefull
This line is indeed redundant with the summary printed by ffmpeg. I removed
it.
I will submit the new version of the patch as soon as I have your advice on
the timebase.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081215/78b64e0d/attachment.pgp>
More information about the ffmpeg-devel
mailing list