Re: Test cases: invalid syntax vs. invalid semantics

On Tue, 12 Apr 2011 21:40:46 +0200, Jack Jansen <Jack.Jansen@cwi.nl> wrote:

>
> On 11 apr 2011, at 15:01, Philip Jägenstedt wrote:
>
>> 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'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.
>
>
> If I understand you correctly you say that #t=15,20 should behave as a  
> seek to the end, if and only if the UA does not know the duration  
> beforehand?
>
> That seems a bit inconsistent: whether you get an error or a seek-to-end  
> would depend on prior knowledge of the UA, which is hidden from the user.
>
> Or do I misunderstand what you're trying to say?

The UA cannot do anything at all with the fragment until it has fetched  
the file header to learn the duration and possibly seeking index. At that  
point, it tries to apply the fragment by seeking to the start offset (and  
configuring the pipeline to stop playing at the end offset). If the start  
offset is greater than the duration, then seeking will clamp to the  
closest possible position, which is the end of the resource.

So, in no case would the result depend on whether or not the duration is  
known on beforehand, applying the fragment always happens after decoding  
has begun.

This is of course assuming an implementation using byte range requests and  
none of the new HTTP headers. For a UA sending special HTTP headers, I  
have no opinion about what the server should do when finding that the  
start position is out of range.

-- 
Philip Jägenstedt
Core Developer
Opera Software

Received on Wednesday, 13 April 2011 07:55:19 UTC