stopping video sets the background to black -- can I change this color?

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

stopping video sets the background to black -- can I change this color?

Erik Blankinship-2
When I set my pipeline to state null (i.e. pressing stop), my xvimagesink (or ximagesink) changes to the color black.  

Can I set this color?

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

Stefan Sauer
hi,

Am 31.10.2010 03:55, schrieb Erik Blankinship:
> When I set my pipeline to state null (i.e. pressing stop), my xvimagesink (or
> ximagesink) changes to the color black.  
>
> Can I set this color?
>

No, you would need to turn off some things on xvimagesink and manage them
yourself. I don't remember exactly which one: "autopaint-colorkey",
"handle-expose" - you could check the source of the plugin.

Stefan

>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

Erik Blankinship-2


On Sun, Oct 31, 2010 at 11:07 AM, Stefan Kost <[hidden email]> wrote:
hi,

Am 31.10.2010 03:55, schrieb Erik Blankinship:
> When I set my pipeline to state null (i.e. pressing stop), my xvimagesink (or
> ximagesink) changes to the color black.
>
> Can I set this color?
>

No, you would need to turn off some things on xvimagesink and manage them
yourself. I don't remember exactly which one: "autopaint-colorkey",
"handle-expose" - you could check the source of the plugin.


Just toggling those parameters had no effect (except, sometimes the video wouldn't show up at all).  And just setting "colorkey" didn't  seem to do anything either (but I was real excited for a minute hoping it would work).

Is the idea to listen for x expose events and hide the component?

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

michael smith-6-3
In reply to this post by Erik Blankinship-2
When the xvimagesink is in the null state, it's not doing anything. It
doesn't even have a window to draw into.

If it's black, that's coming from something else. You can draw into
that something else using whatever API you're using for the rest of
your application.

Mike


On Sat, Oct 30, 2010 at 5:55 PM, Erik Blankinship <[hidden email]> wrote:

> When I set my pipeline to state null (i.e. pressing stop), my xvimagesink
> (or ximagesink) changes to the color black.
> Can I set this color?
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America contest
> Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

Erik Blankinship-2


On Sun, Oct 31, 2010 at 8:42 PM, Michael Smith <[hidden email]> wrote:
When the xvimagesink is in the null state, it's not doing anything. It
doesn't even have a window to draw into.

If it's black, that's coming from something else. You can draw into
that something else using whatever API you're using for the rest of
your application.


Hmm... I am pretty sure I am not painting any black by default, and I am certainly not explicitly painting black.  I am displaying the video on[in?] a gtk.DrawingArea.  It is grey by default.  ( It is a very similar set up to this one: http://pygstdocs.berlios.de/pygst-tutorial/playbin.html ).

My pipeline listens for the "prepare-xwindow-id" message and once I play some video and the message arrives I call message.src.set_window_id( myGtkDrawingArea.window.xid ).  Once I have done this, my drawingArea flashes from default grey to a black box for just a moment before my video shows up.  When I stop the video I  get a black box in my drawing area.

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

Stefan Sauer
In reply to this post by Erik Blankinship-2
Am 31.10.2010 21:18, schrieb Erik Blankinship:

>
>
> On Sun, Oct 31, 2010 at 11:07 AM, Stefan Kost <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     hi,
>
>     Am 31.10.2010 03:55, schrieb Erik Blankinship:
>     > When I set my pipeline to state null (i.e. pressing stop), my xvimagesink (or
>     > ximagesink) changes to the color black.
>     >
>     > Can I set this color?
>     >
>
>     No, you would need to turn off some things on xvimagesink and manage them
>     yourself. I don't remember exactly which one: "autopaint-colorkey",
>     "handle-expose" - you could check the source of the plugin.
>
>
> Just toggling those parameters had no effect (except, sometimes the video
> wouldn't show up at all).  And just setting "colorkey" didn't  seem to do
> anything either (but I was real excited for a minute hoping it would work).

Since we implemented the "colorkey" property, only a few drivers actually do
something on it. Anyway that not what you where looking for, as the colorkey is
a color you *don't* want to see.

>
> Is the idea to listen for x expose events and hide the component?

I said, please check the source: gst_xvimagesink_xwindow_clear() is painting the
window black when going from READY_TO_NULL. It's something we should make
optional I think (and remove at some point). Its also inconsistent as apps would
need to make their video window black initially if they want it to be black.
File a bug?

Stefan

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

Erik Blankinship-2
I opened this bug on this issue:

Tonight with the help of friendly folk on irc I was able to compile xvimagesink with the changes I think are needed. (I am on fedora 11)

I seem to have created two files:
Is that it?  I thought I compiling would create a .so file..

If it worked, I have a followup question:
I would like to use my newly compiled version of xvimagesink in a pygst project I distribute on the OLPC XO laptops (Which may not get upgraded gstreamer for a long time).  How do I reference my bundled xvimagesink files in my pipelines? 

Thank you.  It is fun and educational to learn about the gstreamer build process.


On Mon, Nov 1, 2010 at 5:21 PM, Stefan Kost <[hidden email]> wrote:
Am 31.10.2010 21:18, schrieb Erik Blankinship:
>
>
> On Sun, Oct 31, 2010 at 11:07 AM, Stefan Kost <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     hi,
>
>     Am 31.10.2010 03:55, schrieb Erik Blankinship:
>     > When I set my pipeline to state null (i.e. pressing stop), my xvimagesink (or
>     > ximagesink) changes to the color black.
>     >
>     > Can I set this color?
>     >
>
>     No, you would need to turn off some things on xvimagesink and manage them
>     yourself. I don't remember exactly which one: "autopaint-colorkey",
>     "handle-expose" - you could check the source of the plugin.
>
>
> Just toggling those parameters had no effect (except, sometimes the video
> wouldn't show up at all).  And just setting "colorkey" didn't  seem to do
> anything either (but I was real excited for a minute hoping it would work).

Since we implemented the "colorkey" property, only a few drivers actually do
something on it. Anyway that not what you where looking for, as the colorkey is
a color you *don't* want to see.

>
> Is the idea to listen for x expose events and hide the component?

I said, please check the source: gst_xvimagesink_xwindow_clear() is painting the
window black when going from READY_TO_NULL. It's something we should make
optional I think (and remove at some point). Its also inconsistent as apps would
need to make their video window black initially if they want it to be black.
File a bug?

Stefan


------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

Erik Blankinship-2

Tonight with the help of friendly folk on irc I was able to compile xvimagesink with the changes I think are needed. (I am on fedora 11)

I seem to have created two files:
Is that it?  I thought I compiling would create a .so file..


I found my compiled libgstxvimagesink.so file :-)  And when I replace it in /usr/lib/ it solves my bug.

However, I cannot replace this file on everyone's machine.  How do I reference this modified plugin in my pipelines?

Thanks!

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: stopping video sets the background to black -- can I change this color?

Erik Blankinship-2

I found my compiled libgstxvimagesink.so file :-)  And when I replace it in /usr/lib/ it solves my bug.

However, I cannot replace this file on everyone's machine.  How do I reference this modified plugin in my pipelines?


[Sorry for flooding the list.]

Some more research ( http://stackoverflow.com/questions/2120444/gstreamer-plugin-search-path ) suggests I need to set GST_PLUGIN_PATH in my activity.  I am having a hard time figuring out how to do this with pygst.   Any pygst experts out there who can nudge me in the right direction?

------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages,
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev 
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel