2 * Copyright (C) <2006> Wim Taymans <wim.taymans@gmail.com>
3 * Copyright (C) <2014> Jurgen Slowack <jurgenslowack@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_RTP_H265_DEPAY_H__
22 #define __GST_RTP_H265_DEPAY_H__
25 #include <gst/base/gstadapter.h>
26 #include <gst/rtp/gstrtpbasedepayload.h>
27 #include "gstrtph265types.h"
30 #define GST_TYPE_RTP_H265_DEPAY \
31 (gst_rtp_h265_depay_get_type())
32 #define GST_RTP_H265_DEPAY(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RTP_H265_DEPAY,GstRtpH265Depay))
34 #define GST_RTP_H265_DEPAY_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RTP_H265_DEPAY,GstRtpH265DepayClass))
36 #define GST_IS_RTP_H265_DEPAY(obj) \
37 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RTP_H265_DEPAY))
38 #define GST_IS_RTP_H265_DEPAY_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RTP_H265_DEPAY))
40 typedef struct _GstRtpH265Depay GstRtpH265Depay;
41 typedef struct _GstRtpH265DepayClass GstRtpH265DepayClass;
43 #define GST_H265_VPS_NUT 32
44 #define GST_H265_SPS_NUT 33
45 #define GST_H265_PPS_NUT 34
49 GST_H265_STREAM_FORMAT_UNKNOWN,
50 GST_H265_STREAM_FORMAT_BYTESTREAM,
51 GST_H265_STREAM_FORMAT_HVC1,
52 GST_H265_STREAM_FORMAT_HEV1
53 } GstH265StreamFormat;
55 struct _GstRtpH265Depay
57 GstRTPBaseDepayload depayload;
62 GstBuffer *codec_data;
68 GstAdapter *picture_adapter;
69 gboolean picture_start;
71 gboolean last_keyframe;
73 /* Work around broken payloaders wrt. Fragmentation Units */
74 guint8 current_fu_type;
75 GstClockTime fu_timestamp;
82 gboolean new_codec_data;
84 /* downstream allocator */
85 GstAllocator *allocator;
86 GstAllocationParams params;
89 struct _GstRtpH265DepayClass
91 GstRTPBaseDepayloadClass parent_class;
107 GType gst_rtp_h265_depay_get_type (void);
109 gboolean gst_rtp_h265_depay_plugin_init (GstPlugin * plugin);
111 gboolean gst_rtp_h265_add_vps_sps_pps (GstElement * rtph265, GPtrArray * vps,
112 GPtrArray * sps, GPtrArray * pps, GstBuffer * nal);
115 #endif /* __GST_RTP_H265_DEPAY_H__ */