Gstreamer -2 questions: seeking and the internal video window

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Gstreamer -2 questions: seeking and the internal video window

hklute
Hi everybody!

I'm building a Audio/Video Player which should run under Linux and Windows using gstreamer, c++ and qt.

I have two questions.

1. The videoreplay has to be overly precise with an external time input.
Therefore I have to seek in the video to synchronize the playback. I tried to seek using GST_FORMAT_TIME, but it didn't work. So I switched to the byte format:
gst_element_seek (m_GSTsource, m_PlaySpeed, fmb, (GstSeekFlags)3, GST_SEEK_TYPE_SET, jumpto, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
Because I don't want to jump around needlesly in the video I check the current position first and I jump only if the difference is above a threshold.  
I check the position again afterwards, and it tells me that I am exactly at the position I jumped to.
In the next cycle, even if the pipeline is in the PAUSED state, the position is some 100k bytes away.
But nothing should have been played. This seems to worsen towards the end of the video.
I compensate that at the moment with subtracting different values from the position I jump to.
But that is not very scientific ^^
Any ideas what I am doing wrong, or how to improve the seek precision?

2. I already found in the search that it is not intended to access the internal window of the viedosink (xvimagesink, directshow...). The answer was from 2008. Is this still the case, or has that changed?
It would be nice to have some access on the window, like setting the title, or letting it stay on top of all other windows ...
I am no qt expert and have some problems at the moment concerning the refreshing of the window.
In the paused state of the pipeline the video often vanishes and leaves a grey window. I tried using  
gst_x_overlay_expose (GST_X_OVERLAY (m_GSTsink))  but it didn't help much.
I'm not sure when to use it and how to detect the events that cause this problem. The problem is much worse in Windows than Linux.

Tank you.

HK