2013-09-23, 12:49 PM
reven Wrote:well i found the problem
was using the requested, unaltered start/end bytes which would give a negative value for bytes remaining and the tsstreamer would close the connection (not the samsung player)Code:long bytesToReadRemaining = (this.EndRangeBytes[i] - this.StartRangeBytes[i]) + 1;
changing it to
Code:long bytesToReadRemaining = this.InternalRequestedFileInfo.Length - startpos + 1;
I can now jump to about minute 31 out of 34, im sure there is another tiny bug I can fix to jump the entire way. Also I don't have to handle the timeline myself or anything, and it mostly just now works (all that is required on my player is im passing in an additional &guid parameter to the video player and I call a seek request before jumping)
So, what I'm doing is.
# For a file with 1000 bytes (just an example)
# For the initial stream request i respond with Content-Range: bytes 0-1000/1000 and Content-Length: 1000
# When a request comes in, I alter the requested start byte with the adjusted byte eg, change 500 to 300
# I respond with Content-Range: bytes 500-1200/1200 and Content-Length: 1200
# I then just adjust the start range to and respond with bytes 300 to 1000, the player thinks its bytes 500 to 1200
And I can now successfully watch the entire faulty videos provided by stustunz and smacrae.
so Fred, well done you have solved the problem I've been having with the samsung player, just need to polish it up and hopefully get sub to add it or to get it into NEWA.
This will make smacrae very happy
Great work!
I was posting my answer while you fixed it - just ignore!