[Live-devel] trick play works well? I don't think so.

Ross Finlayson finlayson at live555.com
Fri Feb 19 01:43:28 PST 2016


>>                   Boolean MPEG2TransportStreamIndexFile::seekToIndexRecord(unsigned long indexRecordNumber) {
>>                if (!openFid()) return False;
>> 
>>    if (indexRecordNumber == fCurrentIndexRecordNum) return True; // we're already there
>> 
>>        if (SeekFile64(fFid, (int64_t)(indexRecordNumber*INDEX_RECORD_SIZE), SEEK_SET) != 0) return False;
>>      fCurrentIndexRecordNum = indexRecordNumber;
>>      return True;
>>    }
>>    //Conclusion C: item[0~7] is record the frame position in .ts file.
> 
> I'm not sure how you got that conclusion from that snippet.
> It's just doing a seek to the start of the record, and not reading or writing anything.

Correct.

FYI, here is the format of the (11-byte) index record:

byte 0:		record type
byte 1		offset (within the 188-byte transport stream record)
byte 2		size of the record (in bytes)
bytes 3-6		PCR (timestamp)
bytes 7-10	transport packet number


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list