base: Add g_autoptr() support to all types

https://bugzilla.gnome.org/show_bug.cgi?id=754464
This commit is contained in:
Xavier Claessens 2015-11-10 12:54:23 -05:00 committed by Nicolas Dufresne
parent 3642e9a391
commit 429860e51f
35 changed files with 188 additions and 0 deletions

View file

@ -82,6 +82,10 @@ GstMemory * gst_fd_allocator_alloc (GstAllocator * allocator, gint fd,
gboolean gst_is_fd_memory (GstMemory *mem);
gint gst_fd_memory_get_fd (GstMemory *mem);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstFdAllocator, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_FD_ALLOCATOR_H__ */

View file

@ -123,6 +123,10 @@ void gst_app_sink_set_callbacks (GstAppSink * appsink,
gpointer user_data,
GDestroyNotify notify);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAppSink, gst_object_unref)
#endif
G_END_DECLS
#endif

View file

@ -150,6 +150,10 @@ void gst_app_src_set_callbacks (GstAppSrc * appsrc,
gpointer user_data,
GDestroyNotify notify);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAppSrc, gst_object_unref)
#endif
G_END_DECLS
#endif

View file

@ -131,6 +131,10 @@ gboolean gst_audio_info_convert (const GstAudioInfo * info,
gboolean gst_audio_info_is_equal (const GstAudioInfo *info,
const GstAudioInfo *other);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioInfo, gst_audio_info_free)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_INFO_H__ */

View file

@ -258,6 +258,10 @@ gst_audio_base_sink_set_custom_slaving_callback (GstAudioBaseSink * sink,
void gst_audio_base_sink_report_device_failure (GstAudioBaseSink * sink);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioBaseSink, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_BASE_SINK_H__ */

View file

@ -145,6 +145,10 @@ GstAudioBaseSrcSlaveMethod
gst_audio_base_src_get_slave_method (GstAudioBaseSrc *src);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioBaseSrc, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_BASE_SRC_H__ */

View file

@ -139,6 +139,10 @@ GType gst_audio_cd_src_mode_get_type (void);
gboolean gst_audio_cd_src_add_track (GstAudioCdSrc * src,
GstAudioCdSrcTrack * track);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioCdSrc, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_CD_SRC_H__ */

View file

@ -99,6 +99,10 @@ GstClockTime gst_audio_clock_adjust (GstClock * clock, GstClockTime
void gst_audio_clock_invalidate (GstClock * clock);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioClock, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_CLOCK_H__ */

View file

@ -397,6 +397,10 @@ void gst_audio_decoder_merge_tags (GstAudioDecoder * dec,
void gst_audio_decoder_set_use_default_pad_acceptcaps (GstAudioDecoder * decoder,
gboolean use);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioDecoder, gst_object_unref)
#endif
G_END_DECLS
#endif /* _GST_AUDIO_DECODER_H_ */

View file

@ -334,6 +334,10 @@ void gst_audio_encoder_get_allocator (GstAudioEncoder * enc,
void gst_audio_encoder_merge_tags (GstAudioEncoder * enc,
const GstTagList * tags, GstTagMergeMode mode);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioEncoder, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_ENCODER_H__ */

View file

@ -97,6 +97,10 @@ GType gst_audio_filter_get_type (void);
void gst_audio_filter_class_add_pad_templates (GstAudioFilterClass * klass,
GstCaps * allowed_caps);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioFilter, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_FILTER_H__ */

View file

@ -333,6 +333,10 @@ void gst_audio_ring_buffer_advance (GstAudioRingBuffer *buf,
void gst_audio_ring_buffer_may_start (GstAudioRingBuffer *buf, gboolean allowed);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioRingBuffer, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_RING_BUFFER_H__ */

View file

@ -99,6 +99,10 @@ struct _GstAudioSinkClass {
GType gst_audio_sink_get_type(void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioSink, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_SINK_H__ */

View file

@ -98,6 +98,10 @@ struct _GstAudioSrcClass {
GType gst_audio_src_get_type(void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstAudioSrc, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_AUDIO_SRC_H__ */

View file

@ -189,6 +189,22 @@ void gst_encoding_video_profile_set_variableframerate (GstEncodingVideoProfi
GstEncodingProfile * gst_encoding_profile_from_discoverer (GstDiscovererInfo *info);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingAudioProfile, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingContainerProfile, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingProfile, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingVideoProfile, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_PROFILE_H__ */

View file

@ -138,6 +138,10 @@ GstEncodingTarget * gst_encoding_target_load_from_file (const gchar *fi
GList * gst_encoding_list_available_categories (void);
GList * gst_encoding_list_all_targets (const gchar * categoryname);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstEncodingTarget, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_PROFILE_REGISTRY_H__ */

View file

@ -301,6 +301,34 @@ gst_discoverer_discover_uri (GstDiscoverer * discoverer,
const gchar * uri,
GError ** err);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDiscoverer, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDiscovererAudioInfo, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDiscovererContainerInfo, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDiscovererInfo, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDiscovererStreamInfo, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDiscovererSubtitleInfo, gst_object_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstDiscovererVideoInfo, gst_object_unref)
#endif
G_END_DECLS
#endif /* _GST_DISCOVERER_H */

View file

@ -141,6 +141,10 @@ gboolean gst_install_plugins_installation_in_progress (void);
gboolean gst_install_plugins_supported (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstInstallPluginsContext, gst_install_plugins_context_free)
#endif
G_END_DECLS
#endif /* __GST_PB_UTILS_INSTALL_PLUGINS_H__ */

View file

@ -101,6 +101,10 @@ GstFlowReturn gst_rtp_base_audio_payload_push (GstRTPBaseAud
GstFlowReturn gst_rtp_base_audio_payload_flush (GstRTPBaseAudioPayload * baseaudiopayload,
guint payload_len, GstClockTime timestamp);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRTPBaseAudioPayload, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_RTP_BASE_AUDIO_PAYLOAD_H__ */

View file

@ -120,6 +120,10 @@ GstFlowReturn gst_rtp_base_depayload_push (GstRTPBaseDepayload *filter,
GstFlowReturn gst_rtp_base_depayload_push_list (GstRTPBaseDepayload *filter, GstBufferList *out_list);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRTPBaseDepayload, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_RTP_BASE_DEPAYLOAD_H__ */

View file

@ -165,6 +165,10 @@ GstFlowReturn gst_rtp_base_payload_push (GstRTPBasePayload *payl
GstFlowReturn gst_rtp_base_payload_push_list (GstRTPBasePayload *payload,
GstBufferList *list);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRTPBasePayload, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_RTP_BASE_PAYLOAD_H__ */

View file

@ -98,6 +98,10 @@ gchar** gst_rtsp_url_decode_path_components
GstRTSPResult gst_rtsp_url_set_port (GstRTSPUrl *url, guint16 port);
GstRTSPResult gst_rtsp_url_get_port (const GstRTSPUrl *url, guint16 *port);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRTSPUrl, gst_rtsp_url_free)
#endif
G_END_DECLS
#endif /* __GST_RTSP_URL_H__ */

View file

@ -675,6 +675,14 @@ gboolean gst_mikey_message_add_rand_len (GstMIKEYMessage
/* General Extension Payload */
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstMIKEYMessage, gst_mikey_message_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstMIKEYPayload, gst_mikey_payload_unref)
#endif
G_END_DECLS
#endif /* __GST_MIKEY_H__ */

View file

@ -502,6 +502,10 @@ GstSDPResult gst_sdp_media_remove_attribute (GstSDPMedia *media,
GstSDPResult gst_sdp_media_add_attribute (GstSDPMedia *media, const gchar *key,
const gchar *value);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstSDPMessage, gst_sdp_message_free)
#endif
G_END_DECLS
#endif /* __GST_SDP_MESSAGE_H__ */

View file

@ -132,6 +132,10 @@ struct _GstTagDemuxClass
GType gst_tag_demux_get_type (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTagDemux, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_TAG_DEMUX_H__ */

View file

@ -80,6 +80,10 @@ struct _GstTagMuxClass {
GType gst_tag_mux_get_type (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTagMux, gst_object_unref)
#endif
G_END_DECLS
#endif

View file

@ -80,6 +80,10 @@ struct _GstColorBalanceChannelClass {
GType gst_color_balance_channel_get_type (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstColorBalanceChannel, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_COLOR_BALANCE_CHANNEL_H__ */

View file

@ -427,6 +427,10 @@ GstCaps * gst_video_decoder_proxy_getcaps (GstVideoDecoder * decoder,
void gst_video_decoder_set_use_default_pad_acceptcaps (GstVideoDecoder * decoder,
gboolean use);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoDecoder, gst_object_unref)
#endif
G_END_DECLS
#endif

View file

@ -344,6 +344,10 @@ void gst_video_encoder_get_allocator (GstVideoEncoder *encoder,
void gst_video_encoder_set_min_pts(GstVideoEncoder *encoder, GstClockTime min_pts);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoEncoder, gst_object_unref)
#endif
G_END_DECLS
#endif

View file

@ -81,6 +81,10 @@ struct _GstVideoFilterClass {
GType gst_video_filter_get_type (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoFilter, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_VIDEO_FILTER_H__ */

View file

@ -75,6 +75,10 @@ GType gst_video_buffer_pool_get_type (void);
GstBufferPool * gst_video_buffer_pool_new (void);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoBufferPool, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_VIDEO_POOL_H__ */

View file

@ -125,6 +125,10 @@ GType gst_video_sink_get_type (void);
void gst_video_sink_center_rect (GstVideoRectangle src, GstVideoRectangle dst,
GstVideoRectangle *result, gboolean scaling);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoSink, gst_object_unref)
#endif
G_END_DECLS
#endif /* __GST_VIDEO_SINK_H__ */

View file

@ -277,6 +277,14 @@ void gst_video_codec_frame_set_user_data (GstVideoCodecFrame *fr
GDestroyNotify notify);
gpointer gst_video_codec_frame_get_user_data (GstVideoCodecFrame *frame);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoCodecFrame, gst_video_codec_frame_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoCodecState, gst_video_codec_state_unref)
#endif
G_END_DECLS
#endif

View file

@ -363,6 +363,10 @@ gboolean gst_video_info_is_equal (const GstVideoInfo *info,
void gst_video_info_align (GstVideoInfo * info, GstVideoAlignment * align);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoInfo, gst_video_info_free)
#endif
G_END_DECLS
#endif /* __GST_VIDEO_INFO_H__ */

View file

@ -295,6 +295,14 @@ GstVideoOverlayCompositionMeta * gst_buffer_add_video_overlay_composition_meta (
#define gst_buffer_remove_video_overlay_composition_meta(b,m) \
gst_buffer_remove_meta((b),((GstMeta *) m))
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoOverlayComposition, gst_video_overlay_composition_unref)
#endif
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstVideoOverlayRectangle, gst_video_overlay_rectangle_unref)
#endif
G_END_DECLS
#endif /* __GST_VIDEO_OVERLAY_COMPOSITION_H__ */