pipeline synchronization

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

pipeline synchronization

dodo.r84

Hi all,
I'm working on gstreamer java.
In my scenario I added a custom module that perform cyphering.
This module is positioned just after the video demuxer.
I need to cypher my stream with different keys every "x" seconds. (X is read
from DB and should correspond to the PTS).

In order to synchronize to these "x" seconds I am trying to pause the
pipeline, set the cypher module with new key and play the pipeline again for
every key.

E.g.
We have First key from 0 to 4999 millisec, Seconf key from 5000 to 10000
millisec.
How can I know when the pipeline reaches 4999 millisec?
I tryed to use the seek operation from 0 to 4999, when it ends the EOS
Listener (Bus.EOS()) catches it and I pause the pipeline.
Inside Bus.EOS() I do the seek for the second key.

The problem is that time is not synchronized. (e.g. after first key, inside
Bus.EOS() time is already 5020).

I have also tryed with a while operation: while(pipeline.isPlaying()). In
this loop I look at the queryPosition() and when it gets over 4999, I pause
the pipeline, set the module with new key and so on...

The problem is the same.

Can you give me any ideas?

Thanks in advance.

Dodo
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/pipeline-synchronization-tp2174050p2174050.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: pipeline synchronization

Luciana Fujii Pontello
On Tue, 2010-05-11 at 09:05 -0700, dodo.r84 wrote:
...

> I have also tryed with a while operation: while(pipeline.isPlaying()). In
> this loop I look at the queryPosition() and when it gets over 4999, I pause
> the pipeline, set the module with new key and so on...

Can't you use a different key for each buffer depending on what you get
in the queryPosition()? If the buffers can come out of order, it sure
won't work to set a new key from some time on.

Regards,

Luciana Fujii

------------------------------------------------------------------------------

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel