diff options
author | Byoungman An <abm8311@yura.co.kr> | 2018-10-12 20:19:31 +0900 |
---|---|---|
committer | Byoungman An <abm8311@yura.co.kr> | 2018-10-12 20:19:31 +0900 |
commit | 2f88ee2072e03752f6d782bd04e9696b2c9fd17b (patch) | |
tree | 62a6dec473ab3cc1ab2a99cd34d59c180188886b | |
parent | 8fa80d1de59fbef14c8d0e80d8d9a62679a6182a (diff) | |
download | Open-AVB-2f88ee2072e03752f6d782bd04e9696b2c9fd17b.tar.gz |
Add h264_timestamp size into the H264 data length, remove it from the AVTP header (IEEE 1722-2016 8.5.3.1 h264_timestamp).
The stream data length of AVTP header stands for the size of h264 timestamp + h264 payload.
1. Author : Byoungman An
2. Title : Open-AVB
-rw-r--r-- | lib/avtp_pipeline/map_h264/openavb_map_h264.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/avtp_pipeline/map_h264/openavb_map_h264.c b/lib/avtp_pipeline/map_h264/openavb_map_h264.c index 6c2557f7..70c9a846 100644 --- a/lib/avtp_pipeline/map_h264/openavb_map_h264.c +++ b/lib/avtp_pipeline/map_h264/openavb_map_h264.c @@ -112,6 +112,9 @@ https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175. // - 4 bytes h264_timestamp #define HIDX_H264_TIMESTAMP32 24 +// - 4 bytes h264_timestamp size +#define HIDX_H264_TIMESTAMP_SIZE 4 + typedef struct { ///////////// // Config data @@ -314,7 +317,8 @@ tx_cb_ret_t openavbMapH264TxCB(media_q_t *pMediaQ, U8 *pData, U32 *dataLen) // Copy the h264 rtp payload into the outgoing avtp packet. memcpy(pPayload, pMediaQItem->pPubData, pMediaQItem->dataLen); - *(U16 *)(&pHdr[HIDX_STREAM_DATA_LEN16]) = htons(pMediaQItem->dataLen); + // Add h264_timestamp size into the H264 data length + *(U16 *)(&pHdr[HIDX_STREAM_DATA_LEN16]) = htons(pMediaQItem->dataLen + HIDX_H264_TIMESTAMP_SIZE); // Set out bound data length (entire packet length) *dataLen = pMediaQItem->dataLen + TOTAL_HEADER_SIZE; |