[gst-devel] gst-player / videosink oddness ...

Michael Meeks michael at ximian.com
Tue May 7 06:07:04 CEST 2002


Hi Guys,

	I was just having an idle read of gst-player, with a view to making the
'double size' / 'half size' thing work [ for me ].

	I was somewhat amazed at several things in there;

	Firstly - a structure is shared with some evil cut and paste action cf:

	gst-player/libs/gst/player/gstvideowidget.h (GstXHook)

struct _GstXHook {
  gulong id;
  void (*free_info) (GstXHook *hook);  
  Display *display;
  Window window;
  GC gc;
  GdkRectangle rect;
};

	gst-plugins/sys/videosink/gstximage.c (GstXImageInfo)

struct _GstXImageInfo {
  GstImageInfo info;
  Display *display;
  Window window;
  GC gc;
  gint x, y, w, h;
};

	These seem to be copies - with the GstXImageInfo being written 
out. [ quite why GstXImageInfo is called an 'ImageInfo' since it appears
to contain nothing at all related to images is a mystery to me ].

	So - poking inside gstvideowidget I see people hacking around inside
the 'hook' a pointer to which is passed [ it seems ] to the videosink -
which in it's various incarnations seems to use the 'width' and 'height'
properties rather more sensibly than whatever it does with the hook
information [ which I stopped chasing at that stage ].

	So - the question is - why is this unmaintainable cut and paste
happening ? is it not possible to achieve the same effect with a simple
freeze / property set set set set / thaw ? Or better just share the
structure in some shared header - it's a real shame the GType system
can't cope with structured types [ as the CORBA one can / has to ].

	Where does the hook data go to in the end ? and what is the relation of
the various 'width' / 'height' properties to the hook data's width /
height ? - how is the requested as opposed to the current width / height
of eg. sdlvideosink differentiated ? or is that something you have to
store in your app ?

	Also - it seems there is a lot of X hackery going on in there; would
not a GtkSocket be more appropriate ?

	Regards,

		Michael.

	

-- 
 mmeeks at gnu.org  <><, Pseudo Engineer, itinerant idiot





More information about the gstreamer-devel mailing list