[gstreamer-bugs] [Bug 538656] ximagesink support for autofill property

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Mon Jun 16 12:41:08 PDT 2008


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=538656

  GStreamer | gst-plugins-base | Ver: HEAD CVS

tzicatl at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tzicatl at gmail.com




------- Comment #1 from tzicatl at gmail.com  2008-06-16 19:41 UTC -------
Nieto, Noe M schrieb:
> Hi everybody,
> 
>  
> 
> I am writing an application where the user should be able to draw 
> (with the mouse) a rectangle on a playing video window (for now it is 
> an ximagesink).

Thats not so easy. Curretly xvimagesink does autofill-colorkey. That is it
fills the drawable with the colorkey so that you see the video. Please file an
enhancement request, so that xvimagesink supports a property to turn off
autofill and another to tell you about the colorkey. Then you can fill the
drawable yourself with the colorkey and paint your rectangle in a different
color over it. The video will be seen where the colorkey is visible.

Stefan
> 
>  
> 
> I try the following but I see nothing drawing on the screen…
> 
> ### CONFIGURE PIPELINE TO CATCH SYNC MESSAGES
> 
> bus = self.Pipeline.get_bus()
> 
> bus.add_signal_watch()
> 
> bus.enable_sync_message_emission()
> 
> bus.connect('message', self.on_message)
> 
> bus.connect('sync-message::element', self.on_sync_message)
> 
>  
> 
>  
> 
> #############
> 
> ## Tell ximagesink to draw into the draw area that I give it, not in 
> it’s own …
> 
>     def on_sync_message(self, bus, message):
> 
>       if message.structure is None:
> 
>             return
> 
>       message_name = message.structure.get_name()
> 
>       if message_name == "prepare-xwindow-id":
> 
>             imagesink = message.src
> 
>             imagesink.set_property("force-aspect-ratio", True)
> 
>             imagesink.set_xwindow_id(self.DrawingArea.window.xid)
> 
>  
> 
> #############
> 
> ## Now, on the expose event of the drawing area, paint the rectangle 
> according to user input (mouse)
> 
> #############
> 
>     def on_DrawingAreaCamera_expose_event(self,widget,event):
> 
>         #if self.area_selection_now is True:
> 
>         context = widget.window.cairo_create()
> 
>         #widget.window.draw(context)
> 
>         context.rectangle(self.area_selection)
> 
>         context.set_source_rgb(1,0,0)
> 
>         context.stroke()
> 
>  
> 
>  
> 
> What is the right way to interact with ximagesink, so I can also draw 
> things on it’s drawable??
> 
>  
> 
> Regards
> 


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=538656.




More information about the Gstreamer-bugs mailing list