writing a plugin using filesink source code

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

writing a plugin using filesink source code

killerrats
I copied the filesink.c and .h. I redid the names in the file instead of file_sink it's overwritef.

after I check the plugin to use inspect it gets an error:

GLib-GObject-WARNING **: invalid unclassed type '(null)' in class cast to 'GObject'

I'm trying to figure out what could be the object that might be null. I have checked for each method for null objects but nothing.

source code:
GstTestLib.cpp - Loads Plugin
http://www.planetkorey.com/tmp/GstTestLib.cpp

http://www.planetkorey.com/tmp/gstoverwritefilesink.cpp
http://www.planetkorey.com/tmp/gstoverwritefilesink.h
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: writing a plugin using filesink source code

killerrats
the error went away

changes in method:

gst_overwritef_query:
from:
GstBaseSinkClass *gstbasesink_class = GST_BASE_SINK_CLASS (bsink);
gstbasesink_class->query (bsink,query);
res = gstbasesink_class->query;

to: res = GST_BASE_SINK_CLASS (parent_class)->query (bsink, query);

gst_overwritef_event:
from:
GstBaseSinkClass *gstbasesink_class = GST_BASE_SINK_CLASS (sink);
  return gstbasesink_class->event(sink,event);

to: return GST_BASE_SINK_CLASS (parent_class)->event (sink, event);

gst_overwrite_dispose:
from:
GObjectClass *gobject_class = G_OBJECT_CLASS (object);
  gobject_class->dispose(object);

to: G_OBJECT_CLASS (parent_class)->dispose (object);
------------------------------
Gstreamer 1.14.3
------------------------------
Windows