gstreamer last frame

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

gstreamer last frame

Robson Ferreira
hi, 

i`m trying to implement a pipeline using playbin and then when it receives a EOS message prepares another uri to play, but when i use this code:

gst_element_set_state(data->pipeline, GST_STATE_READY);
g_object_set(data->playbin, "uri", nexItem, NULL);
gst_element_set_state(data->pipeline, GST_STATE_PLAYING);

i lose the last frame rendered. Is there a way to keep the last frame until i finish preparing the next file?




--
Marketing
Robson Ferreira 
Desenvolvedor Jr. 
[hidden email] 
+55 61 3044.7878 
snews.tv

This message is intended exclusively for its addressee and may contain information that is confidential and protected by a professional privilege or whose disclosure is prohibited by law. Unauthorized use of such information is prohibited and subject to applicable penalties.


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

Re: gstreamer last frame

Nicolas Dufresne-5


Le mer. 25 avr. 2018 15:27, Robson Ferreira <[hidden email]> a écrit :
hi, 

i`m trying to implement a pipeline using playbin and then when it receives a EOS message prepares another uri to play, but when i use this code:

gst_element_set_state(data->pipeline, GST_STATE_READY);
g_object_set(data->playbin, "uri", nexItem, NULL);
gst_element_set_state(data->pipeline, GST_STATE_PLAYING);

i lose the last frame rendered. Is there a way to keep the last frame until i finish preparing the next file?

You could use the about-to-finish signal to set the next URI, instead of resetting the pipeline.





--
Marketing
Robson Ferreira 
Desenvolvedor Jr. 
[hidden email] 
+55 61 3044.7878 
snews.tv

This message is intended exclusively for its addressee and may contain information that is confidential and protected by a professional privilege or whose disclosure is prohibited by law. Unauthorized use of such information is prohibited and subject to applicable penalties.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: gstreamer last frame

Robson Ferreira
yes, i`m using the about-to-finish signal right now... but i would like to use the EOS message as well as manually send a next command to the pipeline... and every time i do that i get a black frame when i use gst_element_set_state(data->pipeline, GST_STATE_READY);

2018-04-25 21:26 GMT-03:00 Nicolas Dufresne <[hidden email]>:


Le mer. 25 avr. 2018 15:27, Robson Ferreira <[hidden email]> a écrit :
hi, 

i`m trying to implement a pipeline using playbin and then when it receives a EOS message prepares another uri to play, but when i use this code:

gst_element_set_state(data->pipeline, GST_STATE_READY);
g_object_set(data->playbin, "uri", nexItem, NULL);
gst_element_set_state(data->pipeline, GST_STATE_PLAYING);

i lose the last frame rendered. Is there a way to keep the last frame until i finish preparing the next file?

You could use the about-to-finish signal to set the next URI, instead of resetting the pipeline.





--
Marketing
Robson Ferreira 
Desenvolvedor Jr. 
[hidden email] 
+55 61 3044.7878 
snews.tv

This message is intended exclusively for its addressee and may contain information that is confidential and protected by a professional privilege or whose disclosure is prohibited by law. Unauthorized use of such information is prohibited and subject to applicable penalties.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
Marketing
Robson Ferreira 
Desenvolvedor Jr. 
[hidden email] 
+55 61 3044.7878 
snews.tv

This message is intended exclusively for its addressee and may contain information that is confidential and protected by a professional privilege or whose disclosure is prohibited by law. Unauthorized use of such information is prohibited and subject to applicable penalties.


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

Re: gstreamer last frame

Nicolas Dufresne-5
Le jeudi 26 avril 2018 à 12:37 -0300, Robson Ferreira a écrit :
> yes, i`m using the about-to-finish signal right now... but i would
> like to use the EOS message as well as manually send a next command
> to the pipeline... and every time i do that i get a black frame when
> i use gst_element_set_state(data->pipeline, GST_STATE_READY);

Going to READY state will always have this black-frame side effect.
Though, have you tried, after reaching EOS, so set the new URI, and
send a flushing seek to position 0 ? Never tried myself.

>
> 2018-04-25 21:26 GMT-03:00 Nicolas Dufresne <[hidden email]>:
> >
> > Le mer. 25 avr. 2018 15:27, Robson Ferreira <[hidden email]
> > v> a écrit :
> > > hi,
> > >
> > > i`m trying to implement a pipeline using playbin and then when it
> > > receives a EOS message prepares another uri to play, but when i
> > > use this code:
> > >
> > > gst_element_set_state(data->pipeline, GST_STATE_READY);
> > > g_object_set(data->playbin, "uri", nexItem, NULL);
> > > gst_element_set_state(data->pipeline, GST_STATE_PLAYING);
> > >
> > > i lose the last frame rendered. Is there a way to keep the last
> > > frame until i finish preparing the next file?
> >
> > You could use the about-to-finish signal to set the next URI,
> > instead of resetting the pipeline.
> >
> > >
> > >
> > >
> > > --
> > > Robson Ferreira
> > > Desenvolvedor Jr.
> > > [hidden email]
> > > +55 61 3044.7878
> > > snews.tv
> > > This message is intended exclusively for its addressee and may
> > > contain information that is confidential and protected by a
> > > professional privilege or whose disclosure is prohibited by law.
> > > Unauthorized use of such information is prohibited and subject to
> > > applicable penalties.
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > [hidden email]
> > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer last frame

Nicolas Dufresne-5
In reply to this post by Robson Ferreira
Le jeudi 26 avril 2018 à 12:37 -0300, Robson Ferreira a écrit :
> yes, i`m using the about-to-finish signal right now... but i would
> like to use the EOS message as well as manually send a next command
> to the pipeline... and every time i do that i get a black frame when
> i use gst_element_set_state(data->pipeline, GST_STATE_READY);

I forgot, the other option I forsee would be to split you pipeline in
two:

  uridecodebin ! videosink

And replace uridecodebin with a new one on EOS, flushing the pipeline
so the videosink forgets about the accumulated time.

>
> 2018-04-25 21:26 GMT-03:00 Nicolas Dufresne <[hidden email]>:
> >
> > Le mer. 25 avr. 2018 15:27, Robson Ferreira <[hidden email]
> > v> a écrit :
> > > hi,
> > >
> > > i`m trying to implement a pipeline using playbin and then when it
> > > receives a EOS message prepares another uri to play, but when i
> > > use this code:
> > >
> > > gst_element_set_state(data->pipeline, GST_STATE_READY);
> > > g_object_set(data->playbin, "uri", nexItem, NULL);
> > > gst_element_set_state(data->pipeline, GST_STATE_PLAYING);
> > >
> > > i lose the last frame rendered. Is there a way to keep the last
> > > frame until i finish preparing the next file?
> >
> > You could use the about-to-finish signal to set the next URI,
> > instead of resetting the pipeline.
> >
> > >
> > >
> > >
> > > --
> > > Robson Ferreira
> > > Desenvolvedor Jr.
> > > [hidden email]
> > > +55 61 3044.7878
> > > snews.tv
> > > This message is intended exclusively for its addressee and may
> > > contain information that is confidential and protected by a
> > > professional privilege or whose disclosure is prohibited by law.
> > > Unauthorized use of such information is prohibited and subject to
> > > applicable penalties.
> > > _______________________________________________
> > > gstreamer-devel mailing list
> > > [hidden email]
> > > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > [hidden email]
> > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment