[gst-devel] [gstreamer] Problem with pulling data from a sink pad

Thomas Vander Stichele thomas at apestaart.org
Tue Dec 23 08:55:00 CET 2003


*sigh* :)

> > You'll need to be more verbose :) What sort of caching are you doing
> > that could not be implemented through GStreamer ? Same for peak levels -
> > I even have plug-ins that do that.
> 
> To display waveform data you need to make peakfiles.
> A peak file takes the frames per pixel (defaults to 4096) and works out
> what the peak of that is.

Your sentence is illogical.  A peak file contains a value per sample
set, where the value is indicative of the peak in that set.  The value
could be calculated as the RMS of that set, or the peak level, or some
other property, depending on the application.  For display purposes, the
maximum level is used the most.
The set size is mostly 4096 sample frames per set.

I think this is what you were trying to say with your sentence, but
that's not what it said.  I'm being pedantic because you are making it
harder than it is :)

>  It then writes this all to the disk. I can
> then get the displayed peak for a certain point by
> peak_data[position / frames_per_pixel];

Right.  So again.  What makes you think GStreamer is incapable of
generating this peak file ? What is so exceptionally hard about this
that you think this is the wrong thing to do with GStreamer ?

> To do it in GStreamer would be a seek to the position
> Read frames_per_pixel frames and feed them though your peak level thing.

Nope.  That would be done for *calculating* the peak level once.

> I'm sticking with my method, thanks very much.
> Please don't try to make GStreamer fit every possible solution
> It doesn't work.

Please don't be defensive about suggestions that there are operations
done in your program that would be suitable for general plugification. 
We'll meet somewhere halfway then.

> > > mmapping huge data to disk so that I can jump around it at will
> > > without having to send a seek event, run the pipeline to get 2 frames of
> > > data, send another seek event, run pipeline again...
> > 
> > Again.  What are you doing to jump around at will ?
> 
> Its a Non linear audio editor.
> Why do you think I might be jumping around in a non-linear fashion?

There's no reason to be a smartass.  I'm asking the question to better
gauge why you seem to think this is such deep magic that really only
marlin can do this.  Of course you need to jump around at will.  But I
am very skeptical that you would ever get 2 frames of data (given your
implied definition of frame higher up in your mail which was meant to
read as "the combination of one sample for each channel") and use only
those two, because on 44100 Hz audio they would amount to less than one
tenth of a millisecond.

So, really, you haven't answered the question at hand, only evaded it. 
What exact operation is it that GStreamer cannot let you do in a
sensible fashion ? Seeing how GStreamer was intended as a base for NLE's
as well, which you already now, I'm pretty sure that there must be a way
to do common operations.

I don't see anything in marlin that would be hard to achieve through
GStreamer plug-ins.  In fact, the only audio editor I've ever see
something do that I would have a hard time seeing GStreamer do is sweep,
with its scrubby feature.

I'm not really sure why you're giving me the runaround on this matter. 
It's ok to say "I don't feel like implementing stuff like plugins, thank
you very much." But saying "this library we are working on aimed at
writing NLE's doesn't do anything an NLE typically needs" and then
failing to explain what it doesn't do is kind of a cop-out, don't you
think ? You might be completely right in your choice, but you fail to
explain it.

Thomas


Dave/Dina : future TV today ! - http://davedina.apestaart.org/
<-*- thomas (dot) apestaart (dot) org -*->
I knew you was trouble
I knew you was bad blood but oh
I guess that I'm trouble too
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list