From 2660a985bd9500c7eaacaab5c2c3baa6da318719 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 6 Jun 2018 12:38:17 +0200 Subject: [PATCH] Rebase last patch --- ...event-message-attempt-to-silence-com.patch | 73 ++++++++----------- 1 file changed, 29 insertions(+), 44 deletions(-) diff --git a/0001-WIP-buffer-caps-event-message-attempt-to-silence-com.patch b/0001-WIP-buffer-caps-event-message-attempt-to-silence-com.patch index 70d6bbe..545e690 100644 --- a/0001-WIP-buffer-caps-event-message-attempt-to-silence-com.patch +++ b/0001-WIP-buffer-caps-event-message-attempt-to-silence-com.patch @@ -1,4 +1,4 @@ -From b5790114ae5cda0b9e7596179d134bff285a47b7 Mon Sep 17 00:00:00 2001 +From a0d32a9b1e1446cb51bf355aad19f2b9a46e7213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 25 Jul 2016 23:48:50 +0100 Subject: [PATCH] WIP: buffer, caps, event, message: attempt to silence @@ -9,17 +9,17 @@ Subject: [PATCH] WIP: buffer, caps, event, message: attempt to silence https://bugzilla.gnome.org/show_bug.cgi?id=767255 --- gst/gstbuffer.h | 13 ++++++++++--- - gst/gstcaps.h | 34 +++++++++++++++++++++------------- + gst/gstcaps.h | 26 ++++++++++++++------------ gst/gstevent.h | 13 ++++++++++--- gst/gstmessage.h | 13 ++++++++++--- gst/gstminiobject.h | 16 ++++++++++++++++ - 5 files changed, 67 insertions(+), 22 deletions(-) + 5 files changed, 60 insertions(+), 21 deletions(-) diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h -index 4d72471..6a1eb59 100644 +index 2804b520f..527a64c86 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h -@@ -350,7 +350,8 @@ void gst_buffer_extract_dup (GstBuffer *buffer, gsize offset, +@@ -426,7 +426,8 @@ gboolean gst_buffer_unset_flags (GstBuffer * buffer, GstBufferFlags f static inline GstBuffer * gst_buffer_ref (GstBuffer * buf) { @@ -29,7 +29,7 @@ index 4d72471..6a1eb59 100644 } /** -@@ -363,7 +364,7 @@ gst_buffer_ref (GstBuffer * buf) +@@ -439,7 +440,7 @@ gst_buffer_ref (GstBuffer * buf) static inline void gst_buffer_unref (GstBuffer * buf) { @@ -38,7 +38,7 @@ index 4d72471..6a1eb59 100644 } /* copy buffer */ -@@ -382,7 +383,13 @@ gst_buffer_unref (GstBuffer * buf) +@@ -458,7 +459,13 @@ gst_buffer_unref (GstBuffer * buf) static inline GstBuffer * gst_buffer_copy (const GstBuffer * buf) { @@ -52,12 +52,12 @@ index 4d72471..6a1eb59 100644 + return u.buffer; } - GstBuffer * gst_buffer_copy_deep (const GstBuffer * buf); + GST_API diff --git a/gst/gstcaps.h b/gst/gstcaps.h -index b9d00dd..6bc9b87 100644 +index 0d9530099..6914a74dc 100644 --- a/gst/gstcaps.h +++ b/gst/gstcaps.h -@@ -35,6 +35,16 @@ GST_EXPORT GType _gst_caps_type; +@@ -35,6 +35,16 @@ GST_API GType _gst_caps_type; #define GST_CAPS_CAST(obj) ((GstCaps*)(obj)) #define GST_CAPS(obj) (GST_CAPS_CAST(obj)) @@ -74,7 +74,7 @@ index b9d00dd..6bc9b87 100644 #define GST_TYPE_STATIC_CAPS (gst_static_caps_get_type()) /** -@@ -187,6 +197,7 @@ GST_EXPORT GstCaps * _gst_caps_none; +@@ -188,6 +198,7 @@ GST_API GstCaps * _gst_caps_none; */ #define GST_CAPS_FLAG_UNSET(caps,flag) GST_MINI_OBJECT_FLAG_UNSET (caps, flag) @@ -82,7 +82,7 @@ index b9d00dd..6bc9b87 100644 /* refcounting */ /** * gst_caps_ref: -@@ -206,7 +217,8 @@ GST_EXPORT GstCaps * _gst_caps_none; +@@ -207,7 +218,8 @@ GST_API GstCaps * _gst_caps_none; static inline GstCaps * gst_caps_ref (GstCaps * caps) { @@ -92,7 +92,7 @@ index b9d00dd..6bc9b87 100644 } /** -@@ -219,7 +231,7 @@ gst_caps_ref (GstCaps * caps) +@@ -220,7 +232,7 @@ gst_caps_ref (GstCaps * caps) static inline void gst_caps_unref (GstCaps * caps) { @@ -101,25 +101,11 @@ index b9d00dd..6bc9b87 100644 } /* copy caps */ -@@ -241,7 +253,13 @@ gst_caps_unref (GstCaps * caps) - static inline GstCaps * - gst_caps_copy (const GstCaps * caps) - { -- return GST_CAPS (gst_mini_object_copy (GST_MINI_OBJECT_CAST (caps))); -+ union { -+ GstMiniObject *mo; -+ GstCaps *caps; -+ } u; -+ -+ u.mo = gst_mini_object_copy (&caps->mini_object); -+ return u.caps; +@@ -300,16 +312,6 @@ gst_caps_take (GstCaps **old_caps, GstCaps *new_caps) + return gst_mini_object_take ((GstMiniObject **) old_caps, (GstMiniObject *) new_caps); } - /** -@@ -316,16 +334,6 @@ gst_caps_take (GstCaps **old_caps, GstCaps *new_caps) - } - - /** +-/** - * GstCaps: - * @mini_object: the parent type - * @@ -129,15 +115,14 @@ index b9d00dd..6bc9b87 100644 - GstMiniObject mini_object; -}; - --/** + /** * GstStaticCaps: * @caps: the cached #GstCaps - * @string: a string describing a caps diff --git a/gst/gstevent.h b/gst/gstevent.h -index e7dbb25..65e4272 100644 +index b43f5aef7..d2d2fa5ec 100644 --- a/gst/gstevent.h +++ b/gst/gstevent.h -@@ -425,7 +425,8 @@ GstEventTypeFlags +@@ -435,7 +435,8 @@ GstEventTypeFlags static inline GstEvent * gst_event_ref (GstEvent * event) { @@ -147,7 +132,7 @@ index e7dbb25..65e4272 100644 } /** -@@ -437,7 +438,7 @@ gst_event_ref (GstEvent * event) +@@ -447,7 +448,7 @@ gst_event_ref (GstEvent * event) static inline void gst_event_unref (GstEvent * event) { @@ -156,7 +141,7 @@ index e7dbb25..65e4272 100644 } /* copy event */ -@@ -452,7 +453,13 @@ gst_event_unref (GstEvent * event) +@@ -462,7 +463,13 @@ gst_event_unref (GstEvent * event) static inline GstEvent * gst_event_copy (const GstEvent * event) { @@ -170,12 +155,12 @@ index e7dbb25..65e4272 100644 + return u.event; } - GType gst_event_get_type (void); + GST_API diff --git a/gst/gstmessage.h b/gst/gstmessage.h -index 68213eb..b585729 100644 +index 84c16ba77..e398b944d 100644 --- a/gst/gstmessage.h +++ b/gst/gstmessage.h -@@ -354,7 +354,8 @@ GQuark gst_message_type_to_quark (GstMessageType type); +@@ -363,7 +363,8 @@ GQuark gst_message_type_to_quark (GstMessageType type); static inline GstMessage * gst_message_ref (GstMessage * msg) { @@ -185,7 +170,7 @@ index 68213eb..b585729 100644 } /** -@@ -367,7 +368,7 @@ gst_message_ref (GstMessage * msg) +@@ -376,7 +377,7 @@ gst_message_ref (GstMessage * msg) static inline void gst_message_unref (GstMessage * msg) { @@ -194,7 +179,7 @@ index 68213eb..b585729 100644 } /* copy message */ -@@ -384,7 +385,13 @@ gst_message_unref (GstMessage * msg) +@@ -393,7 +394,13 @@ gst_message_unref (GstMessage * msg) static inline GstMessage * gst_message_copy (const GstMessage * msg) { @@ -210,10 +195,10 @@ index 68213eb..b585729 100644 /** diff --git a/gst/gstminiobject.h b/gst/gstminiobject.h -index 88eb080..3763e64 100644 +index f7aa87a00..e010d63fd 100644 --- a/gst/gstminiobject.h +++ b/gst/gstminiobject.h -@@ -269,6 +269,22 @@ GstMiniObject * gst_mini_object_steal (GstMiniObject **olddata) G_GNUC +@@ -293,6 +293,22 @@ GstMiniObject * gst_mini_object_steal (GstMiniObject **olddata) G_GNUC (GBoxedCopyFunc) gst_mini_object_ref, \ (GBoxedFreeFunc) gst_mini_object_unref) @@ -237,5 +222,5 @@ index 88eb080..3763e64 100644 #endif -- -2.8.1 +2.17.0