UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
Loading...
Searching...
No Matches
rtpdec_h264.h
Go to the documentation of this file.
1/*
2 * AUTHOR: David Cassany <david.cassany@i2cat.net>,
3 * Ignacio Contreras <ignacio.contreras@i2cat.net>,
4 * Gerard Castillo <gerard.castillo@i2cat.net>
5 *
6 * Copyright (c) 2013-2014 Fundació i2CAT, Internet I Innovació Digital a Catalunya
7 * Copyright (c) 2015-2024 CESNET
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, is permitted provided that the following conditions
11 * are met:
12 *
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 *
16 * 2. Redistributions in binary form must reproduce the above copyright
17 * notice, this list of conditions and the following disclaimer in the
18 * documentation and/or other materials provided with the distribution.
19 *
20 * 3. All advertising materials mentioning features or use of this software
21 * must display the following acknowledgement:
22 *
23 * This product includes software developed by the University of Southern
24 * California Information Sciences Institute.
25 *
26 * 4. Neither the name of the University nor of the Institute may be used
27 * to endorse or promote products derived from this software without
28 * specific prior written permission.
29 *
30 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS
31 * "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
32 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
33 * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
34 * EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
35 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
36 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
40 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
41 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 *
43 */
44
45#ifndef _RTP_DEC_H264_H
46#define _RTP_DEC_H264_H
47
48#ifdef __cplusplus
49extern "C" {
50#endif
51
52enum {
55};
56
71
81
82struct coded_data;
83struct decode_data_rtsp;
84struct video_desc;
85
86#define H264_NALU_HDR_GET_TYPE(nal) ((nal) & 0x1F)
87#define H264_NALU_HDR_GET_NRI(nal) (((nal) & 0x60) >> 5)
88#define NALU_HDR_GET_TYPE(nal, is_hevc) \
89 ((is_hevc) ? (nal) >> 1 : H264_NALU_HDR_GET_TYPE((nal)))
90
91int decode_frame_h264(struct coded_data *cdata, void *decode_data);
92struct video_frame *get_sps_pps_frame(const struct video_desc *desc,
93 struct decode_data_rtsp *decode_data);
94int width_height_from_SDP(int *widthOut, int *heightOut , unsigned char *data, int data_len);
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif
struct video_desc desc
int width_height_from_SDP(int *widthOut, int *heightOut, unsigned char *data, int data_len)
aux_nal_types
NAL values >23 are invalid in H.264 codestream but used by RTP.
Definition rtpdec_h264.h:73
@ RTP_MTAP16
Definition rtpdec_h264.h:76
@ RTP_STAP_B
Definition rtpdec_h264.h:75
@ RTP_MTAP24
Definition rtpdec_h264.h:77
@ RTP_FU_B
Definition rtpdec_h264.h:79
@ RTP_FU_A
Definition rtpdec_h264.h:78
@ RTP_STAP_A
Definition rtpdec_h264.h:74
int decode_frame_h264(struct coded_data *cdata, void *decode_data)
@ NAL_H264_MAX
Definition rtpdec_h264.h:54
@ NAL_H264_MIN
Definition rtpdec_h264.h:53
nal_type
Definition rtpdec_h264.h:57
@ NAL_H264_AUD
Definition rtpdec_h264.h:64
@ NAL_HEVC_SPS
Definition rtpdec_h264.h:67
@ NAL_HEVC_PPS
Definition rtpdec_h264.h:68
@ NAL_H264_NON_IDR
Definition rtpdec_h264.h:59
@ NAL_H264_PPS
Definition rtpdec_h264.h:63
@ NAL_H264_IDR
Definition rtpdec_h264.h:60
@ NAL_H264_SPS
Definition rtpdec_h264.h:62
@ NAL_HEVC_AUD
Definition rtpdec_h264.h:69
@ NAL_HEVC_VPS
Definition rtpdec_h264.h:66
@ NAL_H264_SEI
Definition rtpdec_h264.h:61
struct video_frame * get_sps_pps_frame(const struct video_desc *desc, struct decode_data_rtsp *decode_data)
Struct video_frame represents a video frame and contains video description.
Definition types.h:305