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

Reply via email to