759
edits
Acervantes (talk | contribs) No edit summary |
Acervantes (talk | contribs) No edit summary |
||
Line 34: | Line 34: | ||
== Example Application == | == Example Application == | ||
A very useful application of the | A very useful application of the seek event is when a video is needed to playback in a interval, for severals seconds. This example shows how to set the start time and the end time of the playback, the seek event takes the time in nanoseconds, for this example the playback start at 5s and ends in 10s. | ||
<br>⇒ ''Gstd Commands:'' | <br>⇒ ''Gstd Commands:'' | ||
<syntaxhighlight lang="bash" line="line" style="background-color:lavender"> | <syntaxhighlight lang="bash" line="line" style="background-color:lavender"> | ||
# Create the pipeline | # Create the pipeline | ||
pipeline_create p1 | pipeline_create p1 playbin uri=file:///tmp/video.mp4 | ||
# Play the pipeline | |||
pipeline_play p1 | pipeline_play p1 | ||
# . | # Send the seek event. Play the pipeline from the second 5 to 10 | ||
event_seek p1 1.0 3 1 1 5000000000 1 10000000000 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |