Re: [Live-devel] some problems with ByteStreamMultiFileSource

2007-09-11 Thread Ross Finlayson
> >OK, try adding the following, after the call to "fread()" (line 138) > >in "ByteStreamFileSource.cpp": > >if (fFrameSize == 0) { > >handleClosure(this); > >return; > >} > > > >Please let us know if that works for you. (If so, I'll add it to the > >next s

[Live-devel] some problems with ByteStreamMultiFileSource

2007-09-10 Thread Karlov Andrey
>OK, try adding the following, after the call to "fread()" (line 138) >in "ByteStreamFileSource.cpp": > if (fFrameSize == 0) { > handleClosure(this); > return; > } > >Please let us know if that works for you. (If so, I'll add it to the >next source code

Re: [Live-devel] some problems with ByteStreamMultiFileSource

2007-09-10 Thread Ross Finlayson
>but we haven't! in first mail I have explained why. > >This is because we check for EOF only before reading! > >Then we read next time, we before check for EOF, >but there's no EOF state and we try to read, >and of course we read 0 bytes, but now we have EOF state =) OK, try adding the following,

[Live-devel] some problems with ByteStreamMultiFileSource

2007-09-10 Thread Karlov Andrey
but we haven't! in first mail I have explained why. This is because we check for EOF only before reading! Then we read next time, we before check for EOF, but there's no EOF state and we try to read, and of course we read 0 bytes, but now we have EOF state =) and it's handled not here, as it s

Re: [Live-devel] some problems with ByteStreamMultiFileSource

2007-09-10 Thread Ross Finlayson
>\For example I have file with size 6011488 bytes. >6011488 = 4568*1316=4568*(7*188) <--it's correct transport stream file, >but then we read last portion of this file: > fFrameSize = fread(fTo, 1, fMaxSize, fFid); >we read exactly 1316 bytes, the file is no longer left bytes!!! >but also we

[Live-devel] some problems with ByteStreamMultiFileSource

2007-09-10 Thread Karlov Andrey
Ok, I agree with you in that case. But that about first case? Sometimes it's happens =) For example I have file with size 6011488 bytes. 6011488 = 4568*1316=4568*(7*188) <--it's correct transport stream file, but then we read last portion of this file: fFrameSize = fread(fTo, 1, fMaxSize,

Re: [Live-devel] some problems with ByteStreamMultiFileSource

2007-09-10 Thread Ross Finlayson
>1. usually fMaxSize = (7*188)=1316 and then in file remain in exact 1316 >unreaded bytes, > then EOF don't happens >2. if in file remain little then 188 bytes (TS packet) EOF dont't >happens too The size of all Transport Stream files should be a multiple of 188 bytes. If you have a Transpo

[Live-devel] some problems with ByteStreamMultiFileSource

2007-09-10 Thread Karlov Andrey
Then one file is over, ByteStreamFileSource switch us to another file, for this purpoise it has method: "void ByteStreamMultiFileSource::onSourceClosure1() { // This routine was called because the currently-read source was closed // (probably due to EOF). Close this source down,