W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2014

Re: [whatwg] Memory management problem of video elements

From: duanyao <duanyao@ustc.edu>
Date: Wed, 20 Aug 2014 19:58:34 +0800
Message-ID: <53F48D6A.5070905@ustc.edu>
To: Philip Jägenstedt <philipj@opera.com>
Cc: WHATWG <whatwg@whatwg.org>
于 2014年08月20日 19:26, Philip Jägenstedt 写道:
> On Wed, Aug 20, 2014 at 12:04 PM, duanyao <duanyao@ustc.edu> wrote:
>> 于 2014年08月20日 15:52, Philip Jägenstedt 写道:
>>
>>> On Tue, Aug 19, 2014 at 3:54 PM, duanyao <duanyao@ustc.edu> wrote:
>>>> I'm not familiar with game programing. Are sound effects small audio
>>>> files
>>>> that are usually
>>>> played as a whole? Then it should be safe to recreate the pipeline.
>>> There's also a trick called audio sprites where you put all sound
>>> effects into a single file with some silence in between and then seek
>>> to the appropriate offset.
>> I think if UA can get and set currentTime property accurately, it should be
>> able to recreate the pipeline
>> with the same accuracy. What are the main factors limiting the accuracy?
> I don't know, but would guess that not all media frameworks can seek
> to an exact audio sample but only to the beginning of a video frame or
> an audio frame, in which case currentTime would be slightly off. One
> could just lie about currentTime until playback continues, though.
Such limitation also affects seeking, not only memory-saving feature, 
and the spec allows "quality-of-implementation issue", so I think this 
is acceptable.
Additionally, a media in memory-saving state must be paused, I think 
users won't care about the small error of resuming position.

>
> Philip
Received on Wednesday, 20 August 2014 12:00:02 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:22 UTC