7¤0ì²Ýõ,>°’X0Ã0Ã0Ã0À°ˆH)šˆ'† KdihC�Ý\m‘v†�[4²¡US[D<¸üóhp$3 ÊD‘8 R†å€ �‘Š ’ÍD"q0Š9Ã(Š‚ d�Q„ª‘   ´×EEÌ)d                   ULKAN_PHYSICAL_DEVICE_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GST_TYPE_VULKAN_PHYSICAL_DEVICE, GstVulkanPhysicalDeviceClass))
#define GST_IS_VULKAN_PHYSICAL_DEVICE(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_VULKAN_PHYSICAL_DEVICE))
#define GST_IS_VULKAN_PHYSICAL_DEVICE_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_PHYSICAL_DEVICE))
#define GST_VULKAN_PHYSICAL_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_PHYSICAL_DEVICE, GstVulkanPhysicalDeviceClass))
GST_VULKAN_API
GType gst_vulkan_physical_device_get_type       (void);

/**
 * GstVulkanQueueFamilyOps:
 * @video: video operation supported by queue family
 * @query_result_status: if queue family supports result status queries
 *
 * Since: 1.24
 */
san allow_intrabc;
  gboolean frame_refs_short_signaling;
  gint8 last_frame_idx;
  gint8 gold_frame_idx;
  gint8 ref_frame_idx[GST_AV1_REFS_PER_FRAME];
  gboolean allow_high_precision_mv;
  gboolean is_motion_mode_switchable;
  gboolean use_ref_frame_mvs;
  gboolean disable_frame_end_update_cdf;
  gboolean allow_warped_motion;
  gboolean reduced_tx_set;
  gboolean render_and_frame_size_different;
  gboolean use_superres;
  gboolean is_filter_switchable;
  GstAV1InterpolationFilter interpolation_filter;
  GstAV1LoopFilterParams loop_filter_params;
  GstAV1QuantizationParams quantization_params;
  GstAV1SegmenationParams segmentation_params;
  GstAV1TileInfo tile_info;
  GstAV1CDEFParams cdef_params;
  GstAV1LoopRestorationParams loop_restoration_params;
  gboolean tx_mode_select;
  gboolean skip_mode_present;
  gboolean reference_select;
  GstAV1GlobalMotionParams global_motion_params;
  GstAV1FilmGrainParams film_grain_params;

  /* Global vars set by frame header */
  guint32 superres_denom; /* SuperresDenom */
  guint8 frame_is_intra; /* FrameIsIntra */
  guint32 order_hints[GST_AV1_NUM_REF_FRAMES]; /* OrderHints */
  guint32 ref_frame_sign_bias[GST_AV1_NUM_REF_FRAMES]; /* RefFrameSignBias */

  guint8 coded_lossless; /* CodedLossless */
  guint8 all_lossless; /* AllLossless */
  guint8 lossless_array[GST_AV1_MAX_SEGMENTS]; /* LosslessArray */
  guint8 seg_qm_Level[3][GST_AV1_MAX_SEGMENTS]; /* SegQMLevel */

  guint32 upscaled_width; /* UpscaledWidth */
  guint32 frame_width; /* FrameWidth */
  guint32 frame_height; /* FrameHeight */
  guint32 render_width;  /* RenderWidth */
  guint32 render_height; /* RenderHeight */

  GstAV1TXModes tx_mode; /* TxMode */

  guint8 skip_mode_frame[2]; /* SkipModeFrame */

  /**
   * _GstAV1FrameHeaderOBU.expected_frame_id:
   *
   * Specifies the frames to use for compound prediction.
   *
   * Since: 1.24
   */
  gint32 expected_frame_id[GST_AV1_REFS_PER_FRAME];

  /**
   * _GstAV1FrameHeaderOBU.ref_global_motion_params:
   *_cr_points is less than or equal to 10. If subsampling_x is equal to 1 and
 *   @subsampling_y is equal to 1 and num_cb_points is equal to 0, it is a requirement of
 *   bitstream conformance that num_cr_points is equal to 0. If @subsampling_x is equal to 1
 *   and @subsampling_y is equal to 1 and @num_cb_points is not equal to 0, it is a requirement
 *   of bitstream conformance that @num_cr_points is not equal to 0.
 * @point_cr_value: represents the x coordinate for the i-th point of the piece-wise linear
 *   scaling function for cr component. The values are signaled on the scale of 0..255. If i
 *   is greater than 0, it is a requirement of bitstream conformance that @point_cr_value[ i ]
 *   is greater than @point_cr_value[ i - 1 ].
 * @point_cr_scaling: represents the scaling (output) value for the i-th point of the
 *   piecewise linear scaling function for cr component.
 * @grain_scaling_minus_8: represents the shift - 8 applied to the values of the chroma
 *   component. The @grain_scaling_minus_8 can take values of 0..3 and determines the range and
 *   quantization step of the standard deviation of film grain.
 * @ar_coeff_lag: specifies the number of auto-regressive coefficients for luma and chroma.
 * @ar_coeffs_y_plus_128: specifies auto-regressive coefficients used for the Y plane.
 * @ar_coeffs_cb_plus_128: specifies auto-regressive coefficients used for the U plane.
 * @ar_coeffs_cr_plus_128: specifies auto-regressive coefficients used for the V plane.
 * @ar_coeff_shift_minus_6: specifies the range of the auto-regressive coefficients. Values
 *   of 0, 1, 2, and 3 correspond to the ranges for auto-regressive coefficients of [-2, 2),
 *   [-1, 1), [-0.5, 0.5) and [-0.25, 0.25) respectively.
 * @grain_scale_shift: specifies how much the Gaussian random numbers should be scaled down
 *   during the grain synthesis process.
 * @cb_mult: represents a multiplier for the cb component used in derivation of the input
 *   index to the cb component scaliard in the video sequence. Note that
 *   for a given picture, all frames follow the same inter-picture temporal dependency
 *   structure. However, the frame rate of each layer can be different from each other. The
 *   specified dependency structure in the scalability structure data must be for the highest
 *   frame rate layer.
 * @temporal_group_temporal_id: specifies the temporal_id value for the i-th picture in
 *   the temporal group.
 * @temporal_group_temporal_switching_up_point_flag: is set to 1 if subsequent (in decoding
 *   order) pictures with a @temporal_id higher than @temporal_group_temporal_id[i] do not
 *   depend on any picture preceding the current picture (in coding order) with @temporal_id
 *   higher than @temporal_group_temporal_id[ i ].
 * @temporal_group_spatial_switching_up_point_flag: is set to 1 if spatial layers of the
 *   current picture in the temporal group (i.e., pictures with a spatial_id higher than zero)
 *   do not depend on any picture preceding the current picture in the temporal group.
 * @temporal_group_ref_cnt: indicates the number of reference pictures used by the i-th
 *   picture in the temporal group.
 * @temporal_group_ref_pic_diff: indicates, for the i-th picture in the temporal group,
 *   the temporal distance between the i-th picture and the j-th reference picture used by
 *   the i-th picture. The temporal distance is measured in frames, counting only frames of
 *   identical @spatial_id values.
 *
 * The scalability metadata OBU is intended for use by intermediate
 * processing entities that may perform selective layer elimination.
 */
struct _GstAV1MetadataScalability {
  GstAV1ScalabilityModes scalability_mode_idc;
  guint8 spatial_layers_cnt_minus_1;
  gboolean spatial_layer_dimensions_present_flag;
  gboolean spatial_layer_description_present_flag;
  gboolean temporal_group_description_present_flag;
  guint16 spatial_layer_max_width[GST_AV1_MAX_NUM_SPATIAL_LAYERS];
  guint16 spatial_layer_max_height[GST_Aits header and payload.
 */
struct _GstAV1OBU {
  GstAV1OBUHeader header;
  GstAV1OBUType obu_type;
  guint8 *data;
  guint32 obu_size;
};

/**
 * GstAV1OperatingPoint:
 * @seq_level_idx: specifies the level that the coded video sequence conforms to.
 * @seq_tier: specifies the tier that the coded video sequence conforms to.
 * @idc: contains a bitmask that indicates which spatial and temporal layers should be
 *   decoded. Bit k is equal to 1 if temporal layer k should be decoded (for k between
 *   0 and 7). Bit j+8 is equal to 1 if spatial layer j should be decoded (for j between
 *   0 and 3).
 * @decoder_model_present_for_this_op: equal to one indicates that there is a decoder model
 *   associated with this operating point. @decoder_model_present_for_this_op equal to zero
 *   indicates that there is not a decoder model associated.
 * @decoder_buffer_delay: specifies the time interval between the arrival of the first bit
 *   in the smoothing buffer and the subsequent removal of the data that belongs to the
 *   first coded frame for operating point op, measured in units of 1/90000 seconds. The
 *   length of @decoder_buffer_delay is specified by @buffer_delay_length_minus_1 + 1, in bits.
 * @encoder_buffer_delay: specifies, in combination with @decoder_buffer_delay syntax element,
 *   the first bit arrival time of frames to be decoded to the smoothing buffer.
 *   @encoder_buffer_delay is measured in units of 1/90000 seconds. For a video sequence that
 *   includes one or more random access points the sum of @decoder_buffer_delay and
 *   @encoder_buffer_delay shall be kept constant.
 * @low_delay_mode_flag: equal to 1 indicates that the smoothing buffer operates in low-delay
 *   mode for operating point op. In low-delay mode late decode times and buffer underflow
 *   are both permitted. @low_delay_mode_flag equal to 0 indicates that the smoothing buffer
 *   operates in strict mode, where buffer underflow is not allowed.
 * @initial_display_delay_presenTYPE((klass),GST_TYPE_BASE_CAMERA_SRC))
#define GST_BASE_CAMERA_SRC_CAST(obj) \
  ((GstBaseCameraSrc *) (obj))
GST_BASE_CAMERA_BIN_SRC_API
GType gst_base_camera_src_get_type (void);

typedef struct _GstBaseCameraSrc GstBaseCameraSrc;
typedef struct _GstBaseCameraSrcClass GstBaseCameraSrcClass;

#define GST_BASE_CAMERA_SRC_VIEWFINDER_PAD_NAME "vfsrc"
#define GST_BASE_CAMERA_SRC_IMAGE_PAD_NAME "imgsrc"
#define GST_BASE_CAMERA_SRC_VIDEO_PAD_NAME "vidsrc"

#define GST_BASE_CAMERA_SRC_PREVIEW_MESSAGE_NAME "preview-image"

/**
 * GstBaseCameraSrc:
 */
struct _GstBaseCameraSrc
{
  GstBin parent;

  GstCameraBinMode mode;

  gboolean auto_start;
  gboolean capturing;
  GMutex capturing_mutex;

  /* Preview convert pipeline */
  GstCaps *preview_caps;
  gboolean post_preview;
  GstElement *preview_filter;
  GstCameraBinPreviewPipelineData *preview_pipeline;

  /* Resolution of the buffers configured to camerabin */
  gint width;
  gint height;

  gfloat zoom;
  gfloat max_zoom;

  gpointer _gst_reserved[GST_PADDING_LARGE];
};


/**
 * GstBaseCameraSrcClass:
 * @construct_pipeline: construct pipeline
 * @setup_pipeline: configure pipeline for the chosen settings
 * @set_zoom: set the zoom
 * @set_mode: set the mode
 */
struct _GstBaseCameraSrcClass
{
  GstBinClass parent;

  /* Construct pipeline. (called in GST_STATE_CHANGE_NULL_TO_READY) Optional. */
  gboolean    (*construct_pipeline)  (GstBaseCameraSrc *self);

  /* (called in GST_STATE_CHANGE_READY_TO_PAUSED). Optional. */
  gboolean    (*setup_pipeline)      (GstBaseCameraSrc *self);

  /* Set the zoom. If set, called when changing 'zoom' property. Optional. */
  void        (*set_zoom)            (GstBaseCameraSrc *self, gfloat zoom);

  /* Set the mode. If set, called when changing 'mode' property. Optional. */
  gboolean    (*set_mode)            (GstBaseCameraSrc *self,
                                      GstCameraBinMode mode);

  /* Set preview caps. If set, called called when setting new 'preview-caps'. Optio;
#define GST_TYPE_WEBRTC_SIGNALING_STATE (gst_webrtc_signaling_state_get_type())

GST_WEBRTC_API
GType gst_webrtc_peer_connection_state_get_type (void);
#define GST_TYPE_WEBRTC_PEER_CONNECTION_STATE (gst_webrtc_peer_connection_state_get_type())

GST_WEBRTC_API
GType gst_webrtc_ice_role_get_type (void);
#define GST_TYPE_WEBRTC_ICE_ROLE (gst_webrtc_ice_role_get_type())

GST_WEBRTC_API
GType gst_webrtc_ice_component_get_type (void);
#define GST_TYPE_WEBRTC_ICE_COMPONENT (gst_webrtc_ice_component_get_type())

GST_WEBRTC_API
GType gst_webrtc_sdp_type_get_type (void);
#define GST_TYPE_WEBRTC_SDP_TYPE (gst_webrtc_sdp_type_get_type())

GST_WEBRTC_API
GType gst_webrtc_rtp_transceiver_direction_get_type (void);
#define GST_TYPE_WEBRTC_RTP_TRANSCEIVER_DIRECTION (gst_webrtc_rtp_transceiver_direction_get_type())

GST_WEBRTC_API
GType gst_webrtc_dtls_setup_get_type (void);
#define GST_TYPE_WEBRTC_DTLS_SETUP (gst_webrtc_dtls_setup_get_type())

GST_WEBRTC_API
GType gst_webrtc_stats_type_get_type (void);
#define GST_TYPE_WEBRTC_STATS_TYPE (gst_webrtc_stats_type_get_type())

GST_WEBRTC_API
GType gst_webrtc_fec_type_get_type (void);
#define GST_TYPE_WEBRTC_FEC_TYPE (gst_webrtc_fec_type_get_type())

GST_WEBRTC_API
GType gst_webrtc_sctp_transport_state_get_type (void);
#define GST_TYPE_WEBRTC_SCTP_TRANSPORT_STATE (gst_webrtc_sctp_transport_state_get_type())

GST_WEBRTC_API
GType gst_webrtc_priority_type_get_type (void);
#define GST_TYPE_WEBRTC_PRIORITY_TYPE (gst_webrtc_priority_type_get_type())

GST_WEBRTC_API
GType gst_webrtc_data_channel_state_get_type (void);
#define GST_TYPE_WEBRTC_DATA_CHANNEL_STATE (gst_webrtc_data_channel_state_get_type())

GST_WEBRTC_API
GType gst_webrtc_bundle_policy_get_type (void);
#define GST_TYPE_WEBRTC_BUNDLE_POLICY (gst_webrtc_bundle_policy_get_type())

GST_WEBRTC_API
GType gst_webrtc_ice_transport_policy_get_type (void);
#define GST_TYPE_WEBRTC_ICE_TRANSPORT_POLICY (gst_webrtc_ice_transport_policy_get_type())

GST_WEBRTC_API
GType gst_webrtc_kind_get_          (GstPlayerError error);

GST_PLAYER_API
GType gst_player_color_balance_type_get_type          (void);
#define GST_TYPE_PLAYER_COLOR_BALANCE_TYPE            (gst_player_color_balance_type_get_type ())

/**
 * GstPlayerColorBalanceType:
 * @GST_PLAYER_COLOR_BALANCE_BRIGHTNESS: brightness or black level.
 * @GST_PLAYER_COLOR_BALANCE_CONTRAST: contrast or luma gain.
 * @GST_PLAYER_COLOR_BALANCE_SATURATION: color saturation or chroma
 * gain.
 * @GST_PLAYER_COLOR_BALANCE_HUE: hue or color balance.
 */
typedef enum
{
  GST_PLAYER_COLOR_BALANCE_BRIGHTNESS,
  GST_PLAYER_COLOR_BALANCE_CONTRAST,
  GST_PLAYER_COLOR_BALANCE_SATURATION,
  GST_PLAYER_COLOR_BALANCE_HUE,
} GstPlayerColorBalanceType;

GST_PLAYER_API
const gchar *gst_player_color_balance_type_get_name   (GstPlayerColorBalanceType type);

#define GST_TYPE_PLAYER             (gst_player_get_type ())
#define GST_IS_PLAYER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_PLAYER))
#define GST_IS_PLAYER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_PLAYER))
#define GST_PLAYER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_PLAYER, GstPlayerClass))
#define GST_PLAYER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_PLAYER, GstPlayer))
#define GST_PLAYER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_PLAYER, GstPlayerClass))
#define GST_PLAYER_CAST(obj)        ((GstPlayer*)(obj))

#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlayer, gst_object_unref)
#endif

GST_PLAYER_API
GType        gst_player_get_type                      (void);

GST_PLAYER_API
GstPlayer *  gst_player_new                           (GstPlayerVideoRenderer * video_renderer, GstPlayerSignalDispatcher * signal_dispatcher);

GST_PLAYER_API
void         gst_player_play                          (GstPlayer    * player);

GST_PLAYER_API
void         gst_player_pause                         (GstPlayer    * player);

GST_PLAYER_API
void         gst_player_stop       of mpeg-ts streams for Blu-ray formats. To be matched with the
 * stream-type of a #GstMpegtsSection.
 *
 * Since: 1.20
 */
typedef enum {
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_LPCM = 0x80,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_AC3 = 0x81,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_DTS = 0x82,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_AC3_TRUE_HD = 0x83,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_AC3_PLUS = 0x84,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_DTS_HD = 0x85,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_DTS_HD_MASTER_AUDIO = 0x86,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_EAC3 = 0x87,
  GST_MPEGTS_STREAM_TYPE_HDMV_SUBPICTURE_PGS = 0x90,
  GST_MPEGTS_STREAM_TYPE_HDMV_IGS = 0x91,
  GST_MPEGTS_STREAM_TYPE_HDMV_SUBTITLE = 0x92,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_AC3_PLUS_SECONDARY = 0xa1,
  GST_MPEGTS_STREAM_TYPE_HDMV_AUDIO_DTS_HD_SECONDARY = 0xa2,
} GstMpegtsHdmvStreamType;

G_END_DECLS

#endif  /* GST_HDMV_SECTION_H */

/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */

#pragma once

#include <glib-object.h>
#include <gst/mse/mse-prelude.h>

G_BEGIN_DECLS

/* enumerations from "gstmediasource.h" */

GST_MSE_API
GType gst_media_source_ready_state_get_type (void);
#define GST_TYPE_MEDIA_SOURCE_READY_STATE (gst_media_source_ready_state_get_type())

GST_MSE_API
GType gst_media_source_error_get_type (void);
#define GST_TYPE_MEDIA_SOURCE_ERROR (gst_media_source_error_get_type())

GST_MSE_API
GType gst_media_source_eos_error_get_type (void);
#define GST_TYPE_MEDIA_SOURCE_EOS_ERROR (gst_media_source_eos_error_get_type())

/* enumerations from "gstmsesrc.h" */

GST_MSE_API
GType gst_mse_src_ready_state_get_type (void);
#define GST_TYPE_MSE_SRC_READY_STATE (gst_mse_src_ready_state_get_type())

/* enumerations from "gstsourcebuffer.h" */

GST_MSE_API
GType gst_source_buffer_append_mode_get_type (void);
#define GST_TYPE_SOURCE_BUFFER_APPEND_MODE (gst_sou
#define GST_NONSTREAM_AUDIO_DECODER_UNLOCK_MUTEX(obj)    g_mutex_unlock(&(((GstNonstreamAudioDecoder *)(obj))->mutex))


/**
 * GstNonstreamAudioDecoder:
 *
 * The opaque #GstNonstreamAudioDecoder data structure.
 */
struct _GstNonstreamAudioDecoder
{
  GstElement element;

  /*< protected > */

  /* source and sink pads */
  GstPad *sinkpad, *srcpad;

  /* loading information */
  gint64 upstream_size;
  gboolean loaded_mode;
  GstAdapter *input_data_adapter;

  /* subsong states */
  guint current_subsong;
  GstNonstreamAudioSubsongMode subsong_mode;
  GstClockTime subsong_duration;

  /* output states */
  GstNonstreamAudioOutputMode output_mode;
  gint num_loops;
  gboolean output_format_changed;
  GstAudioInfo output_audio_info;
  /* The difference between these two values is: cur_pos_in_samples is
   * used for the GstBuffer offsets, while num_decoded_samples is used
   * for the segment base time values.
   * cur_pos_in_samples is reset after seeking, looping (when output mode
   * is LOOPING) and switching subsongs, while num_decoded is only reset
   * to 0 after a flushing seek (because flushing seeks alter the
   * pipeline's base_time). */
  guint64 cur_pos_in_samples, num_decoded_samples;
  GstSegment cur_segment;
  gboolean discont;

  /* metadata */
  GstToc *toc;

  /* allocation */
  GstAllocator *allocator;
  GstAllocationParams allocation_params;

  /* thread safety */
  GMutex mutex;
};


/**
 * GstNonstreamAudioDecoderClass:
 * @element_class:              The parent class structure
 * @seek:                       Optional.
 *                              Called when a seek event is received by the parent class.
 *                              new_position is a pointer to a GstClockTime integer which
 *                              contains a position relative to the current subsong.
 *                              Minimum is 0, maximum is the subsong length.
 *                              After this function finishes, new_position is set to *
 * Each probability value in thie structure is live across frames,
 * until they are reset to their default values on key frame.
 */
struct _GstVp8ModeProbs
{
  guint8 y_prob[4];
  guint8 uv_prob[3];
};

/**
 * GstVp8FrameHdr:
 * @key_frame: indicates whether the frame is a key frame (1), or an
 *   inter frame (0)
 * @version: version number
 * @show_frame: indicates whether the frame is meant to be displayed (1),
 *   or not (0)
 * @data_chunk_size: the size in bytes of the Uncompressed Data Chunk
 * @first_part_size: the size in bytes of the first partition (control
 *   partition), excluding the uncompressed data chunk
 * @width: the frame width in pixels
 * @height: the frame height in pixels
 * @horiz_scale_code: horizontal scale code value
 * @vert_scale_code: vertical scale code value
 * @color_space: defines the YUV color space of the sequence
 * @clamping_type: specifies if the decoder is required to clamp the
 *   reconstructed pixel values
 * @filter_type: determines whether the normal or the simple loop
 *   filter is used
 * @loop_filter_level: controls the deblocking filter
 * @sharpness_level: controls the deblocking filter
 * @log2_nbr_of_dct_partitions: determines the number of separate
 *   partitions containing the DCT coefficients of the macroblocks
 * @partition_size: determines the size of each separate partition
 *   containing the DCT coefficients of the macroblocks, including the
 *   very last one (calculated size)
 * @quant_indices: dequantization indices (see #GstVp8QuantIndices)
 * @token_probs: token probabilities (see #GstVp8TokenProbs)
 * @mv_probs: probabilities used for motion vector decoding
 *   (see #GstVp8MvProbs)
 * @mode_probs: probabilities used for intra-prediction mode decoding
 *   tree (see #GstVp8ModeProbs)
 * @refresh_entropy_probs: determines whether updated token
 *   probabilities are used only for this frame or until further update
 * @refresh_golden_frame: determines if the current decoded frame
 *   refresheserscore_name=gst_webrtc_stats_type >*/
{
  GST_WEBRTC_STATS_CODEC = 1,
  GST_WEBRTC_STATS_INBOUND_RTP,
  GST_WEBRTC_STATS_OUTBOUND_RTP,
  GST_WEBRTC_STATS_REMOTE_INBOUND_RTP,
  GST_WEBRTC_STATS_REMOTE_OUTBOUND_RTP,
  GST_WEBRTC_STATS_CSRC,
  GST_WEBRTC_STATS_PEER_CONNECTION,
  GST_WEBRTC_STATS_DATA_CHANNEL,
  GST_WEBRTC_STATS_STREAM,
  GST_WEBRTC_STATS_TRANSPORT,
  GST_WEBRTC_STATS_CANDIDATE_PAIR,
  GST_WEBRTC_STATS_LOCAL_CANDIDATE,
  GST_WEBRTC_STATS_REMOTE_CANDIDATE,
  GST_WEBRTC_STATS_CERTIFICATE,
} GstWebRTCStatsType;

/**
 * GstWebRTCFECType:
 * @GST_WEBRTC_FEC_TYPE_NONE: none
 * @GST_WEBRTC_FEC_TYPE_ULP_RED: ulpfec + red
 *
 * Since: 1.14.1
 */
typedef enum /*< underscore_name=gst_webrtc_fec_type >*/
{
  GST_WEBRTC_FEC_TYPE_NONE,
  GST_WEBRTC_FEC_TYPE_ULP_RED,
} GstWebRTCFECType;

/**
 * GstWebRTCSCTPTransportState:
 * @GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW: new
 * @GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING: connecting
 * @GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED: connected
 * @GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED: closed
 *
 * See <http://w3c.github.io/webrtc-pc/#dom-rtcsctptransportstate>
 *
 * Since: 1.16
 */
typedef enum /*< underscore_name=gst_webrtc_sctp_transport_state >*/
{
  GST_WEBRTC_SCTP_TRANSPORT_STATE_NEW,
  GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTING,
  GST_WEBRTC_SCTP_TRANSPORT_STATE_CONNECTED,
  GST_WEBRTC_SCTP_TRANSPORT_STATE_CLOSED,
} GstWebRTCSCTPTransportState;

/**
 * GstWebRTCPriorityType:
 * @GST_WEBRTC_PRIORITY_TYPE_VERY_LOW: very-low
 * @GST_WEBRTC_PRIORITY_TYPE_LOW: low
 * @GST_WEBRTC_PRIORITY_TYPE_MEDIUM: medium
 * @GST_WEBRTC_PRIORITY_TYPE_HIGH: high
 *
 * See <http://w3c.github.io/webrtc-pc/#dom-rtcprioritytype>
 *
 * Since: 1.16
 */
typedef enum /*< underscore_name=gst_webrtc_priority_type >*/
{
  GST_WEBRTC_PRIORITY_TYPE_VERY_LOW = 1,
  GST_WEBRTC_PRIORITY_TYPE_LOW,
  GST_WEBRTC_PRIORITY_TYPE_MEDIUM,
  GST_WEBRTC_PRIORITY_TYPE_HIGH,
} GstWebRTCPriorityType;

/**
 * GstWebRTCDataChannelState:
 * @GST_WEBRTC_DATA_CHANNEL_STATE_ the Cr colour
 *  component of the current slice.
 * @alf_aps_id_chroma: specifies the aps_adaptation_parameter_set_id of the ALF
 *  APS that the chroma component of the slice refers to.
 * @alf_cc_cb_enabled_flag: specifies whether CCALF is enabled for the Cb
 *  colour component.
 * @alf_cc_cb_aps_id: specifies the aps_adaptation_parameter_set_id that the Cb
 *  colour component of the slice refers to.
 * @alf_cc_cr_enabled_flag: specifies whether CCALF is enabled for the Cr
 *  colour component of the current slice.
 * @alf_cc_cr_aps_id: specifies the aps_adaptation_parameter_set_id that the Cr
 *  colour component of the slice refers to.
 * @lmcs_used_flag: specifies that luma mapping is used for the current slice
 *  and chroma scaling could be used for the current slice.
 * @explicit_scaling_list_used_flag: specifies that the explicit scaling list
 *  is used in the scaling process for transform coefficients.
 * @ref_pic_lists: reference pictures lists of #GstH266RefPicLists.
 * @num_ref_idx_active_override_flag: specifies whether the syntax element
 *  sh_num_ref_idx_active_minus1[0] is present for P and B slices.
 * @num_ref_idx_active_minus1: is used for the derivation of the variable
 *  NumRefIdxActive[i].
 * @num_ref_idx_active: the calculated NumRefIdxActive value.
 * @cabac_init_flag: specifies the method for determining the initialization
 *  table used in the initialization process for context variables.
 * @collocated_from_l0_flag: specifies whether the collocated picture used for
 *  temporal motion vector prediction is derived from RPL 0.
 * @collocated_ref_idx: specifies the reference index of the collocated picture
 *  used for temporal motion vector prediction.
 * @pred_weight_table: prediction weight table of #GstH266PredWeightTable.
 * @qp_base: the qp base of the current slice.
 * @qp_delta: specifies the initial value of QpY to be used for the coding
 *  blocks in the slice.
 * @cb_qp_offset: specifies a difference to be added to the vather the APS NAL unit could include
 *  chroma related syntax elements.
 * @alf: ALF parameters of #GstH266ALF when params_type is GST_H266_ALF_APS.
 * @lmcs: LMCS parameters of #GstH266LMCS when params_type is GST_H266_LMCS_APS.
 * @sl: scaling list parameters of #GstH266ScalingList when params_type is
 *  GST_H266_SCALING_APS.
 * @extension_flag: specifies whether aps_extension_data_flag syntax elements
 *  are present.
 * @extension_data_flag: could have any value and do not affect the decoding
 *  process now.
 * @valid: whether this APS is valid.
 *
 * Since: 1.26
 */
struct _GstH266APS
{
  GstH266APSType params_type;
  guint8 aps_id;
  guint8 chroma_present_flag;

  union {
    GstH266ALF alf;
    GstH266LMCS lmcs;
    GstH266ScalingList sl;
  };

  guint8 extension_flag;
  guint8 extension_data_flag;
  gboolean valid;
};

/**
 * GstH266PredWeightTable:
 *
 * Structure defining the H266 weight table parameters.
 *
 * @luma_log2_weight_denom: the base 2 logarithm of the denominator for all
 *  luma weighting factors.
 * @delta_chroma_log2_weight_denom: the difference of the base 2 logarithm of
 *  the denominator for all chroma weighting factors.
 * @num_l0_weights: specifies the number of weights signalled for entries in
 *  RPL 0 when pps_wp_info_in_ph_flag is equal to 1.
 * @luma_weight_l0_flag: specifies whether weighting factors for the luma
 *  component of list 0 prediction using RefPicList[0][i] are present.
 * @chroma_weight_l0_flag: specifies whether weighting factors for the chroma
 *  prediction values of list 0 prediction using RefPicList[0][i] are present.
 * @delta_luma_weight_l0: the difference of the weighting factor applied to the
 *  luma prediction value for list 0 prediction using RefPicList[0][i].
 * @luma_offset_l0: the additive offset applied to the luma prediction value
 *  for list 0 prediction using RefPicList[0][i].
 * @delta_chroma_weight_l0: the difference of the weighting factor applied to
 *  the chroma prediction values for lifies whether
 *  pps_joint_cbcr_qp_offset_value and pps_joint_cbcr_qp_offset_list[i] are
 *  present in the PPS.
 * @joint_cbcr_qp_offset_value: specifies the offset to the luma quantization
 *  parameter Qp'Y used for deriving Qp'CbCr.
 * @slice_chroma_qp_offsets_present_flag: specifies whether the sh_cb_qp_offset
 *  and sh_cr_qp_offset syntax elements are present in slice headers.
 * @cu_chroma_qp_offset_list_enabled_flag: specifies whether the
 *  ph_cu_chroma_qp_offset_subdiv_intra_slice and
 *  ph_cu_chroma_qp_offset_subdiv_inter_slice syntax elements are present in PH.
 * @chroma_qp_offset_list_len_minus1: specifies whether number of
 *  pps_cb_qp_offset_list[i], pps_cr_qp_offset_list[i],
 *  and pps_joint_cbcr_qp_offset_list[i], syntax elements that are present.
 * @cb_qp_offset_list: specify offsets used in the derivation of Qp'Cb.
 * @cr_qp_offset_list: specify offsets used in the derivation of Qp'Cr.
 * @joint_cbcr_qp_offset_list: specify offsets used in the derivation of Qp'CbCr.
 * @deblocking_filter_control_present_flag: specifies whether presence of
 *  deblocking filter control syntax elements in the PPS.
 * @deblocking_filter_override_enabled_flag: specifies whether the deblocking
 *  behaviour could be overridden in the picture level or slice level.
 * @deblocking_filter_disabled_flag: specifies whether the deblocking filter is
 *  disabled unless overridden for a picture or slice by information.
 * @dbf_info_in_ph_flag: specifies whether deblocking filter information is
 *  present in the PH syntax structure and not present in slice headers.
 * @luma_beta_offset_div2: specify the default deblocking parameter offsets
 *  for beta that are applied to the luma component.
 * @luma_tc_offset_div2: specify the default deblocking parameter offsets for
 *  tC (divided by 2) that are applied to the luma component.
 * @cb_beta_offset_div2: specify the default deblocking parameter offsets for
 *  beta and that are applied to the Cb component.
 * @cb_tc_offlog2_max_pic_order_cnt_lsb_minus4: specifies the value of the variable
 *  MaxPicOrderCntLsb.
 * @poc_msb_cycle_flag: specifies whether the ph_poc_msb_cycle_present_flag
 *  syntax element is present in PH syntax structures.
 * @poc_msb_cycle_len_minus1: specifies the length, in bits, of the
 *  ph_poc_msb_cycle_val syntax elements.
 * @num_extra_ph_bytes: specifies the number of bytes of extra bits in the PH
 *  syntax structure for coded pictures.
 * @extra_ph_bit_present_flag: specifies whether the i-th extra bit is present
 *  in PH syntax structures.
 * @num_extra_sh_bytes: specifies the number of bytes of extra bits in the
 *  slice headers for coded pictures.
 * @extra_sh_bit_present_flag: specifies whether the i-th extra bit is present
 *  in the slice headers of pictures.
 * @sublayer_dpb_params_flag: used to control the presence of
 *  dpb_max_dec_pic_buffering_minus1[i], dpb_max_num_reorder_pics[i],
 *  and dpb_max_latency_increase_plus1[i] syntax elements in the
 *  dpb_parameters syntax strucure.
 * @log2_min_luma_coding_block_size_minus2: specifies the minimum luma coding
 *  block size.
 * @partition_constraints_override_enabled_flag: specifies the presence of
 *  ph_partition_constraints_override_flag in PH syntax structures.
 * @log2_diff_min_qt_min_cb_intra_slice_luma: specifies the default difference
 *  between the base 2 logarithm of the minimum size in luma samples of a luma
 *  leaf block resulting from quadtree splitting of a CTU and the base 2
 *  logarithm of the minimum coding block size in luma samples.
 * @max_mtt_hierarchy_depth_intra_slice_luma: specifies the default maximum
 *  hierarchy depth for coding units resulting from multi-type tree splitting
 *  of a quadtree leaf in slices with sh_slice_type equal to 2(I).
 * @log2_diff_max_bt_min_qt_intra_slice_luma: specifies the default difference
 *  between the base 2 logarithm of the maximum size in luma samples of a luma
 *  coding block that can be split using a binary split and th
 * GstH266SPS:
 *
 * Structure defining the H266 SPS.
 *
 * @nuh_layer_id: specifies the identifier of the layer to which a VCL NAL unit
 *  belongs or the identifier of a layer to which a non-VCL NAL unit applies.
 * @sps_id: provides an identifier for the SPS for reference by other
 *  syntax elements.
 * @vps_id: specifies the VPS referred to by this SPS.
 * @vps: the #GstH266VPS this SPS refers to.
 * @max_sublayers_minus1: specifies the maximum number of temporal sublayers
 *  that could be present in each CLVS referring to the SPS.
 * @chroma_format_idc: specifies the chroma sampling relative to the
 *  luma sampling.
 * @log2_ctu_size_minus5: specifies the luma coding tree block size of each CTU.
 * @ctu_size: the calculated ctu size.
 * @ptl_dpb_hrd_params_present_flag: specifies whether a profile_tier_level
 *  syntax structure and a dpb_parameters syntax structure are present
 *  in the SPS.
 * @dpb: DPB parameters of #GstH266DPBParameters.
 * @profile_tier_level: the profile tier and level in #GstH266ProfileTierLevel.
 * @general_hrd_params: HRD parameters of #GstH266GeneralHRDParameters.
 * @ols_hrd_params: OLS HRD parameters of #GstH266OLSHRDParameters.
 * @gdr_enabled_flag: specifies whether GDR pictures are enabled and could
 *  be present in the CLVS.
 * @res_change_in_clvs_allowed_flag: specifies whether the picture spatial
 *  resolution might change within a CLVS.
 * @ref_pic_resampling_enabled_flag: specifies whether reference picture
 *  resampling is enabled.
 * @pic_width_max_in_luma_samples: specifies the maximum width, in units of
 *  luma samples, of each decoded picture.
 * @pic_height_max_in_luma_samples: specifies the maximum height, in units of
 *  luma samples, of each decoded picture.
 * @conformance_window_flag: indicates whether the conformance cropping window
 *  offset parameters follow next in the SPS.
 * @conf_win_left_offset: specify left offset of the cropping window that
 *  is applied to pictures.
 * @conf_win_right_offse  guint8 no_explicit_scaling_list_constraint_flag;
  guint8 no_dep_quant_constraint_flag;
  guint8 no_sign_data_hiding_constraint_flag;
  guint8 no_cu_qp_delta_constraint_flag;
  guint8 no_chroma_qp_offset_constraint_flag;
  /* loop fitler */
  guint8 no_sao_constraint_flag;
  guint8 no_alf_constraint_flag;
  guint8 no_ccalf_constraint_flag;
  guint8 no_lmcs_constraint_flag;
  guint8 no_ladf_constraint_flag;
  guint8 no_virtual_boundaries_constraint_flag;
  /* additional bits */
  guint8 all_rap_pictures_constraint_flag;
  guint8 no_extended_precision_processing_constraint_flag;
  guint8 no_ts_residual_coding_rice_constraint_flag;
  guint8 no_rrc_rice_extension_constraint_flag;
  guint8 no_persistent_rice_adaptation_constraint_flag;
  guint8 no_reverse_last_sig_coeff_constraint_flag;
  /* reserved for future use */
  guint8 reserved_zero_bit[64];
};

/**
 * GstH266ProfileTierLevel:
 *
 * Structure defining the H266 profile, tier and level.
 *
 * @profile_idc: the profile id.
 * @tier_flag: specifies the main tier or high tier.
 * @level_idc: indicates a level to which OlsInScope conforms
 *  as specified in Annex A.
 * @frame_only_constraint_flag: specifies whether sps_field_seq_flag for all
 *  pictures in OlsInScope shall be equal to 0.
 * @multilayer_enabled_flag: specifies whether the CVSs of OlsInScope
 *  might contain more than one layer.
 * @general_constraints_info: the #GstH266GeneralConstraintsInfo contains
 *  the general constraints info.
 * @sublayer_level_present_flag: specifies whether level information is present
 *  in the profile_tier_level syntax structure for the sublayer representation.
 * @sublayer_level_idc: the sublayer level idc.
 * @num_sub_profiles: specifies the number of the general_sub_profile_idc[i]
 *  syntax elements.
 * @sub_profile_idc: specifies the i-th interoperability indicator registered
 *  as specified by Rec. ITU-T T.35
 *
 * Since: 1.26
 */
struct _GstH266ProfileTierLevel {
  GstH266Profile profile_idc;
  guint8 tier_flminus1[i] in range [0, 110] */
#define GST_H266_MAX_POINTS_IN_QP_TABLE 111
/* 7.4.6.1: hrd_cpb_cnt_minus1 is in [0, 31]. */
#define GST_H266_MAX_CPB_CNT 32
/* A.4.1: the highest level allows a MaxLumaPs of 35 651 584. */
#define GST_H266_MAX_LUMA_PS 35651584
/* A.4.1: pic_width_in_luma_samples and pic_height_in_luma_samples are
 * constrained to be not greater than sqrt(MaxLumaPs * 8).  Hence height/
 * width are bounded above by sqrt(8 * 35651584) = 16888.2 samples. */
#define GST_H266_MAX_WIDTH 16888
#define GST_H266_MAX_HEIGHT 16888
/* A.4.1: table A.1 allows at most 440 tiles per au for any level. */
#define GST_H266_MAX_TILES_PER_AU 440
/* A.4.1: table A.1 did not define max tile rows. */
/* in worest a case, we can have 1x440 tiles picture. */
#define GST_H266_MAX_TILE_ROWS GST_H266_MAX_TILES_PER_AU
/* A.4.1: table A.1 allows at most 20 tile columns for any level. */
#define GST_H266_MAX_TILE_COLUMNS 20
/* A.4.1 table A.1 allows at most 1000 slice for any level. */
#define GST_H266_MAX_SLICES_PER_AU 1000
/* 7.4.8: in the worst case (!pps_no_pic_partition_flag and
 * sps_entropy_coding_sync_enabled_flag are both true), entry points can be
 * placed at the beginning of every Ctb row in every tile, giving an
 * upper bound of (num_tile_columns_minus1 + 1) * PicHeightInCtbsY - 1.
 * Only a stream with very high resolution and perverse parameters could
 * get near that, though, so set a lower limit here with the maximum
 * possible value for 8K video (at most 135 32x32 Ctb rows). */
#define GST_H266_MAX_ENTRY_POINTS (GST_H266_MAX_TILE_COLUMNS * 135)
/* Use MaxLumaPs of level 6.3 in Table A.2.
   The min coding block size is 8, so min width or height is 8.
   The min CTU size is 32. */
#define GST_H266_MAX_CTUS_IN_PICTURE (80216064 / 8 / 32)

/**
 * GST_H266_IS_NAL_TYPE_IDR:
 * @nal_type: a #GstH266NalUnitType
 *
 * Check whether @nal_type is IDR or not.
 *
 * Since: 1.26
 */
#define GST_H266_IS_NAL_TYPE_IDR(nal_type) \
  ((nal_type) == GST_H266_NAL_SLICE_IDR_N_LPulkanFence
 * @object: a #GstMiniObject to unref
 *
 * Returns: (transfer full): a new #GstVulkanTrash object that will the unref
 *     @object when @fence is signalled
 *
 * Since: 1.18
 */
static inline GstVulkanTrash *
gst_vulkan_trash_new_mini_object_unref (GstVulkanFence * fence, GstMiniObject * object)
{
  return gst_vulkan_trash_new (fence,
      (GstVulkanTrashNotify) gst_vulkan_trash_mini_object_unref, (gpointer) object);
}

GST_VULKAN_API
GType gst_vulkan_trash_list_get_type (void);
/**
 * GST_TYPE_VULKAN_TRASH_LIST:
 *
 * Since: 1.18
 */
#define GST_TYPE_VULKAN_TRASH_LIST gst_vulkan_trash_list_get_type()
#define GST_VULKAN_TRASH_LIST(obj)              (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VULKAN_TRASH_LIST,GstVulkanTrashList))
#define GST_VULKAN_TRASH_LIST_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_VULKAN_TRASH_LIST,GstVulkanTrashListClass))
#define GST_VULKAN_TRASH_LIST_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_VULKAN_TRASH_LIST,GstVulkanTrashListClass))
#define GST_IS_VULKAN_TRASH_LIST(obj)           (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VULKAN_TRASH_LIST))
#define GST_IS_VULKAN_TRASH_LIST_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VULKAN_TRASH_LIST))

G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVulkanTrashList, gst_object_unref)

/**
 * GstVulkanTrashList:
 * @parent: the parent #GstVulkanHandle
 *
 * Since: 1.18
 */
struct _GstVulkanTrashList
{
  GstVulkanHandlePool parent;

  /* <private> */
  gpointer _reserved        [GST_PADDING];
};

/**
 * GstVulkanTrashListGC:
 * @trash_list: the #GstVulkanTrashList instance
 *
 * Remove any memory allocated by any signalled objects.
 *
 * Since: 1.18
 */
typedef void        (*GstVulkanTrashListGC)     (GstVulkanTrashList * trash_list);

/**
 * GstVulkanTrashListAdd:
 * @trash_list: the #GstVulkanTrashList instance
 * @trash: the #GstVulkanTrash to add to @trash_list
 *
 * Add @trash to @trash_list for tracking
 *
 * Returns: whether @trash could be added to @tR_NAME:
 *
 * Since: 1.18
 */
#define GST_VULKAN_IMAGE_MEMORY_ALLOCATOR_NAME "VulkanImage"
/**
 * GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE:
 *
 * Since: 1.18
 */
#define GST_CAPS_FEATURE_MEMORY_VULKAN_IMAGE "memory:VulkanImage"

/**
 * GstVulkanBarrierImageInfo:
 * @parent: parent #GstVulkanBarrierMemoryInfo
 * @image_layout: the image layout of this barrier
 * @subresource_range: what subresource the barrier applies to
 *
 * Since: 1.18
 */
struct _GstVulkanBarrierImageInfo
{
  GstVulkanBarrierMemoryInfo parent;

  VkImageLayout image_layout;
  /* FIXME: multiple layers or mipmap levels may require multiple barriers */
  VkImageSubresourceRange subresource_range;
};

/**
 * GstVulkanImageMemory:
 * @parent: parent #GstMemory
 * @device: the #GstVulkanDevice to allocate images from
 * @image: the Vulkan image handle
 * @vk_mem: the backing #GstVulkanMemory for @image
 * @create_info: creation information for @image
 * @requirements: memory requirements for @image
 * @format_properties: format properties
 * @usage: intended usage for @image
 * @barrier: last set barrier for @image
 *
 * Since: 1.18
 */
struct _GstVulkanImageMemory
{
  GstMemory parent;

  GstVulkanDevice * device;

  VkImage image;
  GstVulkanMemory *vk_mem;

  VkImageCreateInfo create_info;
  VkMemoryRequirements requirements;
  VkImageFormatProperties format_properties;
  VkImageUsageFlags usage;

  GstVulkanBarrierImageInfo barrier;

  /* <private> */
  GMutex lock;
  gboolean wrapped;
  GDestroyNotify notify;
  gpointer user_data;

  GPtrArray *views;
  GPtrArray *outstanding_views;

  gpointer _padding[GST_PADDING];
};

/**
 * GstVulkanImageMemoryFindViewFunc:
 *
 * Function definition used to find views.  Return %TRUE if @view matches the
 * criteria.
 *
 * Since: 1.18
 */
typedef gboolean (*GstVulkanImageMemoryFindViewFunc) (GstVulkanImageView * view, gpointer user_data);

/**
 * GstVulkanImageMemoryAllocator
 * @parent: the parent #GstAllocator
 *
 * Opaque #GstVulkanImageMemoryAllocator structoid    gst_h264_quant_matrix_4x4_get_raster_from_zigzag (guint8 out_quant[16],
                                                          const guint8 quant[16]);

GST_CODEC_PARSERS_API
void gst_h264_video_calculate_framerate (const GstH264SPS * sps, guint field_pic_flag,
    guint pic_struct, gint * fps_num, gint * fps_den);

GST_CODEC_PARSERS_API
GstMemory * gst_h264_create_sei_memory (guint8 start_code_prefix_length,
                                        GArray * messages);

GST_CODEC_PARSERS_API
GstMemory * gst_h264_create_sei_memory_avc (guint8 nal_length_size,
                                            GArray * messages);

GST_CODEC_PARSERS_API
GstBuffer * gst_h264_parser_insert_sei (GstH264NalParser * nalparser,
                                        GstBuffer * au,
                                        GstMemory * sei);

GST_CODEC_PARSERS_API
GstBuffer * gst_h264_parser_insert_sei_avc (GstH264NalParser * nalparser,
                                            guint8 nal_length_size,
                                            GstBuffer * au,
                                            GstMemory * sei);

GST_CODEC_PARSERS_API
void        gst_h264_decoder_config_record_free (GstH264DecoderConfigRecord * config);

GST_CODEC_PARSERS_API
GstH264ParserResult gst_h264_parser_parse_decoder_config_record (GstH264NalParser * nalparser,
                                                                 const guint8 * data,
                                                                 gsize size,
                                                                 GstH264DecoderConfigRecord ** config);
GST_CODEC_PARSERS_API
GstH264Profile gst_h264_profile_from_string (const gchar * profile);

GST_CODEC_PARSERS_API
const gchar *   gst_h264_slice_type_to_string      (GstH264SliceType slice_type);

G_END_DECLS

#endif
/*
 * gstvp8rangedecoder.h - VP8 range decoder interface
 *
 * Copyright (C) 2014 Intel Corporation
 *   Author: Gwenole Beauchesne <gwenole.beauchesne@inme_crop_bottom_offset;

  guint8 vui_parameters_present_flag;
  /* if vui_parameters_present_flag */
  GstH264VUIParams vui_parameters;

  /* calculated values */
  guint8 chroma_array_type;
  guint32 max_frame_num;
  gint width, height;
  gint crop_rect_width, crop_rect_height;
  gint crop_rect_x, crop_rect_y;
  gint fps_num_removed, fps_den_removed; /* FIXME: remove */
  gboolean valid;

  /* Subset SPS extensions */
  guint8 extension_type;
  union {
    GstH264SPSExtMVC mvc;
  } extension;
};

/**
 * GstH264PPS:
 *
 * H264 Picture Parameter Set
 */
struct _GstH264PPS
{
  gint id;

  GstH264SPS *sequence;

  guint8 entropy_coding_mode_flag;
  guint8 pic_order_present_flag;

  guint32 num_slice_groups_minus1;

  /* if num_slice_groups_minus1 > 0 */
  guint8 slice_group_map_type;
  /* and if slice_group_map_type == 0 */
  guint32 run_length_minus1[8];
  /* or if slice_group_map_type == 2 */
  guint32 top_left[8];
  guint32 bottom_right[8];
  /* or if slice_group_map_type == (3, 4, 5) */
  guint8 slice_group_change_direction_flag;
  guint32 slice_group_change_rate_minus1;
  /* or if slice_group_map_type == 6 */
  guint32 pic_size_in_map_units_minus1;
  guint8 *slice_group_id;

  /* FIXME rename to num_ref_idx_l{0,1}_default_active_minus1 */
  guint8 num_ref_idx_l0_active_minus1;
  guint8 num_ref_idx_l1_active_minus1;
  guint8 weighted_pred_flag;
  guint8 weighted_bipred_idc;
  gint8 pic_init_qp_minus26;
  gint8 pic_init_qs_minus26;
  gint8 chroma_qp_index_offset;
  guint8 deblocking_filter_control_present_flag;
  guint8 constrained_intra_pred_flag;
  guint8 redundant_pic_cnt_present_flag;

  guint8 transform_8x8_mode_flag;

  guint8 scaling_lists_4x4[6][16];
  guint8 scaling_lists_8x8[6][64];

  gint8 second_chroma_qp_index_offset;

  gboolean valid;

  /* Since: 1.18 */
  guint8 pic_scaling_matrix_present_flag;
};

struct _GstH264RefPicListModification
{
  guint8 modification_of_pic_nums_idc;
  union
  {
    /* if modification_of_pic_nums_idc == 0 || 1 */
    gui
 * @bitstream_restriction_flag: %TRUE specifies that the following coded video sequence bitstream restriction
 * parameters are present
 * @motion_vectors_over_pic_boundaries_flag: %FALSE indicates that no sample outside the
 *  picture boundaries and no sample at a fractional sample position, %TRUE indicates that one or more
 *  samples outside picture boundaries may be used in inter prediction
 * @max_bytes_per_pic_denom: indicates a number of bytes not exceeded by the sum of the sizes of
 *  the VCL NAL units associated with any coded picture in the coded video sequence.
 * @max_bits_per_mb_denom: indicates the maximum number of coded bits of macroblock_layer
 * @log2_max_mv_length_horizontal: indicate the maximum absolute value of a decoded horizontal
 * motion vector component
 * @log2_max_mv_length_vertical: indicate the maximum absolute value of a decoded vertical
 *  motion vector component
 * @num_reorder_frames: indicates the maximum number of frames, complementary field pairs,
 *  or non-paired fields that precede any frame,
 * @max_dec_frame_buffering: specifies the required size of the HRD decoded picture buffer in
 *  units of frame buffers.
 *
 * The structure representing the VUI parameters.
 */
struct _GstH264VUIParams
{
  guint8 aspect_ratio_info_present_flag;
  guint8 aspect_ratio_idc;
  /* if aspect_ratio_idc == 255 */
  guint16 sar_width;
  guint16 sar_height;

  guint8 overscan_info_present_flag;
  /* if overscan_info_present_flag */
  guint8 overscan_appropriate_flag;

  guint8 video_signal_type_present_flag;
  guint8 video_format;
  guint8 video_full_range_flag;
  guint8 colour_description_present_flag;
  guint8 colour_primaries;
  guint8 transfer_characteristics;
  guint8 matrix_coefficients;

  guint8 chroma_loc_info_present_flag;
  guint8 chroma_sample_loc_type_top_field;
  guint8 chroma_sample_loc_type_bottom_field;

  guint8 timing_info_present_flag;
  /* if timing_info_present_flag */
  guint32 num_units_in_tick;
  guint32 time_scale_NO_NAL,
  GST_H264_PARSER_NO_NAL_END
} GstH264ParserResult;

/**
 * GstH264FramePackingType:
 * @GST_H264_FRAME_PACKING_NONE: A complete 2D frame without any frame packing
 * @GST_H264_FRAME_PACKING_CHECKERBOARD_INTERLEAVING: Checkerboard
 *   based interleaving
 * @GST_H264_FRAME_PACKING_COLUMN_INTERLEAVING: Column based interleaving
 * @GST_H264_FRAME_PACKING_ROW_INTERLEAVING: Row based interleaving
 * @GST_H264_FRAME_PACKING_SIDE_BY_SIDE: Side-by-side packing
 * @GST_H264_FRMAE_PACKING_TOP_BOTTOM: Deprecated; use GST_H264_FRAME_PACKING_TOP_BOTTOM instead
 * @GST_H264_FRAME_PACKING_TOP_BOTTOM: Top-Bottom packing (Since: 1.22)
 * @GST_H264_FRAME_PACKING_TEMPORAL_INTERLEAVING: Temporal interleaving
 *
 * Frame packing arrangement types.
 *
 * Since: 1.6
 */
typedef enum
{
  GST_H264_FRAME_PACKING_NONE                           = 6,
  GST_H264_FRAME_PACKING_CHECKERBOARD_INTERLEAVING      = 0,
  GST_H264_FRAME_PACKING_COLUMN_INTERLEAVING            = 1,
  GST_H264_FRAME_PACKING_ROW_INTERLEAVING               = 2,
  GST_H264_FRAME_PACKING_SIDE_BY_SIDE                   = 3,
  GST_H264_FRMAE_PACKING_TOP_BOTTOM                     = 4,

  /**
   * GST_H264_FRAME_PACKING_TOP_BOTTOM:
   *
   * Top-Bottom packing
   *
   * Since: 1.22
   */
  GST_H264_FRAME_PACKING_TOP_BOTTOM                     = 4,
  GST_H264_FRAME_PACKING_TEMPORAL_INTERLEAVING          = 5
} GstH264FramePackingType;

/**
 * GstH264SEIPayloadType:
 * @GST_H264_SEI_BUF_PERIOD: Buffering Period SEI Message
 * @GST_H264_SEI_PIC_TIMING: Picture Timing SEI Message
 * @GST_H264_SEI_REGISTERED_USER_DATA: Registered user data (D.2.5)
 * @GST_H264_SEI_RECOVERY_POINT: Recovery Point SEI Message (D.2.7)
 * @GST_H264_SEI_STEREO_VIDEO_INFO: stereo video info SEI message (Since: 1.6)
 * @GST_H264_SEI_FRAME_PACKING: Frame Packing Arrangement (FPA) message that
 *     contains the 3D arrangement for stereoscopic 3D video (Since: 1.6)
 * @GST_H264_SEI_MASTERING_DISPLAY_COLOUR_VOLUME: Mastering display colour volume infGraphicsUnmapResources   (unsigned int count,
                                             CUgraphicsResource * resources,
                                             CUstream hStream);

GST_CUDA_API
CUresult CUDAAPI CuGraphicsSubResourceGetMappedArray    (CUarray * pArray,
                                                         CUgraphicsResource resource,
                                                         unsigned int arrayIndex,
                                                         unsigned int mipLevel);

GST_CUDA_API
CUresult CUDAAPI CuGraphicsResourceGetMappedPointer     (CUdeviceptr * pDevPtr,
                                                         size_t * pSize,
                                                         CUgraphicsResource resource);

GST_CUDA_API
CUresult CUDAAPI CuGraphicsUnregisterResource           (CUgraphicsResource resource);

GST_CUDA_API
CUresult CUDAAPI CuMemAlloc         (CUdeviceptr * dptr,
                                     unsigned int bytesize);

GST_CUDA_API
CUresult CUDAAPI CuMemAllocPitch    (CUdeviceptr * dptr,
                                     size_t * pPitch,
                                     size_t WidthInBytes,
                                     size_t Height,
                                     unsigned int ElementSizeBytes);

GST_CUDA_API
CUresult CUDAAPI CuMemAllocHost     (void **pp,
                                     unsigned int bytesize);

GST_CUDA_API
CUresult CUDAAPI CuMemcpy2D         (const CUDA_MEMCPY2D * pCopy);

GST_CUDA_API
CUresult CUDAAPI CuMemcpy2DAsync    (const CUDA_MEMCPY2D *pCopy, CUstream hStream);

GST_CUDA_API
CUresult CUDAAPI CuMemcpyDtoD       (CUdeviceptr dstDevice,
                                     CUdeviceptr srcDevice,
                                     size_t ByteCount);

GST_CUDA_API
CUresult CUDAAPI CuMemcpyDtoDAsync  (CUdeviceptr dstDevice,
                                     CUdeviceptr srcDevice,
                                     size_t ByteCount,
 MPEG4_STILL_3D_MESH_ID = 0x05,
  /*... reserved */

} GstMpeg4VisualObjectType;

/**
 * GstMpeg4AspectRatioInfo:
 * @GST_MPEG4_SQUARE: 1:1 square
 * @GST_MPEG4_625_TYPE_4_3: 12:11 (625-type for 4:3 picture)
 * @GST_MPEG4_525_TYPE_4_3: 10:11 (525-type for 4:3 picture)
 * @GST_MPEG4_625_TYPE_16_9: 16:11 (625-type stretched for 16:9 picture)
 * @GST_MPEG4_525_TYPE_16_9: 40:33 (525-type stretched for 16:9 picture)
 * @GST_MPEG4_EXTENDED_PAR: Extended par
 *
 * Defines the different pixel aspect ratios as
 * defined in: Table 6-12 -- Meaning of pixel aspect ratio
 */
typedef enum {
  GST_MPEG4_SQUARE        = 0x01,
  GST_MPEG4_625_TYPE_4_3  = 0x02,
  GST_MPEG4_525_TYPE_4_3  = 0x03,
  GST_MPEG4_625_TYPE_16_9 = 0x04,
  GST_MPEG4_525_TYPE_16_9 = 0x05,
  GST_MPEG4_EXTENDED_PAR  = 0x0f,
} GstMpeg4AspectRatioInfo;

/**
 * GstMpeg4ParseResult:
 * @GST_MPEG4_PARSER_OK: The parsing went well
 * @GST_MPEG4_PARSER_BROKEN_DATA: The bitstream was broken
 * @GST_MPEG4_PARSER_NO_PACKET: There was no packet in the buffer
 * @GST_MPEG4_PARSER_NO_PACKET_END: There was no packet end in the buffer
 * @GST_MPEG4_PARSER_NO_PACKET_ERROR: An error accured durint the parsing
 *
 * Result type of any parsing function.
 */
typedef enum {
  GST_MPEG4_PARSER_OK,
  GST_MPEG4_PARSER_BROKEN_DATA,
  GST_MPEG4_PARSER_NO_PACKET,
  GST_MPEG4_PARSER_NO_PACKET_END,
  GST_MPEG4_PARSER_ERROR,
} GstMpeg4ParseResult;

/**
 * GstMpeg4VideoObjectCodingType:
 * @GST_MPEG4_I_VOP: intra-coded (I)
 * @GST_MPEG4_P_VOP: predictive-coded (P)
 * @GST_MPEG4_B_VOP: bidirectionally-predictive-coded (B)
 * @GST_MPEG4_S_VOP: sprite (S)
 *
 * The vop coding types as defined in:
 * Table 6-20 -- Meaning of vop_coding_type
 */
typedef enum {
  GST_MPEG4_I_VOP = 0x0,
  GST_MPEG4_P_VOP = 0x1,
  GST_MPEG4_B_VOP = 0x2,
  GST_MPEG4_S_VOP = 0x3
} GstMpeg4VideoObjectCodingType;

/**
 * GstMpeg4ChromaFormat:
 *
 * The chroma format in use as
 * defined in: Table 6-13 -- Meaning of chroma_format
 */
typedef enum {
  /* Other value are rtPlayerGMainContextSignalDispatcher*)(obj))

GST_PLAYER_API
GType gst_player_g_main_context_signal_dispatcher_get_type (void);

GST_PLAYER_API
GstPlayerSignalDispatcher * gst_player_g_main_context_signal_dispatcher_new (GMainContext * application_context);

G_END_DECLS

#endif /* __GST_PLAYER_G_MAIN_CONTEXT_SIGNAL_DISPATCHER_H__ */
/* GStreamer
 * Copyright (C) 2023 Collabora Ltd
 *
 * gstanalyticsclassificationmtd.h
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __GST_ANALYTICS_CLASSIFICATION_H__
#define __GST_ANALYTICS_CLASSIFICATION_H__

#include <gst/gst.h>
#include <gst/analytics/analytics-meta-prelude.h>
#include <gst/analytics/gstanalyticsmeta.h>

G_BEGIN_DECLS
/**
 * GstAnalyticsClsMtd:
 * @id: Instance identifier.
 * @meta: Instance of #GstAnalyticsRelationMeta where the analysis-metadata
 * identified by @id is stored.
 *
 * Handle containing data required to use gst_analytics_cls_mtd APIs. This type
 * is generally expected to be allocated on the stack.
 *
 * Since: 1.24
 */
typedef struct _GstAnalyticsMtd GstAnalyticsClsMtd;

GST_ANALYTICS_META_API
GstAnalyticsMtdType gst_analytics_cls_mtd_get_mtd_type (void);

GST_ANALYTICS_META_API
gfloat gst_analytics_cls_mtd_get_level (const GstAnalyticsClsMtd * handle,
    gsize index);

GST_ANALYTICS_META_API
gint gsutomatically
 * @GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL: Disable automatic exposure adjustment
 * and keep current values.
 *
 */
typedef enum {
    GST_PHOTOGRAPHY_EXPOSURE_MODE_AUTO = 0,
    GST_PHOTOGRAPHY_EXPOSURE_MODE_MANUAL
} GstPhotographyExposureMode;

/**
 * GstPhotographySettings:
 *
 * Structure containing all #GstPhotography settings, used to set all
 * settings in one call with @gst_photography_set_config().
 */
typedef struct
{
  GstPhotographyWhiteBalanceMode wb_mode;
  GstPhotographyColorToneMode tone_mode;
  GstPhotographySceneMode scene_mode;
  GstPhotographyFlashMode flash_mode;
  guint32 exposure_time;
  guint aperture;
  gfloat ev_compensation;
  guint iso_speed;
  gfloat zoom;
  GstPhotographyFlickerReductionMode flicker_mode;
  GstPhotographyFocusMode focus_mode;
  GstPhotographyNoiseReduction noise_reduction;
  GstPhotographyExposureMode exposure_mode;
  guint color_temperature;
  guint white_point[MAX_WHITE_POINT_VALUES];
  gfloat analog_gain;
  gfloat lens_focus;
  guint min_exposure_time;
  guint max_exposure_time;
  /* FIXME: add padding? */
} GstPhotographySettings;

/**
 * GstPhotographyCapturePrepared:
 * @data: user data that has been given, when registering the callback
 * @configured_caps: #GstCaps defining the configured capture format.
 *     Ownership of these caps stays in the element.
 *
 * This callback will be called when the element has finished preparations
 * and is ready for image capture. The next buffer that element produces
 * will be of @configured_caps format, so this callback allows the application
 * to e.g. reconfigure capsfilters in pipeline if any.
 */
typedef void (*GstPhotographyCapturePrepared) (gpointer data, const GstCaps *configured_caps);

/**
 * GstPhotographyInterface:
 * @parent: parent interface type.
 * @get_ev_compensation: vmethod to get ev exposure compensation value
 * @get_iso_speed: vmethod to get iso speed (light sensitivity) value
 * @get_aperture: vmethod to get aperture value
 * @get_exposuR_EIGHTTAP        = 0,
  GST_VP9_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1,
  GST_VP9_INTERPOLATION_FILTER_EIGHTTAP_SHARP  = 2,
  GST_VP9_INTERPOLATION_FILTER_BILINEAR        = 3,
  GST_VP9_INTERPOLATION_FILTER_SWITCHABLE      = 4
} GstVp9InterpolationFilter;

/**
 * GstVp9RefFrameType:
 * @GST_VP9_REF_FRAME_INTRA: Intra reference frame
 * @GST_VP9_REF_FRAME_LAST: Last Reference frame
 * @GST_VP9_REF_FRAME_GOLDEN: Golden Reference frame
 * @GST_VP9_REF_FRAME_ALTREF: Alternate Reference frame
 * @GST_VP9_REF_FRAME_MAX:
 *
 * Reference Frame types
 *
 * Since: 1.8
 */
typedef enum {
  GST_VP9_REF_FRAME_INTRA  = 0,
  GST_VP9_REF_FRAME_LAST   = 1,
  GST_VP9_REF_FRAME_GOLDEN = 2,
  GST_VP9_REF_FRAME_ALTREF = 3,
  GST_VP9_REF_FRAME_MAX    = 4
} GstVp9RefFrameType;

/**
 * GstVp9QuantIndices:
 * @y_ac_qi: indicates the dequantization table index used for the
 *   luma AC coefficients
 * @y_dc_delta: indicates the delta value that is added to the
 *   baseline index to obtain the luma DC coefficient dequantization
 *   index
 * @uv_dc_delta: indicates the delta value that is added to the
 *   baseline index to obtain the chroma DC coefficient dequantization
 *   index
 * @uv_ac_delta: indicates the delta value that is added to the
 *   baseline index to obtain the chroma AC coefficient dequantization
 *   index
 *
 * Dequantization indices.
 *
 * Since: 1.8
 */
struct _GstVp9QuantIndices
{
  guint8 y_ac_qi;
  gint8 y_dc_delta;
  gint8 uv_dc_delta;
  gint8 uv_ac_delta;
};

/**
 * GstVp9LoopFilter:
 * @filter_level: indicates loop filter level for the current frame
 * @sharpness_level: indicates sharpness level for thecurrent frame
 * @mode_ref_delta_enabled: indicate if filter adjust is on
 * @mode_ref_delta_update: indicates if the delta values used in an
 *   adjustment are updated in the current frame
 * @update_ref_deltas: indicate which ref deltas are updated
 * @ref_deltas:  Loop filter strength adjustments based on
 *  frame type (intra, inter)
 * @update_mode_deltasref (GST_MINI_OBJECT_CAST (section)))

GST_MPEGTS_API
GstMessage *gst_message_new_mpegts_section (GstObject *parent, GstMpegtsSection *section);

GST_MPEGTS_API
GstEvent *gst_event_new_mpegts_section (GstMpegtsSection * section);

GST_MPEGTS_API
gboolean gst_mpegts_section_send_event (GstMpegtsSection * section, GstElement * element);

GST_MPEGTS_API
GstMpegtsSection *gst_event_parse_mpegts_section (GstEvent * event);

GST_MPEGTS_API
GstMpegtsSection *gst_message_parse_mpegts_section (GstMessage *message);

GST_MPEGTS_API
GstMpegtsSection *gst_mpegts_section_new (guint16 pid,
					   guint8 * data,
					   gsize data_size);

GST_MPEGTS_API
guint8 *gst_mpegts_section_packetize (GstMpegtsSection * section, gsize * output_size);

G_END_DECLS

#endif				/* GST_MPEGTS_SECTION_H */
/* GStreamer Photography Library
 * Copyright (C) 2018 GStreamer developers
 *
 * photography-prelude.h: prelude include header for gst-photography library
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __GST_PHOTOGRAPHY_PRELUDE_H__
#define __GST_PHOTOGRAPHY_PRELUDE_H__

#include <gst/gst.h>

#ifndef GST_PHOTOGRAPHY_API
# ifdef BUILDING_GST_PHOTOGRAPHY
#  define GST_PHOTOGRAPHY_API GST_API_EXPORT         /* from config.h */
# else
#  define GST_PHOTOGRAPHY_API GST_API_IMPORT
# endif
#endif

#endiL units of the given type are in this array and none
   *   are in the stream.
   * 0: additional NAL units of the indicated type may be in the stream
   */
  guint8 array_completeness;

  /**
   * GstH265DecoderConfigRecordNalUnitArray.nal_unit_type:
   *
   * Indicates the type of the NAL units in the following array.
   * Shall be VPS, SPS, PPS, prefix SEI or suffix SEI
   */
  GstH265NalUnitType nal_unit_type;

  /**
   * GstH265DecoderConfigRecordNalUnitArray.nalu:
   *
   * Array of identified #GstH265NalUnit
   */
  GArray *nalu;
};

/**
 * GstH265DecoderConfigRecord:
 *
 * Contains HEVCDecoderConfigurationRecord data as defined in ISO/IEC 14496-15
 *
 * Since: 1.24
 */
struct _GstH265DecoderConfigRecord
{
  /**
   * GstH265DecoderConfigRecord.configuration_version:
   *
   * Indicates configurationVersion, must be 1
   */
  guint8 configuration_version;

  /**
   * GstH265DecoderConfigRecord.general_profile_space:
   *
   * general profile space
   */
  guint8 general_profile_space;

  /**
   * GstH265DecoderConfigRecord.general_tier_flag:
   *
   * general tier flag
   */
  guint8 general_tier_flag;

  /**
   * GstH265DecoderConfigRecord.general_profile_idc:
   *
   * general profile indiction
   */
  guint8 general_profile_idc;

  /**
   * GstH265DecoderConfigRecord.general_profile_compatibility_flags:
   *
   * general profile compatibility flags
   */
  guint8 general_profile_compatibility_flags[32];

  /**
   * GstH265DecoderConfigRecord.general_progressive_source_flag:
   *
   * general_progressive_source_flag parsed from
   * HEVCDecoderConfigurationRecord.general_constraint_indicator_flags
   */
  guint8 general_progressive_source_flag;

  /**
   * GstH265DecoderConfigRecord.general_interlaced_source_flag:
   *
   * general_interlaced_source_flag parsed from
   * HEVCDecoderConfigurationRecord.general_constraint_indicator_flags
   */
  guint8 general_interlaced_source_flag;

  /**
   * GstH265DecoderConfigRecord.general_non_packed_constraint_flag:
ft and upper boundaries of the current slice.
 * @num_entry_point_offsets: specifies the number of entry_point_offset_minus1 syntax elements
 *   in the slice header.
 * @offset_len_minus1: specifies the length of the entry_point_minus1 syntax elements
 *   in bits.
 * @entry_point_offset_minus1: the entry point offset in bytes.
 * @NumPocTotalCurr: calculated NumPocTotalCurr which is used for
 *   decoding process for reference picture set
 * @header_size: the calculated size of the slice_header\() in bits.
 * @n_emulation_prevention_bytes: number of emulation prevention bytes (EPB)
 *   in this slice_header\()
 * @short_term_ref_pic_set_size: the calculated size of short_term_ref_pic_set\()
 *   in bits. (Since: 1.18)
 * @long_term_ref_pic_set_size: the calculated size of the branch
 *   `if( long_term_ref_pics_present_flag )` `inside slice_segment_header()` syntax
 *   in bits. (Since: 1.22)
 */
struct _GstH265SliceHdr
{
  guint8 first_slice_segment_in_pic_flag;
  guint8 no_output_of_prior_pics_flag;

  GstH265PPS *pps;

  guint8 dependent_slice_segment_flag;
  guint32 segment_address;

  guint8 type;

  guint8 pic_output_flag;
  guint8 colour_plane_id;
  guint16 pic_order_cnt_lsb;

  guint8  short_term_ref_pic_set_sps_flag;
  GstH265ShortTermRefPicSet short_term_ref_pic_sets;
  guint8 short_term_ref_pic_set_idx;

  guint8 num_long_term_sps;
  guint8 num_long_term_pics;
  guint8 lt_idx_sps[16];
  guint32 poc_lsb_lt[16];
  guint8 used_by_curr_pic_lt_flag[16];
  guint8 delta_poc_msb_present_flag[16];
  guint32 delta_poc_msb_cycle_lt[16];

  guint8 temporal_mvp_enabled_flag;
  guint8 sao_luma_flag;
  guint8 sao_chroma_flag;
  guint8 num_ref_idx_active_override_flag;
  guint8 num_ref_idx_l0_active_minus1;
  guint8 num_ref_idx_l1_active_minus1;

  GstH265RefPicListModification ref_pic_list_modification;

  guint8 mvd_l1_zero_flag;
  guint8 cabac_init_flag;
  guint8 collocated_from_l0_flag;
  guint8 collocated_ref_idx;

  GstH265PredWeightTable pred_weight_table;

  es the GstH265SPSExtensionParams
 */
struct _GstH265PPSExtensionParams {
  guint32 log2_max_transform_skip_block_size_minus2;
  guint8 cross_component_prediction_enabled_flag;
  guint8 chroma_qp_offset_list_enabled_flag;
  guint8 diff_cu_chroma_qp_offset_depth;
  guint8 chroma_qp_offset_list_len_minus1;
  gint8 cb_qp_offset_list[6];
  gint8 cr_qp_offset_list[6];
  guint8 log2_sao_offset_scale_luma;
  guint8 log2_sao_offset_scale_chroma;
};

/**
 * GstH265PPSSccExtensionParams:
 * @pps_curr_pic_ref_enabled_flag: equal to 1 specifies that a picture referring to the PPS may
 *   be included in a reference picture list of a slice of the picture itself.
 * @residual_adaptive_colour_transform_enabled_flag: equal to 1 specifies that an adaptive
 *   colour transform may be applied to the residual in the decoding process.
 * @pps_slice_act_qp_offsets_present_flag: equal to 1 specifies that slice_act_y_qp_offset,
 *   slice_act_cb_qp_offset, slice_act_cr_qp_offset are present in the slice header.
 * @pps_act_y_qp_offset_plus5 @pps_act_cb_qp_offset_plus5 @pps_act_cr_qp_offset_plus3:
 *   are used to determine the offsets that are applied to the quantization parameter values
 *   qp derived in clause 8.6.2 for the luma, Cb and Cr components, respectively, when
 *   tu_residual_act_flag[ xTbY ][ yTbY ] is equal to 1.
 * @pps_palette_predictor_initializers_present_flag: equal to 1 specifies that the palette
 *   predictor initializers used for the pictures referring to the PPS are derived based on
 *   the palette predictor initializers specified by the PPS.
 * @pps_num_palette_predictor_initializer: specifies the number of entries in the picture
 *   palette predictor initializer.
 * @monochrome_palette_flag: equal to 1 specifies that the pictures that refer to this PPS
 *   are monochrome. Equal to 0 specifies that the pictures that refer to this PPS have
 *   multiple components.
 * @luma_bit_depth_entry_minus8: plus 8 specifies the bit depth of the luma component of the
 *ate the presence of constraint
 *   on the temporal distance between the HRD output times of consecutive
 *   pictures in output order
 * @fixed_pic_rate_within_cvs_flag: same as fixed_pic_rate_general_flag
 * @elemental_duration_in_tc_minus1: temporal distance in clock ticks
 * @low_delay_hrd_flag: specifies the HRD operational mode
 * @cpb_cnt_minus1:specifies the number of alternative CPS specifications.
 * @sublayer_hrd_params: Sublayer HRD parameters.
 *
 * Defines the HRD parameters
 */
struct _GstH265HRDParams
{
  guint8 nal_hrd_parameters_present_flag;
  guint8 vcl_hrd_parameters_present_flag;
  guint8 sub_pic_hrd_params_present_flag;

  guint8 tick_divisor_minus2;
  guint8 du_cpb_removal_delay_increment_length_minus1;
  guint8 sub_pic_cpb_params_in_pic_timing_sei_flag;
  guint8 dpb_output_delay_du_length_minus1;

  guint8 bit_rate_scale;
  guint8 cpb_size_scale;
  guint8 cpb_size_du_scale;

  guint8 initial_cpb_removal_delay_length_minus1;
  guint8 au_cpb_removal_delay_length_minus1;
  guint8 dpb_output_delay_length_minus1;

  guint8 fixed_pic_rate_general_flag [7];
  guint8 fixed_pic_rate_within_cvs_flag [7];
  guint16 elemental_duration_in_tc_minus1 [7];
  guint8 low_delay_hrd_flag [7];
  guint8 cpb_cnt_minus1[7];

  GstH265SubLayerHRDParams sublayer_hrd_params[7];
};

/**
 * GstH265VPS:
 * @id: vps id
 * @base_layer_internal_flag and @base_layer_available_flag:
 *   specify availability of base layer
 * @max_layers_minus1: should be zero, but can be other values in future
 * @max_sub_layers_minus1:specifies the maximum number of temporal sub-layers
 * @temporal_id_nesting_flag: specifies whether inter prediction is
 *   additionally restricted
 * @profile_tier_level: ProfileTierLevel info
 * @sub_layer_ordering_info_present_flag: indicates the presence of
 *   vps_max_dec_pic_buffering_minus1, vps_max_num_reorder_pics and
 *   vps_max_latency_increase_plus1
 * @max_dec_pic_buffering_minus1: specifies the maximum required size
 *   of the decoded pictur #GstH265NalUnitType
 *
 * Check whether @nal_type is RASL or not
 *
 * Since: 1.18
 */
#define GST_H265_IS_NAL_TYPE_RASL(nal_type) \
  ((nal_type) == GST_H265_NAL_SLICE_RASL_N || (nal_type) == GST_H265_NAL_SLICE_RASL_R)

/**
 * GstH265Profile:
 * @GST_H265_PROFILE_MAIN: Main profile (A.3.2)
 * @GST_H265_PROFILE_MAIN_10: Main 10 profile (A.3.3)
 * @GST_H265_PROFILE_MAIN_STILL_PICTURE: Main Still Picture profile (A.3.4)
 * @GST_H265_PROFILE_MONOCHROME: Monochrome profile (A.3.4)
 * @GST_H265_PROFILE_MONOCHROME_12: Monochrome 12-bits profile (A.3.4)
 * @GST_H265_PROFILE_MONOCHROME_16: Monochrome 16-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_12: Main profile 12-bits (A.3.4)
 * @GST_H265_PROFILE_MAIN_422_10: Main 4:2:2 profile 10-bits (A.3.4)
 * @GST_H265_PROFILE_MAIN_422_12: Main 4:2:2 profile 12-bits (A.3.4)
 * @GST_H265_PROFILE_MAIN_444: Main 4:4:4 profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_10: Main 4:4:4 10-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_12: Main 4:4:4 12-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_INTRA: Main Intra profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_10_INTRA: Main Intra 10-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_12_INTRA: Main Intra 12-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_422_10_INTRA: Main Intra 4:2:2 10-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_422_12_INTRA: Main Intra 4:2:2 12-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_INTRA: Main Intra 4:4:4 profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_10_INTRA: Main Intra 4:4:4 10-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_12_INTRA: Main Intra 4:4:4 12-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_16_INTRA: Main Intra 4:4:4 16-bits profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_STILL_PICTURE: Main 4:4:4 Still Picture profile (A.3.4)
 * @GST_H265_PROFILE_MAIN_444_16_STILL_PICTURE: Main 4:4:4 16-bits Still Picture profile (A.3.4)
 * @GST_H265_PROFILE_MONOCHROME_10:  Monochrome 10-bits profile (A.3.5) (Since: 1.18)
 * @GST_H265_PROFILE_HIGH_THROUGHP = 0x0010,
  GST_MPEGTS_METADATA_APPLICATION_FORMAT_VSAN = 0x0011,
  GST_MPEGTS_METADATA_APPLICATION_FORMAT_IDENTIFIER_FIELD = 0xffff,
} GstMpegtsMetadataApplicationFormat;

/* MPEG-TS Metadata Descriptor (0x26) */
typedef struct _GstMpegtsMetadataDescriptor GstMpegtsMetadataDescriptor;

/**
 * GstMpegtsMetadataDescriptor:
 * @metadata_application_format: specifies the application responsible for defining usage, syntax and semantics
 * @metadata_format: indicates the format and coding of the metadata
 * @metadata_format_identifier: format identifier (equivalent to registration descriptor), for example 0x4B4C4641 ('KLVA') to indicate SMPTE 336 KLV.
 * @metadata_service_id:  metadata service to which this metadata descriptor applies, typically 0x00
 * @decoder_config_flags: decoder flags, see ISO/IEC 13818-1:2018 Table 2-88.
 * @dsm_cc_flag: true if stream associated with this descriptor is in an ISO/IEC 13818-6 data or object carousel.
 *
 * The metadata descriptor specifies parameters of a metadata service carried in an MPEG-2 Transport Stream (or Program Stream). The descriptor is included in the PMT in the descriptor loop for the elementary stream that carries the
metadata service. The descriptor specifies the format of the associated metadata, and contains the value of the
metadata_service_id to identify the metadata service to which the metadata descriptor applies.
 *
 * Note that this structure does not include all of the metadata_descriptor items, and will need extension to support DSM-CC and private data.
 * See ISO/IEC 13818-1:2018 Section 2.6.60 and Section 2.6.61 for more information.
 *
 * Since: 1.24
 */
struct _GstMpegtsMetadataDescriptor
{
  GstMpegtsMetadataApplicationFormat metadata_application_format;
  GstMpegtsMetadataFormat metadata_format;
  guint32 metadata_format_identifier;
  guint8 metadata_service_id;
  guint8 decoder_config_flags;
  gboolean dsm_cc_flag;
};

/**
 * GST_TYPE_MPEGTS_METADATA_DESCRIPTOR:
 *
 * metadata_descriptor type
 *
 *S_DESC_SCTE_TRANSPORT_STREAM_ID		= 0x92
} GstMpegtsSCTEDescriptorType;



typedef struct _GstMpegtsDescriptor GstMpegtsDescriptor;

#define GST_TYPE_MPEGTS_DESCRIPTOR (gst_mpegts_descriptor_get_type())
GST_MPEGTS_API
GType gst_mpegts_descriptor_get_type (void);

/**
 * GstMpegtsDescriptor:
 * @tag: the type of descriptor
 * @tag_extension: the extended type (if @tag is 0x7f (for DVB) or 0x3f (for H.222.0))
 * @length: the length of the descriptor content (excluding tag/length field)
 * @data: the full descriptor data (including tag, extension, length). The first
 * two bytes are the @tag and @length.
 *
 * Mpeg-TS descriptor (ISO/IEC 13818-1).
 */
struct _GstMpegtsDescriptor
{
  guint8 tag;
  guint8 tag_extension;
  guint8 length;
  guint8 *data;

  /*< private >*/
  /* Padding for future extension */
  gpointer _gst_reserved[GST_PADDING];
};

GST_MPEGTS_API
void       gst_mpegts_descriptor_free (GstMpegtsDescriptor *desc);

GST_MPEGTS_API
GstMpegtsDescriptor       * gst_mpegts_descriptor_copy (GstMpegtsDescriptor *desc);

GST_MPEGTS_API
GPtrArray *gst_mpegts_parse_descriptors (guint8 * buffer, gsize buf_len);

GST_MPEGTS_API
const GstMpegtsDescriptor * gst_mpegts_find_descriptor (GPtrArray *descriptors,
							guint8 tag);

GST_MPEGTS_API
const GstMpegtsDescriptor * gst_mpegts_find_descriptor_with_extension (GPtrArray *descriptors,
							guint8 tag, guint8 tag_extension);
/**
 * GstMpegtsRegistrationId:
 * @GST_MTS_REGISTRATION_0: Undefined registration id
 * @GST_MTS_REGISTRATION_AC_3: Audio AC-3, ATSC A/52
 * @GST_MTS_REGISTRATION_AC_4: Audio AC-4, ETSI 103 190-2
 * @GST_MTS_REGISTRATION_CUEI: SCTE 35, "Digital Program Insertion Cueing Message"
 * @GST_MTS_REGISTRATION_drac: Dirac Video codec
 * @GST_MTS_REGISTRATION_DTS1: DTS Audio
 * @GST_MTS_REGISTRATION_DTS2: DTS Audio
 * @GST_MTS_REGISTRATION_DTS3: DTS Audio
 * @GST_MTS_REGISTRATION_EAC3: Enhanced AC-3 (i.e. EAC3)
 * @GST_MTS_REGISTRATION_ETV1: Cablelabs ETV
 * @GST_MTS_REGISTRATION_BSSD: SMPTE 302M, Mapp GstTfxdBox *tfxd;
} GstTrafBox;

typedef struct _GstMoofBox
{
  GstMfhdBox mfhd;
  GArray *traf;
} GstMoofBox;

GST_ISOFF_API
GstMoofBox * gst_isoff_moof_box_parse (GstByteReader *reader);

GST_ISOFF_API
void gst_isoff_moof_box_free (GstMoofBox *moof);

typedef struct _GstTkhdBox
{
  guint32 track_id;
} GstTkhdBox;

typedef struct _GstMdhdBox
{
  guint32 timescale;
} GstMdhdBox;

typedef struct _GstHdlrBox
{
  guint32 handler_type;
} GstHdlrBox;

typedef struct _GstMdiaBox
{
  GstMdhdBox mdhd;
  GstHdlrBox hdlr;
} GstMdiaBox;

typedef struct _GstTrakBox
{
  GstTkhdBox tkhd;
  GstMdiaBox mdia;
} GstTrakBox;

typedef struct _GstMoovBox
{
  GArray *trak;
} GstMoovBox;

GST_ISOFF_API
GstMoovBox * gst_isoff_moov_box_parse (GstByteReader *reader);

GST_ISOFF_API
void gst_isoff_moov_box_free (GstMoovBox *moov);

typedef struct _GstSidxBoxEntry
{
  gboolean ref_type;
  guint32 size;
  GstClockTime duration;
  gboolean starts_with_sap;
  guint8 sap_type;
  guint32 sap_delta_time;

  guint64 offset;
  GstClockTime pts;
} GstSidxBoxEntry;

typedef struct _GstSidxBox
{
  guint8 version;
  guint32 flags;

  guint32 ref_id;
  guint32 timescale;
  guint64 earliest_pts;
  guint64 first_offset;

  gint entry_index;
  gint entries_count;

  GstSidxBoxEntry *entries;
} GstSidxBox;

typedef enum _GstSidxParserStatus
{
  GST_ISOFF_SIDX_PARSER_INIT,
  GST_ISOFF_SIDX_PARSER_HEADER,
  GST_ISOFF_SIDX_PARSER_DATA,
  GST_ISOFF_SIDX_PARSER_FINISHED
} GstSidxParserStatus;

typedef struct _GstSidxParser
{
  GstSidxParserStatus status;

  guint64 size;
  guint64 cumulative_entry_size;
  guint64 cumulative_pts;

  GstSidxBox sidx;
} GstSidxParser;

GST_ISOFF_API
void gst_isoff_sidx_parser_init (GstSidxParser * parser);

GST_ISOFF_API
void gst_isoff_sidx_parser_clear (GstSidxParser * parser);

GST_ISOFF_API
GstIsoffParserResult gst_isoff_sidx_parser_parse (GstSidxParser * parser, GstByteReader * reader, guint * consumed);

GST_ISOFF_API
GstIsoffParserResult gst_isoff_sidx_parser_add_buffer (GstSescription
 * @sdp: the #GstSDPMessage of the description
 *
 * See <https://www.w3.org/TR/webrtc/#rtcsessiondescription-class>
 */
struct _GstWebRTCSessionDescription
{
  GstWebRTCSDPType       type;
  GstSDPMessage         *sdp;
};

GST_WEBRTC_API
GstWebRTCSessionDescription *       gst_webrtc_session_description_new      (GstWebRTCSDPType type, GstSDPMessage *sdp);
GST_WEBRTC_API
GstWebRTCSessionDescription *       gst_webrtc_session_description_copy     (const GstWebRTCSessionDescription * src);
GST_WEBRTC_API
void                                gst_webrtc_session_description_free     (GstWebRTCSessionDescription * desc);


G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstWebRTCSessionDescription, gst_webrtc_session_description_free)

G_END_DECLS

#endif /* __GST_WEBRTC_PEERCONNECTION_H__ */
/*
 * GStreamer
 * Copyright (C) 2023 Igalia, S.L.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#pragma once

#include <gst/gst.h>
#include <gst/vulkan/gstvkapi.h>

G_BEGIN_DECLS

/**
 * GstVulkanVideoProfile:
 * @profile: the generic vulkan video profile
 * @codec: the specific codec profile
 *
 * Since: 1.24
 */
struct _GstVulkanVideoProfile
{
  /*< private >*/
#if GST_VULKAN_HAVE_VIDEO_EXTENSIONS
  VkVideoProfileInfoKHR profile;
  union {
    VkVideoDecodeUsageInfoKHR decode;
    /**
     * GstVoverflags;
  guint8  *mvtypemb;
  guint8  *skipmb;
  guint8  *directmb;
  guint8  *forwardmb;

  guint size; /* Size of the arrays */
};

struct _GstVC1VopDquant
{
  guint8 pqdiff;
  guint8 abspq;

  /* Computed */
  guint8 altpquant;

  /*  if dqant != 2*/
  guint8 dquantfrm;
  guint8 dqprofile;

  /* Boundary edge selection. This represents DQSBEDGE
   * if dqprofile == GST_VC1_DQPROFILE_SINGLE_EDGE or
   * DQDBEDGE if dqprofile == GST_VC1_DQPROFILE_DOUBLE_EDGE */
  guint8 dqbedge;

  /* FIXME: remove */
  guint8 unused;

  /* if dqprofile == GST_VC1_DQPROFILE_ALL_MBS */
  guint8 dqbilevel;

};

struct _GstVC1FrameLayer
{
  guint8 key;
  guint32 framesize;

  guint32 timestamp;

  /* calculated */
  guint32 next_framelayer_offset;
  guint8 skiped_p_frame;
};

/**
 * GstVC1FrameHdr:
 *
 * Structure that represent picture in any profile or mode.
 * You should look at @ptype and @profile to know what is currently
 * in use.
 */
struct _GstVC1FrameHdr
{
  /* common fields */
  GstVC1PictureType ptype;
  guint8 interpfrm;
  guint8 halfqp;
  guint8 transacfrm;
  guint8 transdctab;
  guint8 pqindex;
  guint8 pquantizer;

  /* Computed */
  guint8 pquant;

  /* Convenience fields */
  guint8 profile;
  guint8 dquant;

  /*  If dquant */
  GstVC1VopDquant vopdquant;

  union {
    GstVC1PicSimpleMain simple;
    GstVC1PicAdvanced advanced;
  } pic;

  /* Size of the picture layer in bits */
  guint header_size;
};

/**
 * GstVC1SliceHdr:
 *
 * Structure that represents slice layer in advanced profile.
 */
struct _GstVC1SliceHdr
{
  guint16 slice_addr;

  /* Size of the slice layer in bits */
  guint header_size;
};

/**
 * GstVC1BDU:
 *
 * Structure that represents a Bitstream Data Unit.
 */
struct _GstVC1BDU
{
  GstVC1StartCode type;
  guint size;
  guint sc_offset;
  guint offset;
  guint8 * data;
};

GST_CODEC_PARSERS_API
GstVC1ParserResult gst_vc1_identify_next_bdu           (const guint8 *data,
                                                        gsize size,
    S

/**
 * SECTION:gst-atsc-descriptor
 * @title: ATSC variants of MPEG-TS descriptors
 * @short_description: Descriptors for the various ATSC specifications
 * @include: gst/mpegts/mpegts.h
 *
 * This contains the various descriptors defined by the ATSC specifications
 */

/**
 * GstMpegtsATSCDescriptorType:
 *
 * These values correspond to the registered descriptor type from
 * the various ATSC specifications.
 *
 * Consult the relevant specifications for more details.
 */
typedef enum {
  /* ATSC A/65 2009 */
  GST_MTS_DESC_ATSC_STUFFING                    = 0x80,
  GST_MTS_DESC_ATSC_AC3                         = 0x81,
  GST_MTS_DESC_ATSC_CAPTION_SERVICE             = 0x86,
  GST_MTS_DESC_ATSC_CONTENT_ADVISORY            = 0x87,
  GST_MTS_DESC_ATSC_EXTENDED_CHANNEL_NAME       = 0xA0,
  GST_MTS_DESC_ATSC_SERVICE_LOCATION            = 0xA1,
  GST_MTS_DESC_ATSC_TIME_SHIFTED_SERVICE        = 0xA2,
  GST_MTS_DESC_ATSC_COMPONENT_NAME              = 0xA3,
  GST_MTS_DESC_ATSC_DCC_DEPARTING_REQUEST       = 0xA8,
  GST_MTS_DESC_ATSC_DCC_ARRIVING_REQUEST        = 0xA9,
  GST_MTS_DESC_ATSC_REDISTRIBUTION_CONTROL      = 0xAA,
  GST_MTS_DESC_ATSC_GENRE                       = 0xAB,
  GST_MTS_DESC_ATSC_PRIVATE_INFORMATION         = 0xAD,
  GST_MTS_DESC_ATSC_EAC3                        = 0xCC,

  /* ATSC A/53:3 2009 */
  GST_MTS_DESC_ATSC_ENHANCED_SIGNALING          = 0xB2,

  /* ATSC A/90 */
  GST_MTS_DESC_ATSC_DATA_SERVICE                = 0xA4,
  GST_MTS_DESC_ATSC_PID_COUNT                   = 0xA5,
  GST_MTS_DESC_ATSC_DOWNLOAD_DESCRIPTOR         = 0xA6,
  GST_MTS_DESC_ATSC_MULTIPROTOCOL_ENCAPSULATION = 0xA7,
  GST_MTS_DESC_ATSC_MODULE_LINK                 = 0xB4,
  GST_MTS_DESC_ATSC_CRC32                       = 0xB5,
  GST_MTS_DESC_ATSC_GROUP_LINK                  = 0xB8,
} GstMpegtsATSCDescriptorType;

/* For backwards compatibility */
/** 
 * GST_MTS_DESC_AC3_AUDIO_STREAM: (skip) (attributes doc.skip=true)
 */
#define GST_MTS_DESC_AC3_AUDIO_STREAM GST_MTS_DESC_ATSC_AC3

_TYPE_PLAY_SUBTITLE_INFO))

/**
 * GstPlaySubtitleInfo:
 *
 * #GstPlayStreamInfo specific to subtitle streams.
 * Since: 1.20
 */
typedef struct _GstPlaySubtitleInfo GstPlaySubtitleInfo;
typedef struct _GstPlaySubtitleInfoClass GstPlaySubtitleInfoClass;

GST_PLAY_API
GType         gst_play_subtitle_info_get_type (void);

GST_PLAY_API
const gchar * gst_play_subtitle_info_get_language (const GstPlaySubtitleInfo* info);

/**
 * GST_TYPE_PLAY_MEDIA_INFO:
 * Since: 1.20
 */
#define GST_TYPE_PLAY_MEDIA_INFO \
  (gst_play_media_info_get_type())
#define GST_PLAY_MEDIA_INFO(obj) \
  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_PLAY_MEDIA_INFO,GstPlayMediaInfo))
#define GST_PLAY_MEDIA_INFO_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_PLAY_MEDIA_INFO,GstPlayMediaInfoClass))
#define GST_IS_PLAY_MEDIA_INFO(obj) \
  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_PLAY_MEDIA_INFO))
#define GST_IS_PLAY_MEDIA_INFO_CLASS(klass) \
  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_PLAY_MEDIA_INFO))

/**
 * GstPlayMediaInfo:
 *
 * Structure containing the media information of a URI.
 * Since: 1.20
 */
typedef struct _GstPlayMediaInfo GstPlayMediaInfo;
typedef struct _GstPlayMediaInfoClass GstPlayMediaInfoClass;

#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstPlayMediaInfo, g_object_unref)
#endif

GST_PLAY_API
GType         gst_play_media_info_get_type (void);

GST_PLAY_API
const gchar * gst_play_media_info_get_uri (const GstPlayMediaInfo *info);

GST_PLAY_API
gboolean      gst_play_media_info_is_seekable (const GstPlayMediaInfo *info);

GST_PLAY_API
gboolean      gst_play_media_info_is_live (const GstPlayMediaInfo *info);

GST_PLAY_API
GstClockTime  gst_play_media_info_get_duration (const GstPlayMediaInfo *info);

GST_PLAY_API
GList*        gst_play_media_info_get_stream_list (const GstPlayMediaInfo *info);

GST_PLAY_API
guint         gst_play_media_info_get_number_of_streams (const GstPlayMediaInfo *info);

GST_PLAY_API
GList*        gst_play_media_info_get_viMethod;

#define GST_TYPE_CUDA_MEMORY_ALLOC_METHOD (gst_cuda_memory_alloc_method_get_type())
GST_CUDA_API
GType gst_cuda_memory_alloc_method_get_type (void);

/**
 * GST_CUDA_ALLOCATOR_OPT_STREAM_ORDERED:
 *
 * #G_TYPE_BOOLEAN Allows stream ordered allocation. Default is %FALSE
 *
 * Since: 1.26
 */
#define GST_CUDA_ALLOCATOR_OPT_STREAM_ORDERED "GstCudaAllocator.stream-ordered"

/**
 * GstCudaMemoryAllocatorNeedPoolCallback: (skip)
 * @allocator: a #GstCudaAllocator
 * @context: a #GstCudaContext
 * @user_data: the user data
 *
 * Called to request cuda memory pool object. If callee returns a memory pool,
 * @allocator will allocate memory via cuMemAllocFromPoolAsync.
 * Otherwise device default memory pool will be used with cuMemAllocAsync method
 *
 * Returns: (transfer full) (nullable): Configured #GstCudaMemoryPool object
 *
 * Since: 1.26
 */
typedef GstCudaMemoryPool * (*GstCudaMemoryAllocatorNeedPoolCallback) (GstCudaAllocator * allocator,
                                                                       GstCudaContext * context,
                                                                       gpointer user_data);

/**
 * GstCudaMemory:
 *
 * Since: 1.22
 */
struct _GstCudaMemory
{
  GstMemory mem;

  /*< public >*/
  GstCudaContext *context;
  GstVideoInfo info;

  /*< private >*/
  GstCudaMemoryPrivate *priv;
  gpointer _gst_reserved[GST_PADDING];
};

GST_CUDA_API
void            gst_cuda_memory_init_once   (void);

GST_CUDA_API
gboolean        gst_is_cuda_memory          (GstMemory * mem);

GST_CUDA_API
GstCudaStream * gst_cuda_memory_get_stream  (GstCudaMemory * mem);

GST_CUDA_API
void            gst_cuda_memory_sync        (GstCudaMemory * mem);

GST_CUDA_API
gboolean        gst_cuda_memory_get_texture (GstCudaMemory * mem,
                                             guint plane,
                                             CUfilter_mode filter_mode,
                                             CUtexObject * texture);

GST_CUDA_API
gpointethis library; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301 USA.
 */

#pragma once

#include <gst/wayland/wayland.h>
#include <gst/video/video.h>

G_BEGIN_DECLS

#define GST_TYPE_WL_WINDOW (gst_wl_window_get_type ())

GST_WL_API
G_DECLARE_FINAL_TYPE (GstWlWindow, gst_wl_window, GST, WL_WINDOW, GObject);

struct _GstWlWindow
{
  GObject parent_instance;
};

GST_WL_API
void gst_wl_window_ensure_fullscreen (GstWlWindow * self,
        gboolean fullscreen);

GST_WL_API
GstWlWindow *gst_wl_window_new_toplevel (GstWlDisplay * display,
        const GstVideoInfo * info, gboolean fullscreen, GMutex * render_lock);

GST_WL_API
GstWlWindow *gst_wl_window_new_in_surface (GstWlDisplay * display,
        struct wl_surface * parent, GMutex * render_lock);

GST_WL_API
GstWlDisplay *gst_wl_window_get_display (GstWlWindow * self);

GST_WL_API
struct wl_surface *gst_wl_window_get_wl_surface (GstWlWindow * self);

GST_WL_API
struct wl_subsurface *gst_wl_window_get_subsurface (GstWlWindow * self);

GST_WL_API
gboolean gst_wl_window_is_toplevel (GstWlWindow * self);

GST_WL_API
gboolean gst_wl_window_render (GstWlWindow * self, GstWlBuffer * buffer,
        const GstVideoInfo * info);

GST_WL_API
void gst_wl_window_set_render_rectangle (GstWlWindow * self, gint x, gint y,
        gint w, gint h);

GST_WL_API
const GstVideoRectangle *gst_wl_window_get_render_rectangle (GstWlWindow * self);

GST_WL_API
void gst_wl_window_set_rotate_method (GstWlWindow               *self,
        GstVideoOrientationMethod  rotate_method);

G_END_DECLS
/* GStreamer
 *
 * SPDX-License-Identifier: LGPL-2.1
 *
 * Copyright (C) 2013 Google Inc. All rights reserved.
 * Copyright (C) 2013 Orange
 * Copyright (C) 2013-2017 Apple Inc. All rights reserved.
 * Copyright (C) 2014 Sebastian DrÃ¶ge <sebastian@centricular.com>
 * Copyright (C) 2015, 2016 Igalia, S.L
 * Copyright (C) 2015, 2016 Metrological Group B.V.
 * Copyright (C) 2022, 2023 Collabton, MA 02110-1301, USA.
 */

#ifndef _GST_MPEGTS_H_
#define _GST_MPEGTS_H_

#ifndef GST_USE_UNSTABLE_API
#warning "The GStreamer mpegts library is unstable API and may change in future."
#warning "You can define GST_USE_UNSTABLE_API to avoid this warning."
#endif

#include <gst/mpegts/mpegts-prelude.h>
#include <gst/mpegts/gstmpegtsdescriptor.h>
#include <gst/mpegts/gst-atsc-descriptor.h>
#include <gst/mpegts/gst-dvb-descriptor.h>
#include <gst/mpegts/gst-isdb-descriptor.h>
#include <gst/mpegts/gstmpegtssection.h>
#include <gst/mpegts/gst-atsc-section.h>
#include <gst/mpegts/gst-dvb-section.h>
#include <gst/mpegts/gst-scte-section.h>
#include <gst/mpegts/gstmpegts-enumtypes.h>
#include <gst/mpegts/gst-hdmv-section.h>

G_BEGIN_DECLS

GST_MPEGTS_API
void gst_mpegts_initialize (void);

G_END_DECLS

#endif
/* GStreamer
 * Copyright (C) 2017 Matthew Waters <matthew@centricular.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __GST_WEBRTC_ICE_H__
#define __GST_WEBRTC_ICE_H__

#include <gst/webrtc/webrtc_fwd.h>

G_BEGIN_DECLS

GST_WEBRTC_API
GType gst_webrtc_ice_get_type(void);
#define GST_TYPE_WEBRTC_ICE            (gst_webrtc_ice_get_type())
#define GST_WEBRTC_ICE(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_WEBRTC_ICE,GstWebRTCICE))
#define GST_IS_WEBRTCTA_H__

#include <gst/gst.h>
#include <gst/codecparsers/codecparsers-prelude.h>

G_BEGIN_DECLS

#define GST_LCEVC_META_API_TYPE (gst_lcevc_meta_api_get_type())
#define GST_LCEVC_META_INFO  (gst_lcevc_meta_get_info())
typedef struct _GstLcevcMeta GstLcevcMeta;

#define GST_CAPS_FEATURE_META_GST_LCEVC_META "meta:GstLcevcMeta"

/**
 * GstLcevcMeta:
 * @meta: parent #GstMeta
 * @id: the id of the LCEVC meta
 * @enhancement_data: the parsed LCEVC enhancement data
 *
 * LCEVC data for LCEVC codecs
 *
 * Since: 1.26
 */
struct _GstLcevcMeta {
  GstMeta meta;

  gint id;
  GstBuffer *enhancement_data;
};

GST_CODEC_PARSERS_API
GType gst_lcevc_meta_api_get_type (void);

GST_CODEC_PARSERS_API
const GstMetaInfo * gst_lcevc_meta_get_info (void);

GST_CODEC_PARSERS_API
GstLcevcMeta * gst_buffer_get_lcevc_meta (GstBuffer *buffer);

GST_CODEC_PARSERS_API
GstLcevcMeta * gst_buffer_get_lcevc_meta_id (GstBuffer *buffer, gint id);

GST_CODEC_PARSERS_API
GstLcevcMeta * gst_buffer_add_lcevc_meta (GstBuffer *buffer,
    GstBuffer *enhancement_data);

G_END_DECLS

#endif /* __GST_VIDEO_META_H__ */

/* This file is generated by glib-mkenums, do not modify it. This code is licensed under the same license as the containing project. Note that it links to GLib, so must comply with the LGPL linking clauses. */

#pragma once

#include <glib-object.h>
#include <gst/transcoder/transcoder-prelude.h>

G_BEGIN_DECLS

/* enumerations from "gsttranscoder.h" */

GST_TRANSCODER_API
GType gst_transcoder_error_get_type (void);
#define GST_TYPE_TRANSCODER_ERROR (gst_transcoder_error_get_type())

GST_TRANSCODER_API
GType gst_transcoder_state_get_type (void);
#define GST_TYPE_TRANSCODER_STATE (gst_transcoder_state_get_type())

GST_TRANSCODER_API
GType gst_transcoder_message_get_type (void);
#define GST_TYPE_TRANSCODER_MESSAGE (gst_transcoder_message_get_type())

G_END_DECLS

/* Generated data ends here */

/* GStreamer
 *  Copyright (C) 2021 Intel Corporation
 *     Author: He Junyan <junyan.he@intel.com>
 N_DESCRIPTOR_POOL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_VULKAN_DESCRIPTOR_POOL))
#define GST_VULKAN_DESCRIPTOR_POOL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_VULKAN_DESCRIPTOR_POOL, GstVulkanDescriptorPoolClass))

/**
 * GstVulkanDescriptorPool:
 * @parent: the parent #GstObject
 * @device: the #GstVulkanDevice for descriptor sets
 * @pool: the vulksn descriptor pool handle
 *
 * Since: 1.18
 */
struct _GstVulkanDescriptorPool
{
  GstObject parent;

  GstVulkanDevice *device;

  VkDescriptorPool pool; /* hides a pointer */

  /* <private> */
  gpointer _reserved        [GST_PADDING];
};

/**
 * GstVulkanDescriptorPoolClass:
 * @parent_class: the parent #GstObjectClass
 *
 * Since: 1.18
 */
struct _GstVulkanDescriptorPoolClass
{
  GstObjectClass parent_class;

  /* <private> */
  gpointer _reserved        [GST_PADDING];
};

G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVulkanDescriptorPool, gst_object_unref);

GST_VULKAN_API
GstVulkanDescriptorPool *   gst_vulkan_descriptor_pool_new_wrapped      (GstVulkanDevice * device,
                                                                         VkDescriptorPool pool,
                                                                         gsize max_sets);

GST_VULKAN_API
GstVulkanDevice *           gst_vulkan_descriptor_pool_get_device       (GstVulkanDescriptorPool * pool);

GST_VULKAN_API
GstVulkanDescriptorSet *    gst_vulkan_descriptor_pool_create           (GstVulkanDescriptorPool * pool,
                                                                         guint n_layouts,
                                                                         GstVulkanHandle **layouts,
                                                                         GError ** error);
GST_VULKAN_API
gsize                       gst_vulkan_descriptor_pool_get_max_sets     (GstVulkanDescriptorPool * pool);

#endif /* __GST_VULKAN_DESCRIPTOR_POOL_H__ */
/* GStreamer Wayland Library
 *
 * Copyright (C) 2022 Collabora Ltd.
 *
 ndicating that this frame may use inter prediction.
 * @order_hints: specifies the expected output order for each reference frame.
 * @ref_frame_sign_bias: specifies the intended direction of the motion vector in time for
 *   each reference frame.
 * @coded_lossless: is a variable that is equal to 1 when all segments use lossless encoding.
 * @all_lossless: is a variable that is equal to 1 when @coded_lossless is equal to 1 and
 *   @frame_width is equal to @upscaled_width. This indicates that the frame is fully lossless
 *   at the upscaled resolution.
 * @lossless_array: whether the segmentation is lossless.
 * @seg_qm_Level: the segmentation's qm level.
 * @upscaled_width: the upscaled width.
 * @frame_width: the frame width.
 * @frame_height: the frame height.
 * @render_width: the frame width to be rendered.
 * @render_height: the frame height to be rendered.
 * @tx_mode: specifies how the transform size is determined.
 * @skip_mode_frame: specifies the frames to use for compound prediction when @skip_mode is 1.
 * @expected_frame_id: specifies the frame id for each frame used for reference. (Since: 1.24)
 * @ref_global_motion_params: specifies the global motion parameters of the reference. (Since: 1.24)
 */
struct _GstAV1FrameHeaderOBU {
  gboolean show_existing_frame;
  gint8 frame_to_show_map_idx;
  guint32 frame_presentation_time;
  guint32 tu_presentation_delay;
  guint32 display_frame_id;
  GstAV1FrameType frame_type;
  gboolean show_frame;
  gboolean showable_frame;
  gboolean error_resilient_mode;
  gboolean disable_cdf_update;
  guint8 allow_screen_content_tools;
  gboolean force_integer_mv;
  guint32 current_frame_id;
  gboolean frame_size_override_flag;
  guint32 order_hint;
  guint8 primary_ref_frame;
  gboolean buffer_removal_time_present_flag;
  guint32 buffer_removal_time[GST_AV1_MAX_OPERATING_POINTS];
  guint8 refresh_frame_flags;
  guint32 ref_order_hint[GST_AV1_NUM_REF_FRAMES];
  gboolean allow_intrabc;
  gboolean frame_refs_short_signalingtation is enabled.
 * @feature_data: the value of according segmentation feature.
 * @seg_id_pre_skip: equal to 1 indicates that the segment id will be read before the skip
 *   syntax element. @seg_id_pre_skip equal to 0 indicates that the skip syntax element will be
 *   read first.
 * @last_active_seg_id: indicates the highest numbered segment id that has some enabled feature.
 *   This is used when decoding the segment id to only decode choices corresponding to used
 *   segments.
 */
struct _GstAV1SegmenationParams {
  gboolean segmentation_enabled;
  guint8 segmentation_update_map;
  guint8 segmentation_temporal_update;
  guint8 segmentation_update_data;

  gint8 feature_enabled[GST_AV1_MAX_SEGMENTS][GST_AV1_SEG_LVL_MAX]; /* FeatureEnabled */
  gint16 feature_data[GST_AV1_MAX_SEGMENTS][GST_AV1_SEG_LVL_MAX]; /* FeatureData */
  guint8 seg_id_pre_skip; /* SegIdPreSkip */
  guint8 last_active_seg_id; /* LastActiveSegId */
};

/**
 * GstAV1TileInfo:
 * @uniform_tile_spacing_flag: equal to 1 means that the tiles are uniformly spaced across the
 *   frame. (In other words, all tiles are the same size except for the ones at the right and
 *   bottom edge which can be smaller.) @uniform_tile_spacing_flag equal to 0 means that the
 *   tile sizes are coded.
 * @increment_tile_rows_log2: is used to compute @tile_rows_log2.
 * @width_in_sbs_minus_1: specifies the width of a tile minus 1 in units of superblocks.
 * @height_in_sbs_minus_1: specifies the height of a tile minus 1 in units of superblocks.
 * @tile_size_bytes_minus_1: is used to compute @tile_size_bytes
 * @context_update_tile_id: specifies which tile to use for the CDF update.
 * @mi_col_starts: is an array specifying the start column (in units of 4x4 luma samples) for
 *   each tile across the image.
 * @mi_row_starts: is an array specifying the start row (in units of 4x4 luma samples) for
 *   each tile down the image.
 * @tile_cols_log2: specifies the base 2 logarithm of the desired number of tiles acrose
 *   value of @hours_value for the previous set of clock timestamp syntax elements in decoding
 *   order, and it is required that such a previous @hours_value shall have been present.
 * @time_offset_length: greater than 0 specifies the length in bits of the @time_offset_value
 *   syntax element. @time_offset_length equal to 0 specifies that the @time_offset_value syntax
 *   element is not present. @time_offset_length should be the same for all pictures in the
 *   coded video sequence.
 * @time_offset_value: is used to compute clockTimestamp. The number of bits used to represent
 *   @time_offset_value is equal to @time_offset_length. When @time_offset_value is not present,
 *   its value is inferred to be equal to 0.
 */
struct _GstAV1MetadataTimecode {
  guint8 counting_type;       /* candidate for sperate Type GstAV1TimecodeCountingType */
  gboolean full_timestamp_flag;
  gboolean discontinuity_flag;
  gboolean cnt_dropped_flag;
  guint8 n_frames;
  gboolean seconds_flag;
  guint8 seconds_value;
  gboolean minutes_flag;
  guint8 minutes_value;
  gboolean hours_flag;
  guint8 hours_value;
  guint8 time_offset_length;
  guint32 time_offset_value;
};

/**
 * GstAV1MetadataOBU:
 * @metadata_type: type of metadata
 * @itut_t35: ITUT T35 metadata
 * @hdrcll: high dynamic range content light level metadata
 * @hdrcmdcv: high dynamic range mastering display color volume metadata_type
 * @scalability: Scalability metadata
 * @timecode: Timecode metadata
 */
struct _GstAV1MetadataOBU {
  GstAV1MetadataType metadata_type;
  union {
    GstAV1MetadataITUT_T35 itut_t35;
    GstAV1MetadataHdrCll hdr_cll;
    GstAV1MetadataHdrMdcv hdr_mdcv;
    GstAV1MetadataScalability scalability;
    GstAV1MetadataTimecode timecode;
  };
};

/**
 * GstAV1LoopFilterParams:
 * @loop_filter_level: is an array containing loop filter strength values. Different loop
 *   filter strength values from the array are used depending on the image plane being
 *   filtered, and the edge directioncification.
 * @subsampling_x, @subsampling_y: specify the chroma subsampling format. If
 *   @matrix_coefficients is equal to GST_AV1_MC_IDENTITY, it is a requirement of bitstream
 *   conformance that @subsampling_x is equal to 0 and @subsampling_y is equal to 0.
 * @chroma_sample_position specifies the sample position for subsampled streams:
 * @separate_uv_delta_q: equal to 1 indicates that the U and V planes may have separate
 *  delta quantizer values. @separate_uv_delta_q equal to 0 indicates that the U and V
 *  planes will share the same delta quantizer value.
 */
struct _GstAV1ColorConfig {
  gboolean high_bitdepth;
  gboolean twelve_bit;
  gboolean mono_chrome;
  gboolean color_description_present_flag;
  GstAV1ColorPrimaries color_primaries;
  GstAV1TransferCharacteristics transfer_characteristics;
  GstAV1MatrixCoefficients matrix_coefficients;
  gboolean color_range;
  guint8 subsampling_x;
  guint8 subsampling_y;
  GstAV1ChromaSamplePositions chroma_sample_position;
  gboolean separate_uv_delta_q;
};

/**
 * GstAV1SequenceHeaderOBU:
 * @seq_profile: specifies the features that can be used in the coded video sequence
 * @still_picture: equal to 1 specifies that the bitstream contains only one coded frame.
 * @reduced_still_picture_header: specifies that the syntax elements not needed by a still
 *   picture are omitted.
 * @frame_width_bits_minus_1: specifies the number of bits minus 1 used for transmitting
 *   the frame width syntax elements.
 * @frame_height_bits_minus_1: specifies the number of bits minus 1 used for transmitting
 *   the frame height syntax elements.
 * @max_frame_width_minus_1: specifies the maximum frame width minus 1 for the frames
 *   represented by this sequenceheader.
 * @max_frame_height_minus_1: specifies the maximum frame height minus 1 for the frames
 *   represented by this sequenceheader.
 * @frame_id_numbers_present_flag: specifies whether frame id numbers are present in the bitstream.
 * @delta_frame_id_length_minu GstAV1LoopRestorationParams;
typedef struct _GstAV1GlobalMotionParams GstAV1GlobalMotionParams;
typedef struct _GstAV1FilmGrainParams GstAV1FilmGrainParams;

typedef struct _GstAV1ReferenceFrameInfo GstAV1ReferenceFrameInfo;
typedef struct _GstAV1ReferenceFrameInfoEntry GstAV1ReferenceFrameInfoEntry;

/**
 * GstAV1ParserResult:
 * @GST_AV1_PARSER_OK: successful return
 * @GST_AV1_PARSER_NO_MORE_DATA: the parser needs more data for one OBU
 * @GST_AV1_PARSER_DROP: no need to handle this OBU, skip it
 * @GST_AV1_PARSER_BITSTREAM_ERROR: stream error, for example, include invalid bits
 * @GST_AV1_PARSER_MISSING_OBU_REFERENCE: no reference, for example, no sequence found
 * @GST_AV1_PARSER_INVALID_OPERATION: something like invalid parameters
 *
 * Defines the result of parser process
 */
typedef enum {
  GST_AV1_PARSER_OK = 0,
  GST_AV1_PARSER_NO_MORE_DATA = 1,
  GST_AV1_PARSER_DROP = 2,
  GST_AV1_PARSER_BITSTREAM_ERROR = 3,
  GST_AV1_PARSER_MISSING_OBU_REFERENCE = 4,
  GST_AV1_PARSER_INVALID_OPERATION = 5,
} GstAV1ParserResult;

/**
 * GstAV1Profile:
 * @GST_AV1_PROFILE_0: 8-bit and 10-bit 4:2:0 and 4:0:0 only.
 * @GST_AV1_PROFILE_1: 8-bit and 10-bit 4:4:4.
 * @GST_AV1_PROFILE_2: 8-bit and 10-bit 4:2:2, 12-bit 4:0:0 4:2:2 and 4:4:4
 * @GST_AV1_PROFILE_UNDEFINED: unknow AV1 profile (Since: 1.20)
 *
 * Defines the AV1 profiles
 */
/**
 * GST_AV1_PROFILE_UNDEFINED:
 *
 * unknow AV1 profile
 *
 * Since: 1.20
 */
typedef enum {
  GST_AV1_PROFILE_0 = 0,
  GST_AV1_PROFILE_1 = 1,
  GST_AV1_PROFILE_2 = 2,
  GST_AV1_PROFILE_UNDEFINED,
} GstAV1Profile;

/**
 * GstAV1OBUType:
 * @GST_AV1_OBU_RESERVED_0: Reserved 0
 * @GST_AV1_OBU_SEQUENCE_HEADER: Sequence Header OBU
 * @GST_AV1_OBU_TEMPORAL_DELIMITER: Temporal Delimiter OBU
 * @GST_AV1_OBU_FRAME_HEADER: Frame Header OBU
 * @GST_AV1_OBU_TILE_GROUP: Tile Group OBU
 * @GST_AV1_OBU_METADATA: Metadata OBU
 * @GST_AV1_OBU_FRAME: Frame OBU (includes Frame Header and one Tile Group)
 * @GST_AV1_OBU_REDUNDANT_FRAME_HEADER: Redundant Fram_SESSION_PARAMETERS:
   *
   * video session parameters
   *
   * Since: 1.24
   */
  GST_VULKAN_HANDLE_TYPE_VIDEO_SESSION_PARAMETERS       = 9,
  /**
   * GST_VULKAN_HANDLE_TYPE_SAMPLER_YCBCR_CONVERSION:
   *
   * sampler with YCBCR conversion
   *
   * Since: 1.24
   */
  GST_VULKAN_HANDLE_TYPE_SAMPLER_YCBCR_CONVERSION      = 10,
} GstVulkanHandleType;

/**
 * GstVulkanHandle:
 * @parent: the parent #GstMiniObject
 * @device: the #GstVulkanDevice for this handle
 * @type: the type of handle
 * @handle: the handle value
 *
 * Holds information about a vulkan non dispatchable handle that only has
 * a vulkan device as a parent and no specific host synchronisation
 * requirements.  Command buffers have extra requirements that are serviced by
 * more specific implementations (#GstVulkanCommandBuffer, #GstVulkanCommandPool).
 *
 * Since: 1.18
 */
struct _GstVulkanHandle
{
  GstMiniObject             parent;

  GstVulkanDevice          *device;

  GstVulkanHandleType       type;
  GstVulkanHandleTypedef    handle;

  /* <protected> */
  GstVulkanHandleDestroyNotify notify;
  gpointer                  user_data;

  /* <private> */
  gpointer _reserved        [GST_PADDING];
};

/**
 * gst_vulkan_handle_ref: (skip)
 * @handle: a #GstVulkanHandle.
 *
 * Increases the refcount of the given handle by one.
 *
 * Returns: (transfer full): @buf
 *
 * Since: 1.18
 */
static inline GstVulkanHandle* gst_vulkan_handle_ref(GstVulkanHandle* handle);
static inline GstVulkanHandle *
gst_vulkan_handle_ref (GstVulkanHandle * handle)
{
  return (GstVulkanHandle *) gst_mini_object_ref (GST_MINI_OBJECT_CAST (handle));
}

/**
 * gst_vulkan_handle_unref: (skip)
 * @handle: (transfer full): a #GstVulkanHandle.
 *
 * Decreases the refcount of the buffer. If the refcount reaches 0, the buffer
 * will be freed.
 *
 * Since: 1.18
 */
static inline void gst_vulkan_handle_unref(GstVulkanHandle* handle);
static inline void
gst_vulkan_handle_unref (GstVulkanHandle * handle)
{
  gst_mini_object_unref                   GstStructure * config);

GST_PLAYER_API
GstStructure * gst_player_get_config                  (GstPlayer * player);

/* helpers for configuring the config structure */

GST_PLAYER_API
void           gst_player_config_set_user_agent       (GstStructure * config,
                                                       const gchar * agent);

GST_PLAYER_API
gchar *        gst_player_config_get_user_agent       (const GstStructure * config);

GST_PLAYER_API
void           gst_player_config_set_position_update_interval  (GstStructure * config,
                                                                guint          interval);

GST_PLAYER_API
guint          gst_player_config_get_position_update_interval  (const GstStructure * config);

GST_PLAYER_API
void           gst_player_config_set_seek_accurate (GstStructure * config, gboolean accurate);

GST_PLAYER_API
gboolean       gst_player_config_get_seek_accurate (const GstStructure * config);

typedef enum
{
  GST_PLAYER_THUMBNAIL_RAW_NATIVE = 0,
  GST_PLAYER_THUMBNAIL_RAW_xRGB,
  GST_PLAYER_THUMBNAIL_RAW_BGRx,
  GST_PLAYER_THUMBNAIL_JPG,
  GST_PLAYER_THUMBNAIL_PNG
} GstPlayerSnapshotFormat;

GST_PLAYER_API
GstSample * gst_player_get_video_snapshot (GstPlayer * player,
    GstPlayerSnapshotFormat format, const GstStructure * config);

G_END_DECLS

#endif /* __GST_PLAYER_H__ */
#ifndef __GST_TRANSCODER_H
#define __GST_TRANSCODER_H

#ifdef HAVE_CONFIG_H
#  include "config.h"
#endif

#include <gst/gst.h>
#include <gst/pbutils/pbutils.h>
#include <gst/transcoder/transcoder-prelude.h>
#include <gst/transcoder/transcoder-enumtypes.h>

G_BEGIN_DECLS

/*********** Error definitions ************/
#define      GST_TRANSCODER_ERROR                         (gst_transcoder_error_quark ())

/**
 * GstTranscoderError:
 * @GST_TRANSCODER_ERROR_FAILED: generic error.
 */
typedef enum {
  GST_TRANSCODER_ERROR_FAILED = 0
} GstTranscoderError;

GST_TRANSCODER_API
GQuark        gst_transcoder_error_quark    (void);
GST_TRulkan_display_wayland_get_type (void);

#define GST_VULKAN_DISPLAY_WAYLAND(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_VULKAN_DISPLAY_WAYLAND,GstVulkanDisplayWayland))
#define GST_VULKAN_DISPLAY_WAYLAND_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_VULKAN_DISPLAY_WAYLAND,GstVulkanDisplayWaylandClass))
#define GST_IS_VULKAN_DISPLAY_WAYLAND(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_VULKAN_DISPLAY_WAYLAND))
#define GST_IS_VULKAN_DISPLAY_WAYLAND_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_VULKAN_DISPLAY_WAYLAND))
/**
 * GST_VULKAN_DISPLAY_WAYLAND_CAST:
 *
 * Since: 1.18
 */
#define GST_VULKAN_DISPLAY_WAYLAND_CAST(obj)        ((GstVulkanDisplayWayland*)(obj))

typedef struct _GstVulkanDisplayWayland GstVulkanDisplayWayland;
typedef struct _GstVulkanDisplayWaylandClass GstVulkanDisplayWaylandClass;

/**
 * GstVulkanDisplayWayland:
 *
 * the contents of a #GstVulkanDisplayWayland are private and should only be accessed
 * through the provided API
 *
 * Since: 1.18
 */
struct _GstVulkanDisplayWayland
{
  GstVulkanDisplay            parent;

  struct wl_display       *display;
  struct wl_registry      *registry;
  struct wl_compositor    *compositor;
  struct wl_subcompositor *subcompositor;
  struct wl_shell         *shell;

  /* <private> */
  gboolean foreign_display;
};

/**
 * GstVulkanDisplayWaylandClass:s
 *
 * Since: 1.18
 */
struct _GstVulkanDisplayWaylandClass
{
  GstVulkanDisplayClass object_class;
};

/**
 * GST_VULKAN_DISPLAY_WAYLAND_DISPLAY
 *
 * Since: 1.18
 */
#define GST_VULKAN_DISPLAY_WAYLAND_DISPLAY(display_) (GST_VULKAN_DISPLAY_WAYLAND (display_)->display)

GST_VULKAN_API
GstVulkanDisplayWayland *gst_vulkan_display_wayland_new (const gchar * name);
GST_VULKAN_API
GstVulkanDisplayWayland *gst_vulkan_display_wayland_new_with_display (struct wl_display *display);

G_END_DECLS

#endif /* __GST_VULKAN_DISPLAY_WAYLAND_H__ */
/* GStreamer
 *
 * Copyright (C) 2014-2015 Sebastian DrÃ¶ge <sebastian@centriT_AUDIO_BAD_PRELUDE_H__ */
/*
 * GStreamer
 * Copyright (C) 2015 Matthew Waters <matthew@centricular.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef __GST_VULKAN_BASE_BUFFER_H__
#define __GST_VULKAN_BASE_BUFFER_H__

#include <gst/gst.h>
#include <gst/gstallocator.h>
#include <gst/gstmemory.h>

#include <gst/vulkan/vulkan.h>

G_BEGIN_DECLS

#define GST_TYPE_VULKAN_MEMORY_ALLOCATOR (gst_vulkan_memory_allocator_get_type())
GST_VULKAN_API
GType gst_vulkan_memory_allocator_get_type(void);

#define GST_IS_VULKAN_MEMORY_ALLOCATOR(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_VULKAN_MEMORY_ALLOCATOR))
#define GST_IS_VULKAN_MEMORY_ALLOCATOR_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_VULKAN_MEMORY_ALLOCATOR))
#define GST_VULKAN_MEMORY_ALLOCATOR_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_VULKAN_MEMORY_ALLOCATOR, GstVulkanMemoryAllocatorClass))
#define GST_VULKAN_MEMORY_ALLOCATOR(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_VULKAN_MEMORY_ALLOCATOR, GstVulkanMemoryAllocator))
#define GST_VULKAN_MEMORY_ALLOCATOR_CLASS(klass)         (G_TYPE_CHECK_C