Flow of PAUSE request from gstreamer to upper QT application.

sathish sathish1000 at gmail.com
Mon Dec 2 07:37:45 PST 2013


Thanks for the reply Sebastian

So Phonon doesnt handle it but GSTREAMER handles it.

Hence to do a test, I left QT - Phonon application. Instead I am using a
gstreamer media player code available in the gstreamer documentation. Name
of the file is Basic-tutorial-5.c.

In this, I am initiating a CORK request.. I have pasted the part of the
code in which messages on the bus are handled.

 /* Instruct the bus to emit signals for each received message, and connect
to the interesting signals */

  bus = gst_element_get_bus (data.playbin2);
  gst_bus_add_signal_watch (bus);
  g_signal_connect (G_OBJECT (bus), "message::error", (GCallback)error_cb,
&data);
  g_signal_connect (G_OBJECT (bus), "message::eos", (GCallback)eos_cb,
&data);
  g_signal_connect (G_OBJECT (bus), "message::state-changed",
(GCallback)state_changed_cb, &data);
  g_signal_connect (G_OBJECT (bus), "message::application",
(GCallback)application_cb, &data);
  gst_object_unref (bus);

My question is how should I handle this in case of the following code
pasted below

gst_element_post_message (GST_ELEMENT_CAST (psink),
> >         gst_message_new_request_state (GST_OBJECT_CAST (psink),
> >             GST_STATE_PAUSED));

How would I able to find the bus message. Like in case of End of Stream, we
get "message::eos", what would it be for the above piece of code ??

Would I get "GST_STATE_PAUSED" on the bus or something else ??

Thanks,
Sathish..


On 2 December 2013 16:33, Sebastian Dröge-3 [via GStreamer-devel] <
ml-node+s966125n4663782h87 at n4.nabble.com> wrote:

> On Mo, 2013-12-02 at 02:36 -0800, sathish wrote:
>
> > Thanks Sebastian for the reply,
> >
> > I will raise the issue with phonon developers..
> >
> > I have a few questions/doubts regarding your reply..
> >
> > "However when shortly looking at the code I don't see it handling the
> > request-state message at all. This would need to be implemented. As
> > Phonon is a very high-level abstraction of a media playback API, I would
> > expect it to handle that internally without the application having to
> > worry about that"
> >
> > From the above statement, do you mean that GSTREAMER is processing the
> > request and sending it PHONON but PHONON is not handling it ??..
> >
> > Or do you mean that PHONON should take full responsibilty and handle it.
> I
> > see this scenario less because when I used gst launch instead of QT, I
> was
> > able to CORK/PAUSE a player..
> Both. Phonon does not handle it, but should handle it in a way that the
> Qt application does not need to know about it at all.
>
> > My second question is this..
> >
> > The lines of interest are pasted below
> >
> > >     gst_element_post_message (GST_ELEMENT_CAST (psink),
> > >         gst_message_new_request_state (GST_OBJECT_CAST (psink),
> > >             GST_STATE_PAUSED));
> >
> > I went through the gstreamer documetation to find what does
> > "gst_message_new_request_state ()" do ??
> >
> > I got this reply.. "This message can be posted by elements when they
> want
> > to have their state changed. A typical use case would be an audio server
> > that wants to pause the pipeline because a higher priority stream is
> being
> > played."
> >
> > But what does it exactly post on the bus.. Does it post the state
> > "GST_STATE_PAUSED" on the bus that needs handling ??
> It posts a GstMessage on the bus, and the application (or Phonon or
> whatever created the pipeline) gets that message from the bus. Then this
> code is responsible for setting the pipeline to this requested state.
>
> --
> Sebastian Dröge <[hidden email]<http://user/SendEmail.jtp?type=node&node=4663782&i=0>>
>
> Centricular Ltd - http://www.centricular.com
> Expertise, Straight from the Source
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=4663782&i=1>
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> *signature.asc* (985 bytes) Download Attachment<http://gstreamer-devel.966125.n4.nabble.com/attachment/4663782/0/signature.asc>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://gstreamer-devel.966125.n4.nabble.com/Flow-of-PAUSE-request-from-gstreamer-to-upper-QT-application-tp4663723p4663782.html
>  To unsubscribe from Flow of PAUSE request from gstreamer to upper QT
> application., click here<http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4663723&code=c2F0aGlzaDEwMDBAZ21haWwuY29tfDQ2NjM3MjN8MTE0NTQ4OTIwMA==>
> .
> NAML<http://gstreamer-devel.966125.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Flow-of-PAUSE-request-from-gstreamer-to-upper-QT-application-tp4663723p4663795.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131202/f848d633/attachment-0001.html>


More information about the gstreamer-devel mailing list