/* rtp common header */
rtp_packetize_common( id, out, (i == i_count - 1)?1:0, in->i_pts );
/* mbz set to 0 */
- out->p_buffer[12] = 0;
- out->p_buffer[13] = 0;
+ SetWBE( out->p_buffer + 12, 0 );
/* fragment offset in the current frame */
- out->p_buffer[14] = ( (i*i_max) >> 8 )&0xff;
- out->p_buffer[15] = ( (i*i_max) )&0xff;
+ SetWBE( out->p_buffer + 14, i * i_max );
memcpy( &out->p_buffer[16], p_data, i_payload );
out->i_buffer = 16 + i_payload;
{
int i_payload = __MIN( i_max, i_data );
block_t *out = block_Alloc( 16 + i_payload );
+ /* MBZ:5 T:1 TR:10 AN:1 N:1 S:1 B:1 E:1 P:3 FBV:1 BFC:3 FFV:1 FFC:3 */
uint32_t h = ( i_temporal_ref << 16 )|
( b_sequence_start << 13 )|
( b_start_slice << 12 )|
rtp_packetize_common( id, out, (i == i_count - 1)?1:0,
in->i_pts > 0 ? in->i_pts : in->i_dts );
- /* MBZ:5 T:1 TR:10 AN:1 N:1 S:1 B:1 E:1 P:3 FBV:1 BFC:3 FFV:1 FFC:3 */
- out->p_buffer[12] = ( h >> 24 )&0xff;
- out->p_buffer[13] = ( h >> 16 )&0xff;
- out->p_buffer[14] = ( h >> 8 )&0xff;
- out->p_buffer[15] = ( h )&0xff;
+ SetDWBE( out->p_buffer + 12, h );
memcpy( &out->p_buffer[16], p_data, i_payload );
out->p_buffer[12] = 0;
out->p_buffer[13] = 2*8;
/* for each AU length 13 bits + idx 3bits, */
- out->p_buffer[14] = ( in->i_buffer >> 5 )&0xff;
- out->p_buffer[15] = ( (in->i_buffer&0xff)<<3 )|0;
+ SetWBE( out->p_buffer + 14, (in->i_buffer << 3) | 0 );
memcpy( &out->p_buffer[16], p_data, i_payload );
in->i_pts > 0 ? in->i_pts : in->i_dts );
/* h263 header */
- out->p_buffer[12] = ( h >> 8 )&0xff;
- out->p_buffer[13] = ( h )&0xff;
+ SetWBE( out->p_buffer + 12, h );
memcpy( &out->p_buffer[RTP_H263_PAYLOAD_START], p_data, i_payload );
out->i_buffer = RTP_H263_PAYLOAD_START + i_payload;