Yes, thats correct. My MediaStreaming Client send a http Get with different
Offsets. For Example >>RANGE bytes=65535-<<
So i open a FileStream, set the Offset with Seek and Assign it to DocStream
like this >>ClientCnx.DocStream :=
TFileStream.Create(AbsFilePath,fmOpenRead);<< and then Call AnswerStream.
But in your Subfunction THttpConnection.SendStream you reset the
Streamoffset to the beginning of the File. So the Transfer starts every Time
at the Beginning of the Content. It works fine, if i remak your Seek-Command
in your Function. So why reset you a given Stream to Zero?

By the Way I have another Problem with ParseRange Function. At the
StreamingClient i press FF (FastForward) on the IR-Control while the File is
still playing. The StreamingClient send Get with >>RANGE bytes=-65535-<< to
me. The ParseRange Function only removes the first "-" Character and check
the Rest of the Line with a call to StrToInt to check if the Rest of this is
an Integer. But the Rest now is "65535-", so the Call fail and produce an
Exception.

So my Question, is the Row >>RANGE bytes=-65535-<< a legal Range Parameter?
If so, the Function cant handle this.
 


-----Urspr√ľngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Francois PIETTE
Gesendet: Freitag, 3. Februar 2006 20:03
An: ICS support mailing
Betreff: Re: [twsocket] THttpConnection.SendStream at defined Streamoffset

Is your problem handling byte range with dynamic content ?
--
[EMAIL PROTECTED]
http://www.overbyte.be

----- Original Message ----- 
From: "Joachim Taubitz" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Friday, February 03, 2006 11:39 AM
Subject: [twsocket] THttpConnection.SendStream at defined Streamoffset


> Hello,
>
>
>
> i am a german guy who wants to create a UPnP MediaServer Application for 
> my
> D-Link DSM320 UPnP Streaming Client.
>
>
>
> For this i use your ICS Components. On my Way to create my App. there was
> one problem
>
>
>
> 1. At beginning of streaming MediaContent like a MPEG-File, the DSM320
> send 2 or more http-Get Commands to my Server-App. to get the Mediafile 
> via
> http.
>
> He do this for caching the Content, read Info about Filetyp, Size, Length
> and start streaming, For this, every Get Command have different Range 
> bytes
> Offset in the http Header like this
>
>
>
> Range bytes=0- or
>
>
>
> Range bytes=297- or Range bytes=65535- or
>
>
>
>
>
>
>
> So i wrote this in my OnGetDocument Event
>
>
>
> ClientCnx.DocStream := TFileStream.Create(AbsFilePath,fmOpenRead or
> fmShareDenyWrite);
> ClientCnx.DocStream.Seek(FSOffset,soFromBeginning);
>
>                Flags := hgSendStream;
>
>
>
>                ClientCnx.AnswerStream(Flags,
>
>                '200 OK',
>
>                'text/xml',
>
>                'DATE: '+FormatDateTime('  ddd, dd mmm yyyy
> hh:mm:ss',now)+CRLF+
>
>                ' SERVER: '+MS^.ServerInfo+CRLF);
>
>
>
>               FSOffset = Range-Offset of http-Header
>
>
>
>
>
> So the Streaming beginns fine, but after 2 seconds, the streaming 
> restarts,
> when i use FastForward on my IR Remote the File restarts ervery Time.
>
>
>
> I found this in the HTTPServ Component
>
>
>
> procedure THttpConnection.SendStream;
>
> begin
>
>    if not Assigned(FDocStream) then begin
>
>        { No Stream to send ! Create an empty one to continue }
>
>        FDocStream := TMemoryStream.Create;
>
>    end;
>
>   else
>
>       FDocStream.Seek(0, 0);        { Go to start of stream           }
> <<<<<-- Is that right ????, so i cant start the streamtransfer at defined
> Offset
>
>
>
> I remark
>
>
>
> //   else
>
> //       FDocStream.Seek(0, 0);
>
>
>
>
>
> And now it works fine.
>
>
>
>
>
> So when i want to transmit a stream at defined offset, i think it must be
> possible to have a AnswerStream Function with this Parameter.
>
>
>
>
>
> What your thinking about this ?
>
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to