[gst-devel] First video overlay interface proposal

Julien MOUTTE julien at moutte.net
Thu Oct 16 03:59:11 CEST 2003

> Could you typedef this?
> typedef enum {
> } GstVideoOverlayResourceType;

Yup that was my plan...

> Look at X.h, this is defined as a gulong or a CARD32 (unsigned int)
> depending on the platform (32/64 bit). I'd prefer if we just defined the
> type as XID and let #include X11/X.h figure out the rest. From the
> comments, I understand that (by protocol) XID must be unsigned and 32
> bit, so you probably want to make it a guint32 instead of a glong.

ok for a guint32

> > struct GstVideoOverlayIface {
> >   GTypeInterface parent_class;
> >   
> >   /* public virtual methods */
> >   void (*set_video_out) (GstVideoOverlay *overlay,
> >                          GstVideoOverlayResource *video_out);
> Hm... Naming... The name video_out is "sort of" weird, because it gives
> me (personally) the feeling that this is suited primarily for output
> sinks. I'd prefer a name 'set_video_overlay ()' or so. This is minor
> nagging, but ohwell...


> >   void (*push_ui_event) (GstVideoOverlay *overlay, GstEvent *event);
> I agree with Dave here. This shouldn't be part of the overlay interface.

It's gone.

> >   void (*set_geometry)  (GstVideoOverlay *overlay, gint width, gint height);
> >   void (*get_geometry)  (GstVideoOverlay *overlay, gint *width, gint *height);
> What does this do? And why do we need this? In the case of X, if I give
> an XID to the plugin, then the plugin can figure everything out from the
> plugin. Or is this meant for cases where you want to change size when a
> new video has been loaded and you want to rescale the window so that it
> will have the size of the new video? In that case, isn't it easier to
> set the size of your widget, which changes the size of its GdkWindow,
> which triggers a size change in the plugin automatically (since it knows
> the XID)? I'm not sure how this works for dFB, I'm just trying to figure
> out why we would need each such function. ;).

If we always make sure that the overlay resource is not private to the
video overlay element then those methods are useless.. If the app is not
able to get geometry of the overlay or to resize it on it's own then we
have a  need for that..

> >   /* signals */
> >   void (*have_video_out)  (GstVideoOverlay *overlay,
> >                            GstVideoOverlayResource *video_out);
> Here, you probably want to describe the order of signal/functions. Do
> you need to call set_video_out () before or after this signal has been
> fired? Or are the two related in another way (mutually exclusive or so).
> Or are they not related at all?

if you don't call set_video_overlay and you set the pipeline to play it
will create a TOPLEVEL window and then send that through
have_video_overlay.. If you set the overlay before this signal should
not be triggered as we already have the video overlay resource..

> >   void (*have_size)       (GstVideoOverlay *overlay, gint width, gint height);
> >   void (*frame_displayed) (GstVideoOverlay *overlay);
> I'd add an comment that this one (frame_displayed) is optional. At least
> for v4l (I think for dxr3, too), you don't get signals when the overlay
> received the next frame, so you can never trigger this signal. I.e., it
> can be here, but assure that its optional and informational, not
> compulsary.

Dunno if it's really usefull. It seats in sdlvideosink and xvideosink

PS : Updated version attached...

Julien MOUTTE (aka Dolphy)

Homepage : http://dolphy-tech.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstvideooverlay.c
Type: text/x-c
Size: 7252 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20031016/4130aa77/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gstvideooverlay.h
Type: text/x-c-header
Size: 3616 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20031016/4130aa77/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20031016/4130aa77/attachment.pgp>

More information about the gstreamer-devel mailing list