summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-05-10 11:50:16 +0200
committerTim-Philipp Müller <tim@centricular.net>2012-09-11 01:54:41 +0100
commitb4305c56f58291770e50ce7255f3bb30cce97674 (patch)
tree456ea25d5fed9856ccd2f7f9b7f4b2a55a18169a
parent536f51cf98241b4c6817232825fff1583db246f8 (diff)
gdp: Hide the GstStructure in GstEvent
Hide the GstStructure of the event in the implementation specific part so that we can change it. Add methods to check and make the event writable. Add a new method to get a writable GstStructure of the element. Avoid directly accising the event structure.
-rw-r--r--gst/gdp/dataprotocol.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/gdp/dataprotocol.c b/gst/gdp/dataprotocol.c
index 728b3f548..b1cda553d 100644
--- a/gst/gdp/dataprotocol.c
+++ b/gst/gdp/dataprotocol.c
@@ -394,6 +394,7 @@ gst_dp_packet_from_event_1_0 (const GstEvent * event, GstDPHeaderFlag flags,
guint8 *h;
guint32 pl_length; /* length of payload */
guchar *string = NULL;
+ const GstStructure *structure;
g_return_val_if_fail (GST_IS_EVENT (event), FALSE);
g_return_val_if_fail (length, FALSE);
@@ -403,8 +404,9 @@ gst_dp_packet_from_event_1_0 (const GstEvent * event, GstDPHeaderFlag flags,
*length = GST_DP_HEADER_LENGTH;
h = g_malloc0 (GST_DP_HEADER_LENGTH);
- if (event->structure) {
- string = (guchar *) gst_structure_to_string (event->structure);
+ structure = gst_event_get_structure ((GstEvent *) event);
+ if (structure) {
+ string = (guchar *) gst_structure_to_string (structure);
GST_LOG ("event %p has structure, string %s", event, string);
pl_length = strlen ((gchar *) string) + 1; /* include trailing 0 */
} else {