在神龙卡中怎么得到当前的节目播放了多少秒?请高手指点。(100分)

  • 主题发起人 主题发起人 pengyong1
  • 开始时间 开始时间
P

pengyong1

Unregistered / Unconfirmed
GUEST, unregistred user!
在神龙卡中怎样得到当前节目
1)播放了多少秒?
2)怎样判断节目快播完了。

 
1、可以通过MPEG的时间戳来判断播放了多少秒。
2、判断文件长度和已经播放的长度就可以了,或者再通过时间戳和MPEG格式中的时间全长可以判断。
 
to qince:
时间戳的计算算法是怎么样的,请提示。
 
ISO/IEC 13818-1中DTS的公式是:
DTS(j) = ((system clock frequency * tdn(j)) DIV 300) % 2 ^33
System clock frequency = 90 kHz
定义如下:
DTS (decoding time stamp) -- The DTS is a 33 bit number coded in three separate fields. It indicates the
decoding time, tdn(j), in the system target decoder of an access unit j of elementary stream n. The value of
DTS is specified in units of the period of the system clock frequency divided by 300 (yielding 90 kHz). The
decoding time derived from the DTS according to equation 2-12 below.
In the case of video, if a DTS is present in a PES packet header it shall refer to the access unit containing the
first picture start code that commences in this PES packet. A picture start code commences in PES packet if
the first byte of the picture start code is present in the PES packet.
 
后退
顶部