Re: Test cases: invalid syntax vs. invalid semantics

On Mon, 11 Apr 2011 11:54:38 +0200, Davy Van Deursen  
<davy.vandeursen@ugent.be> wrote:

> On 11/04/2011 11:34, Philip Jägenstedt wrote:
>> On Fri, 08 Apr 2011 11:42:56 +0200, Davy Van Deursen
>> <davy.vandeursen@ugent.be> wrote:
>>
>>>
>>> 2b) UA is not able to detect that the fragment is invalid
>>> For example, #t=15,20 when the resource has a duration of 10s. When
>>> the UA does not know the duration, it is not able to detect that this
>>> fragment is invalid. What will the visual result be in this case? Note
>>> also that it is possible in this case that the UA requests a temporal
>>> range (i.e., Range: t:npt=15-20) which the server (for the moment)
>>> will answer with a 416 ...
>>>
>>> I think we need to answer these questions in order to efficiently
>>> progress with the test cases.
>>
>> I think that the most straightforward solution is to unify the handling
>> of syntax errors and semantic errors.
>>
>> In particular, as part of "Processing Media Fragment URI", I think that
>> we should make the parser discard things that are deemed to be
>> "unsemantic". This makes it very straightforward to implement, e.g. for
>> the temporal dimension after parsing #t=s,e one would simply check if s
>> < e. If it is not, then that dimension is ignored, just as for syntax
>> errors. We should add similar restrictions for dimensions as part of the
>> "For each name-value pair" loop in section "Processing name-value  
>> lists".
>
> This works indeed in case the UA is able to detect the error (syntax or  
> semantic). However, what in case of a semantic error that is unable to  
> be detected by the UA (i.e., case 2b that I sketched above)?

I'd say that once the duration of the resource is known and the UA tries  
to apply the fragment, it tries to seek to the start offset. If that  
offset is greater than the duration, then clip to duration so that  
effectively it seeks to the end.

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Monday, 11 April 2011 13:02:02 UTC