All-
First the particulars:
- DM814x
- DVRRDK 03.00.01.03
- Custom multi-channel encode / single-channel decode application based directly on Links APIs.
- Encode channels (H.264, SD) are muxed into MPEG-2 transport streams and transferred via PCIe to a host system for storage.
- MPEG-2 transport stream transferred via PCIe from host system for playback.
- Decode chain is as follows: (IpcBitsOutLink --> IpcBitsInLink --> DecLink --> IpcLink (m3video out) --> IpcLink (m3vpss in) --> SclrLink --> DisplayLink).
We have multiple encoded streams stored on the host system, and are attempting to implement a "preview" mode where we decode and display I-frame #1 of stream #1 for a period of time, then I-frame #1 of stream #2, etc.
Individually, each of these I-frames (including SPS/PPS) will decode and display correctly if it's the first frame fed to the H.264 codec.
When we attempt to feed multiple frames, the first renders correctly, but then subsequent frames return a codec error code of 0x00001409.
I've tried setting Bitstream_Buf.inputFileChanged = true for each frame (as they're from different captures). This has no effect.
I've tried issuing a System_linkStop(declink_id) and System_linkStart(declink_id), but this also seems to have no effect.
I've verified that we're submitting exactly one I-frame worth of data, and that the codec reports that same amount as being consumed (IH264VDEC_OutArgs.bytesConsumed == Bitstream_Buf.fillLength). This is true even when the codec reports an error.
What is the recommended method to flush and/or reset the codec state between separate decode operations?
Would the PTS associated with each I-frame have anything to do with whether or not the decode operation is successful?
Thanks!
-Cory