Compilation error : use of GES Gstreamer SDK - OK on Linux - NOK on Windows

Eloi Bail eloi.bail at
Wed Apr 10 12:02:05 PDT 2013

Hi all,

We want to port linux code using GES on windows.
The development used Gstreamer SDK.

The same code can not be compiled on windows platform while it does on

*Here is a simple code :*

*#include <gst/gst.h>*

*#include <ges/ges.h>*

* *

*int main()*


*g_print ("Test.\n");*


1>------ Build started: Project: SFL_ges_comp, Configuration: Release Win32

1>Build started 10/04/2013 2:40:09 PM.


1>  ges_comp.cpp

warning C4200: nonstandard extension used : zero-sized array in struct/union

1>          Cannot generate copy-ctor or copy-assignment operator when UDT
contains a zero-sized array

error C2229: struct '_GESTimelineSourceClass' has an illegal zero-sized

error C2229: struct '_GESTimelineOperationClass' has an illegal zero-sized


1>Build FAILED.


1>Time Elapsed 00:00:00.71
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

*Our analysis :*

It looks like we have a warning due to zero length in struct.
Because ges_reserved is at the end of the struct, it lead to a warning but
not a error

struct _GESTimelineObjectClass {
  /*< private >*/
  GInitiallyUnownedClass parent_class;

  /*< public >*/
  GESCreateTrackObjectFunc create_track_object;
  GESCreateTrackObjectsFunc create_track_objects;

  /* FIXME : might need a release_track_object */
  GESFillTrackObjectFunc  fill_track_object;
  gboolean need_fill_track;
  gboolean snaps;

  void (*track_object_added)    (GESTimelineObject *object,
                                GESTrackObject *tck_object);
  void (*track_object_released) (GESTimelineObject *object,
                                GESTrackObject *tck_object);
  void (*set_max_duration )     (GESTimelineObject *object,
                                 guint64 maxduration);

  /*< private >*/
  /* Padding for API extension */
  *gpointer _ges_reserved[GES_PADDING - 4];*

But struct GesTimeLineOperation includes GesTimeLineObject struct.
Hence the empty array is not at the end of the struct

--> error

struct _GESTimelineOperation {
  /*< private >*/
  *GESTimelineObject parent;*

  GESTimelineOperationPrivate *priv;

  /* Padding for API extension */
  gpointer _ges_reserved[GES_PADDING];

Does someone already saw this issue ?

We could modify the struct of GesTimelineOperation to put parent at the
end, but could it lead to other issues. For example someone that is
considering this static  structure to access from one member to the next

Thanks a lot,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list