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

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

                Flags := hgSendStream;



                '200 OK',


                'DATE: '+FormatDateTime('  ddd, dd mmm yyyy

                ' 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;


    if not Assigned(FDocStream) then begin

        { No Stream to send ! Create an empty one to continue }

        FDocStream := TMemoryStream.Create;



       FDocStream.Seek(0, 0);        { Go to start of stream           }
<<<<<-- Is that right ????, so i cant start the streamtransfer at defined


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