writing a new source plugin
Pazzo Da Legare
pazzodalegare at gmail.com
Fri Mar 30 05:50:42 PDT 2012
Dear All,
I would like to write a new gstreamer source plugin to put in a
gstreamer pipeline a new type of data, say a metadata, calculated by
an algorithm which uses a live video stream as input and give as
output a stream of metadata.
Then I would like to put in sync the video stream and metadata, using
the timestamp of video and timetamp of metadata.
So I start reading a PWG (plugin writer's guide) and having a look a
some examples but I didn't find one example that fit my will. I start
inheriting from GstBaseSrc and now I'm trying to understand exactly
how to use functions that have to be written (could be written for my
source):
*do_seek
*negotiate
*create
*get_range
*get_times
In particular my src plugin receives calls (after get_caps, start,
is_seekable, negotiate, stop):
- [*do_seek] with seeking time segment start=0:00:00.000000000,
stop=99:99:99.999999999, last_stop=0:00:00.000000000,
duration=99:99:99.999999999, rate=1.000000, applied_rate=1.000000,
flags=0x00, time=0:00:00.000000000, accum=0:00:00.000000000
What should I do in my implementation, say I have a buffer of metadata
starting a time t1 and ending a time t2 ?
- [*create]: create called: offset -1, size 4096
why gstreamer (my sink? I'm using a fakesink) is asking for offset -1
and size 4096 (where it come from?); what should I implement/override
for BaseSrc, (*get_size function ?).
I forgot to say that I set my plugin through gst_base_src_set_format
to GST_FORMAT_TIME.
Finally could you please indicate to example of BaseSrc derived plugin
to have a look at one for push and one for pull mode and eventually
indicate me other documentation in addition to what I found on
Gstreamer homepage?
Thank you for your patience,
pz
More information about the gstreamer-devel
mailing list