Avnu / OpenAvnu

OpenAvnu - an Avnu sponsored repository for Time Sensitive Network (TSN and AVB) technology
464 stars 289 forks source link

The Size of Steam Data Payload (H264 CVF) #832

Open yesbman opened 5 years ago

yesbman commented 5 years ago

Dear whom may concern,

I am writing to share a problem of calculating the size of stream_data_length (IEEE std 1722-2016). When it comes to stream_data_length, IEEE std 1722-2016 indicates that it contains the total number of octets in the AVTPDU after the format_specific_data_3 fieldl; thus, it contains h264_timestamp as well as h264_payload for H.264 CVF PDU. However, the size of h264_timestamp is included in the MAP_HEADER_SIZE of openavb_map_h264.c.

- One of temporary solution : add the below line, tx_cb_ret_t openavbMapH264TxCB(media_q_t pMediaQ, U8 pData, U32 dataLen) { ... skip ... +++ pMediaQItem->dataLen += 4; // YURA_PLATFORM_BASE, data length should involve the size of H264 TIMESTAMP, 4 bytes) (U16 *)(&pHdr[HIDX_STREAM_DATA_LEN16]) = htons(pMediaQItem->dataLen); ... skip ... }

If the above code is not added, the other devices in the car such as AVN, a camera could not consider it is H264 stream at all.

I was just wondering whether another company does not experience the same problem, or not.

Best regards, Robert An

yesbman commented 5 years ago

I have tested the base of OpenAvnu with various devices (camera, AVN); as a result, the size of H264 timestamp is necessary to add into h264 data length. I have just opened a pull requested in order to share the issue with others. (https://github.com/AVnu/OpenAvnu/pull/841)