static u_char* hds_write_adobe_mux_packet_header( u_char* p, uint8_t tag_type, uint32_t data_size, uint32_t timestamp) { *p++ = tag_type; write_be24(p, data_size); write_be24(p, timestamp); *p++ = timestamp >> 24; write_be24(p, 0); // stream id return p; }
static u_char* hds_write_video_tag_header( u_char* p, uint32_t data_size, uint32_t timestamp, uint8_t frame_type, uint8_t avc_packet_type, uint32_t comp_time_offset) { data_size += sizeof(video_tag_header_avc); p = hds_write_adobe_mux_packet_header(p, TAG_TYPE_VIDEO, data_size, timestamp); *p++ = (frame_type << 4) | CODEC_ID_AVC; *p++ = avc_packet_type; write_be24(p, comp_time_offset); return p; }