diff options
author | Jan Schmidt <jan@centricular.com> | 2015-09-18 00:10:10 +1000 |
---|---|---|
committer | Jan Schmidt <jan@centricular.com> | 2015-09-18 00:29:51 +1000 |
commit | e990e75e1e9a1493b2d69552bc02f4bef52dbf73 (patch) | |
tree | 4bb4ff9f010a8ec732e2a65d7f80126664e21f44 | |
parent | 587e7c4a23d8364f13e3710cea75d4a72b2b301f (diff) |
pcapparse: Hook up the recently added change_state vfunc.
The state change function was implemented, but not installed,
making the compiler complain about the unused function.
-rw-r--r-- | gst/pcapparse/gstpcapparse.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/pcapparse/gstpcapparse.c b/gst/pcapparse/gstpcapparse.c index 23eaff374..485ec43d1 100644 --- a/gst/pcapparse/gstpcapparse.c +++ b/gst/pcapparse/gstpcapparse.c @@ -84,6 +84,8 @@ static void gst_pcap_parse_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); static void gst_pcap_parse_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec); +static GstStateChangeReturn +gst_pcap_parse_change_state (GstElement * element, GstStateChange transition); static void gst_pcap_parse_reset (GstPcapParse * self); @@ -92,6 +94,7 @@ static GstFlowReturn gst_pcap_parse_chain (GstPad * pad, static gboolean gst_pcap_sink_event (GstPad * pad, GstObject * parent, GstEvent * event); + #define parent_class gst_pcap_parse_parent_class G_DEFINE_TYPE (GstPcapParse, gst_pcap_parse, GST_TYPE_ELEMENT); @@ -140,6 +143,8 @@ gst_pcap_parse_class_init (GstPcapParseClass * klass) gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&src_template)); + element_class->change_state = gst_pcap_parse_change_state; + gst_element_class_set_static_metadata (element_class, "PCapParse", "Raw/Parser", "Parses a raw pcap stream", @@ -638,7 +643,7 @@ gst_pcap_parse_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_PAUSED_TO_READY: - gst_pcap_parse_reset (element); + gst_pcap_parse_reset (self); break; default: break; |