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 782028 - gst-stats: doesn't build with msvc
gst-stats: doesn't build with msvc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other Windows
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-01 20:42 UTC by Scott D Phillips
Modified: 2017-07-09 19:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH gstreamer] tracers/stats: Use standard character escapes (1.29 KB, patch)
2017-05-01 20:42 UTC, Scott D Phillips
committed Details | Review

Description Scott D Phillips 2017-05-01 20:42:01 UTC
Created attachment 350825 [details] [review]
[PATCH gstreamer] tracers/stats: Use standard character escapes

gst-stats.c uses character escapes '\e' and '\[' which seem to be gnu extensions.
Comment 1 Scott D Phillips 2017-05-01 20:45:12 UTC
Also, are these regexes working? It looks like they are meant to match ansi escape codes, but ansi escape codes won't have the '\[' thing after the escape character. AFAICT that is a bash-ism to tell the shell that the things between \[ and \] won't be printed, so that it knows how many characters long on the screen the thing it just printed is.
Comment 2 Tim-Philipp Müller 2017-05-04 21:11:25 UTC
This is rather horrible :)
Comment 3 Scott D Phillips 2017-05-05 02:08:02 UTC
(In reply to Scott D Phillips from comment #1)
> Also, are these regexes working? It looks like they are meant to match ansi
> escape codes, but ansi escape codes won't have the '\[' thing after the
> escape character. AFAICT that is a bash-ism to tell the shell that the
> things between \[ and \] won't be printed, so that it knows how many
> characters long on the screen the thing it just printed is.

This is all wrong, sorry for the FUD. I was misunderstanding the ansi CSI, which is actually the two byte sequence 0x1b 0x5b ("\x1b["), and obviously '[' needs escaped in a regex. I tested gst-stats-1.0 (before and after the patch) and the regex is working fine.
Comment 4 Tim-Philipp Müller 2017-05-05 07:45:06 UTC
So it's good to go? Did you test on Linux with gcc as well?
Comment 5 Scott D Phillips 2017-05-08 18:22:34 UTC
(In reply to Tim-Philipp Müller from comment #4)
> So it's good to go? Did you test on Linux with gcc as well?

I have only tested this with gcc on linux actually. gst-launch-1.0 (with the stats tracer) and gst-stats-1.0 both crash for me on windows for some reason that I haven't had time to dig into.
Comment 6 Tim-Philipp Müller 2017-07-09 19:11:47 UTC
Well then, let's see how it goes:

commit f37688ef4d81fd1a28eddb1e26b1efccc46329db
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Mon May 1 13:35:09 2017 -0700

    tools: gst-stats: Use standard character escapes
    
    Having '\e' expand to '\x1b' is a gnu extension. I didn't see any
    document describing the behavior, but gcc also seems to expand
    '\[' to '['.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782028


Thanks for the patch.