After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747104 - Windows adaptation remarks
Windows adaptation remarks
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: dont know
1.4.5
Other Windows
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-31 11:27 UTC by Harry
Modified: 2016-12-10 11:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Harry 2015-03-31 11:27:17 UTC
Initial notes (just starting with GStreamer).

1. Installation

The Full installer doesn't ask for the installation folder but picks some illogical default. An option to change it would nice, and the default should be "C:\Program Files (x86)\gstreamer" or "C:\Program Files\gstreamer".

The Custom installer does ask, but half of the packages are marked as not to be installed. So to do a full installation, one is obliged to pick Custom, set the installation folder, and also set these packages one-by-one as to-be-installed.

2. File-names

One is obliged to use the Unix path separator (/) instead of the Windows one (\), at least on gst-launch-1.0.exe (haven't gotten yet into programming).
Comment 1 Harry 2015-04-03 08:36:30 UTC
3. Include files folder-structure

Also for the "#include <gst.h>" include to work without causing multiple errors of file not found, the following paths must currently be added to the compiler's list of include folders:

C:\Program Files (x86)\GStreamer\1.0\x86\include
C:\Program Files (x86)\GStreamer\1.0\x86\include\gstreamer-1.0
C:\Program Files (x86)\GStreamer\1.0\x86\include\gstreamer-1.0\gst
C:\Program Files (x86)\GStreamer\1.0\x86\include\glib-2.0
C:\Program Files (x86)\GStreamer\1.0\x86\lib\glib-2.0\include

The first one should really have been enough. The others are currently required because the #include statements do not include the correct sub-folder names (ie. "#include <gstreamer-1.0\????.h>").

I also found out that gst.h omits video-info.h, so one needs to add:
#include <video/video-info.h>
Comment 2 Tim-Philipp Müller 2015-04-03 08:57:34 UTC
> Also for the "#include <gst.h>" include to work without causing multiple
> errors of file not found, the following paths must currently be added to the
> compiler's list of include folders:

It should be #include <gst/gst.h>

> C:\Program Files (x86)\GStreamer\1.0\x86\include
> C:\Program Files (x86)\GStreamer\1.0\x86\include\gstreamer-1.0
> C:\Program Files (x86)\GStreamer\1.0\x86\include\gstreamer-1.0\gst
> C:\Program Files (x86)\GStreamer\1.0\x86\include\glib-2.0
> C:\Program Files (x86)\GStreamer\1.0\x86\lib\glib-2.0\include
> 
> The first one should really have been enough. The others are currently
> required because the #include statements do not include the correct
> sub-folder names (ie. "#include <gstreamer-1.0\????.h>").

I think it should be the second and the last two. Check what

  pkg-config --cflags gstreamer-1.0

gives you.


> I also found out that gst.h omits video-info.h, so one needs to add:
> #include <video/video-info.h>

On purpose, the video stuff is in a separate helper library with its own include. The include should be:

  #include <gst/foo/foo.h>

in this case:

  #include <gst/video/video.h>
Comment 3 Harry 2015-04-03 09:33:44 UTC
Thanks for your answer.

I don't have pkg-config.

True: including <gst/gst.h> reduces the required includes-set to the second and the last two, this make three.

For ease-of-use I do believe in one global include folder path. It would be nice if all #include statements everywhere were to follow the <gst/foo/foo.h> convention.
Comment 4 Tim-Philipp Müller 2015-04-03 10:47:52 UTC
There can't be one global include path, that's just not how things are done customarily in the pkg-config/glib/gstreamer world.

e.g. both gstreamer 0.10 and 1.0 use #include <gst/gst.h> but one would use -Iprefix/include/gstreamer-0.10/ the other -Iprefix/include/gstreamer-1.0
Comment 5 Harry 2015-04-03 12:22:22 UTC
I don't know if the problem merits a long discussion, but just remark that this doesn't cover these funny two folders :
C:\Program Files (x86)\GStreamer\1.0\x86\include\glib-2.0
C:\Program Files (x86)\GStreamer\1.0\x86\lib\glib-2.0\include
Comment 6 Nicolas Dufresne (ndufresne) 2015-04-03 15:38:28 UTC
If you include the property sheet, you should not have to set these path manually.
Comment 7 Harry 2015-04-03 16:21:58 UTC
I'm not using such a compiler.
Comment 8 Nicolas Dufresne (ndufresne) 2015-04-03 16:31:21 UTC
Then that means you are using GCC, and should be using pkg-config, just download and install it. And then only one path matter:

C:\Program Files (x86)\GStreamer\1.0\x86\lib\pkgconfig

Note that you need to set the prefix to your relocation (the installer lacks this atm). See pkg-config manual on how to override variables.
Comment 9 Sebastian Dröge (slomo) 2015-04-03 19:09:45 UTC
(In reply to Harry from comment #1)
> 3. Include files folder-structure
> 
> Also for the "#include <gst.h>" include to work without causing multiple
> errors of file not found, the following paths must currently be added to the
> compiler's list of include folders:
> 
> C:\Program Files (x86)\GStreamer\1.0\x86\include
> C:\Program Files (x86)\GStreamer\1.0\x86\include\gstreamer-1.0
> C:\Program Files (x86)\GStreamer\1.0\x86\include\gstreamer-1.0\gst
> C:\Program Files (x86)\GStreamer\1.0\x86\include\glib-2.0
> C:\Program Files (x86)\GStreamer\1.0\x86\lib\glib-2.0\include
> 
> The first one should really have been enough. The others are currently
> required because the #include statements do not include the correct
> sub-folder names (ie. "#include <gstreamer-1.0\????.h>").
> 
> I also found out that gst.h omits video-info.h, so one needs to add:
> #include <video/video-info.h>

There are property sheets for VS for all this. Check the stuff inside share/vs/2010. They are autogenerated from the pkg-config stuff.
Comment 10 Sebastian Dröge (slomo) 2015-04-03 19:12:56 UTC
(In reply to Harry from comment #0)

> 2. File-names
> 
> One is obliged to use the Unix path separator (/) instead of the Windows one
> (\), at least on gst-launch-1.0.exe (haven't gotten yet into programming).

Windows-style paths should work on filesrc and others, if not that would be a bug. Make sure to properly escape the backslashes in Windows paths, like you would need to do for any other commandline application too.

For things that expect URIs (e.g. playbin), you must provide a valid URI. Windows does not really make that easy, but like in any other software using URIs you have to do something like file:///C:/Documents%20and%20Settings/davris/FileSchemeURIs.doc

See http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
Comment 11 Harry 2015-04-04 07:31:49 UTC
Include files:
All I am trying to say is that the lack of consistency fits more version 0.10 than version 1.5 or 2.0, templates or not. It's a minor problem and not urgent, but maybe should be taken into consideration in the future.

File paths:
The URI property being troublesome for files and requiring the pre-processing of file-names for adding "file:///" etc., I would suggest for suitable cases an additional property specifying a native-format file-name (maybe "filesrc"?), just for ease-of-use.
Comment 12 Tim-Philipp Müller 2015-04-04 10:56:21 UTC
> The URI property being troublesome for files and requiring the
> pre-processing of file-names for adding "file:///" etc., I would suggest for
> suitable cases an additional property specifying a native-format file-name
> (maybe "filesrc"?), just for ease-of-use.

Adding "file:///" at the beginning of a filename is not the correct way to create a URI. Use gst_filename_to_uri() instead. (This is not windows-specific, but true on other operating systems as well).
Comment 13 Harry 2015-04-04 17:37:27 UTC
Just looks a bit inelegant, but that is a matter of taste.
Comment 14 Harry 2015-04-16 12:26:58 UTC
I have found out thru examples, that gst_filename_to_uri() requires g_free(), which is not mentioned in the documentation.

I have previously naively done :

  g_object_set (playbin, "uri", gst_filename_to_uri(path, NULL), NULL);

But now found that I need to do in fact :

  gchar   *uri;
  uri = gst_filename_to_uri (path, NULL);
  if (uri == NULL)
    ?????;
  g_object_set (playbin, "uri", uri, NULL);
  g_free (uri);

I think this is beyond inelegant, even ugly. The ideal would be :

  g_object_set (playbin, "filesrc", path, NULL);

So I maintain that a "filesrc" parameter to playbin and similar would be much more user-friendly.
Comment 15 Tim-Philipp Müller 2015-04-16 12:48:58 UTC
I have added a comment to the documentation of gst_filename_to_uri() that clarifies that the return value must be freed. For developers familiar with the API conventions that would have been obvious because of the gchar * return value instead of const gchar*, but it's good to make it explicit of course.

Your comments on API aesthetics are noted.
Comment 16 Tim-Philipp Müller 2015-04-16 12:49:40 UTC
And gst_filename_to_uri() will pretty much always succeed unless you feed it invalid input.
Comment 17 Harry 2015-04-16 12:55:03 UTC
Thanks for your answers.
Comment 18 Harry 2015-06-10 13:01:47 UTC
One more enormous problem.

4. The released DLLs cannot be used without their .lib files, so are basically useless.

However, the .lib files were not included in the release!

For myself, I only needed C Core and I knew how to generate CORE_RL_magick_.lib from CORE_RL_magick_.dll by hand, but not everyone would know that.

It would be nice to have included in the release the *.lib files for the DLLs that are user-callable.
Comment 19 Sebastian Dröge (slomo) 2015-06-10 13:06:01 UTC
You mean the .lib files are not included in http://gstreamer.freedesktop.org/data/pkg/windows/1.5.1/gstreamer-1.0-devel-x86_64-1.5.1.msi , i.e. you only get the .dll, headers and .a files?
Comment 20 Harry 2015-06-10 13:14:56 UTC
Posted in the wrong forum, how do I delete this one?
Comment 21 Tim-Philipp Müller 2016-12-10 11:40:29 UTC
Thanks for your comments, but I don't really see anything actionable in here for us.

https://gstreamer.freedesktop.org/documentation/installing/on-windows.html

Has documentation for installing on windows now.

If there are specific things that should be improved in the docs, please file new bugs, thanks!