Using xvimagesink playing video in a fullscreen

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

Using xvimagesink playing video in a fullscreen

akaChella
Hi all,

I had already posted regarding the issue i am facing in this forum, but i didn't get any directions to proceed further :(

I do not know where i am going wrong.

I have created a gtk window, with setdecorated of that window to false. (I do not want the title bar)

After constructing the pipeline, i included the bus watch - gst_bus_add_watch (bus,handle_events,NULL);

and in handle_events, under the case GST_MESSAGE_ELEMENT:
i set the window id using gst_x_overlay_set_xwindow_id(); and i gave gtk_widget_show_all ();

When the video reaches end of stream, under the case GST_MESSAGE_EOS: i am setting the pipeline to GST_STATE_NULL, i quit the main loop and then gave the gtk_widget_hide_all () of that window.

But the window is not hidden :( A solid black window is displayed.

Am i missing anything?

Note: i am construction the pipeline and the window in the same method.

My requirement is to play the video in a fullscreen. Should i use anything else instead of gtk??

Any kind of help is appreciated!

Any links for reference would also do.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: Using xvimagesink playing video in a fullscreen

Wes Miller
Administrator

Ok, first question:  does the gstreamer portion of your application work?
It sounds like gstreamer is doing everything it is supposed to do up to
and including talk to the display window and sending you an EOS.  It
really sounds like this might be a gtk problem, not a gstreamer one.

Now, I fully admit I know NOTHING about gtk or graphics in general,
however, I have some questions that might give you a clue.

Is your gtk app using the main loop in your gstreamer app as its main
loop.  If so, stopping the loop in the EOS handler also stops servicing
the windowing stuff.  Perhaps you need to do all your window manipulation
before leaving the loop.

Is the "black hole" really "still" there.  If you managed to kill off the
contents of your output window, but the one behind it was full of black
nothing, killing you app's window is going to leave you looking through it
at blackness, or more likely, at just nothing which the video system
interprets as black.  Try a test where you send additional output to your
app window.  If it hasn't been destroyed you should either see something
else paint in the window or, at least, get back status/error messages.
Also, try painting to or refreshing the underlying window (container?).
Is it stuck waiting on a nudge to get it going?  See if the loop servicing
the gui is still running.

As I said, this sounds a lot more like a gtk issue than a gstreamer one.

Wes


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using xvimagesink playing video in a fullscreen

Stefan Sauer
In reply to this post by akaChella
On 08/30/11 09:00, akaChella wrote:

> Hi all,
>
> I had already posted regarding the issue i am facing in this forum, but i
> didn't get any directions to proceed further :(
>
> I do not know where i am going wrong.
>
> I have created a gtk window, with setdecorated of that window to false. (I
> do not want the title bar)
>
> After constructing the pipeline, i included the bus watch -
> gst_bus_add_watch (bus,handle_events,NULL);
>
> and in handle_events, under the case GST_MESSAGE_ELEMENT:
> i set the window id using gst_x_overlay_set_xwindow_id(); and i gave
> gtk_widget_show_all ();
>
> When the video reaches end of stream, under the case GST_MESSAGE_EOS: i am
> setting the pipeline to GST_STATE_NULL, i quit the main loop and then gave
> the gtk_widget_hide_all () of that window.
>
> But the window is not hidden :( A solid black window is displayed.

Show us your source code. If you hide the window the window you see is
possibly not yours.

> Am i missing anything?
>
> Note: i am construction the pipeline and the window in the same method.
>
> My requirement is to play the video in a fullscreen. Should i use anything
> else instead of gtk??
>
> Any kind of help is appreciated!
>
> Any links for reference would also do.
>
> Thanks in advance.
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Using-xvimagesink-playing-video-in-a-fullscreen-tp3778086p3778086.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: Using xvimagesink playing video in a fullscreen

akaChella
In reply to this post by Wes Miller
Hi Wes,

Whatever u said is right!!!

gtk uses the gstreamer's main loop.

In the EoS i am quitting the main loop. When i commented the quit_main_loop(), the window was hidden.

So what i did was , I included the statement, that hides the gtk window, before the main loop, but even then, the window was not hidden??

Why so?
Reply | Threaded
Open this post in threaded view
|

Re: Using xvimagesink playing video in a fullscreen

akaChella
This post was updated on .
In reply to this post by Stefan Sauer
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Using xvimagesink playing video in a fullscreen

Wes Miller
Administrator
In reply to this post by akaChella


>
>gtk uses the gstreamer's main loop.
>
>In the EoS i am quitting the main loop. When i commented the
>quit_main_loop(), the window was hidden.
>
>So what i did was , I included the statement, that hides the gtk window,
>before the main loop, but even then, the window was not hidden??
>
>Why so?


You need to wait long enough for the window to close before stopping the
loop.  The loop and other stuff may not even be in the same thread so
whoever goes first may/should get done sooner.  Something to remember, you
can put the pipeline in some non-playing state and the loop can still run!


Try waiting on gtk to notify you that the window has closed.  I have no
idea how that works but  my gut says you can either issue a blocking call
to the close_window function or you can need to wait on a signal.  One
other way it to find a way of checking if the window's handle is valid and
wait until it isn't.

And, lastly, you could just sleep for a second and assume everything got
done.  Not very good style, but highly practical.

You might also consider putting the loop in your main thread and letting
it be closed by the return to the OS.  Remember, the loop itself is NOT
part of Gstreamer.  Gstreamer uses the loop but is not the "provider" of
the loop.  That's why the loop functions don't start with "gst_".  Don't
forget to unref() your loop when you really are done with it.

Wes


CONFIDENTIALITY NOTE:

This e-mail and any attachments are confidential. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Using xvimagesink playing video in a fullscreen

Stefan Sauer
In reply to this post by akaChella
On 08/30/11 20:42, akaChella wrote:
> Have attached the window creation class file
> http://gstreamer-devel.966125.n4.nabble.com/file/n3779460/ui.c ui.c  
>
> Gstreamer class - exposed only pipeline construction method, bus watch
> method and play method.
> http://gstreamer-devel.966125.n4.nabble.com/file/n3779460/libgstreamer.c
> libgstreamer.c
I think you want to cehck the GST_MESSAGE_SOURCE(message) in
handle_events and only do the switch-case if the message-source is the
pipeline.

Stefan

>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Using-xvimagesink-playing-video-in-a-fullscreen-tp3778086p3779460.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

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

Re: Using xvimagesink playing video in a fullscreen

akaChella
Hi Stefan,

What should i do when i receive the GST_MESSAGE_SOURCE: ?
Reply | Threaded
Open this post in threaded view
|

Re: Using xvimagesink playing video in a fullscreen

Nathanael D. Noblet
On 08/31/2011 08:08 AM, akaChella wrote:
> Hi Stefan,
>
> What should i do when i receive the GST_MESSAGE_SOURCE: ?

I think he meant that when you receive EOS you check what element sent
it. IE each element in your pipeline can send EOS on the bus... however
you don't want to act until its the pipeline itself.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel