Setting GnlFileSource "duration" dynamically

Edward Hervey bilboed at gmail.com
Thu Mar 17 01:21:42 PDT 2011


Hi,

  You need to get the duration of your media beforehand.

  The new GstDiscover in gst-plugins-base will help you do that very
easily.

    Edward

On Mon, 2011-03-14 at 08:21 +0200, Vaisaari wrote:
> Hi all,
> 
> I'm trying to learn GNonLin and I'm facing a following problem. First,
> I
> build a pipeline which consists (at first) of only one video within a
> GnlFileSource. Thereafter, I would like to playback my pipeline from
> the beginning to the end. I know that I have to set the "duration"
> property to correct value in order to do that. Unfortunately, I only
> know how to use fixed values for duration.  If the "duration" is
> smaller than the original video length the playback will stop too
> early, if the value is larger I'm able to play the entire video.
> However, I would also like to display how much time is left while
> playing the video. If I now query the duration of my pipeline I will
> get the same arbitrary large number that I set as the "duration"
> previously, which is not the actual duration of the video. So the
> question is: How do I set the "duration" property dynamically to the
> duration of my video? Or how should I handle situation like this?
> 
> Thank you for your help! 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list