Browse Source

packetizer: hevc: add referenced vps and sps id accessors

pull/48/head
Francois Cartegnie 10 years ago
parent
commit
ed9f6af189
  1. 10
      modules/packetizer/hevc_nal.c
  2. 4
      modules/packetizer/hevc_nal.h

10
modules/packetizer/hevc_nal.c

@ -993,6 +993,16 @@ void hevc_rbsp_release_pps( hevc_picture_parameter_set_t *p_pps )
IMPL_hevc_generic_decode( hevc_decode_pps, hevc_picture_parameter_set_t,
hevc_parse_pic_parameter_set_rbsp, hevc_rbsp_release_pps )
uint8_t hevc_get_sps_vps_id( const hevc_sequence_parameter_set_t *p_sps )
{
return p_sps->sps_video_parameter_set_id;
}
uint8_t hevc_get_pps_sps_id( const hevc_picture_parameter_set_t *p_pps )
{
return p_pps->pps_seq_parameter_set_id;
}
bool hevc_get_picture_size( const hevc_sequence_parameter_set_t *p_sps,
unsigned *p_w, unsigned *p_h, unsigned *p_vw, unsigned *p_vh )
{

4
modules/packetizer/hevc_nal.h

@ -165,6 +165,10 @@ void hevc_rbsp_release_sps( hevc_sequence_parameter_set_t * );
void hevc_rbsp_release_pps( hevc_picture_parameter_set_t * );
void hevc_rbsp_release_slice_header( hevc_slice_segment_header_t * );
/* set specific */
uint8_t hevc_get_sps_vps_id( const hevc_sequence_parameter_set_t * );
uint8_t hevc_get_pps_sps_id( const hevc_picture_parameter_set_t * );
/* Converts HEVCDecoderConfigurationRecord to Annex B format */
uint8_t * hevc_hvcC_to_AnnexB_NAL( const uint8_t *p_buf, size_t i_buf,
size_t *pi_res, uint8_t *pi_nal_length_size );

Loading…
Cancel
Save