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 591651 - dvbsrc: use better nicks for GstDvbSrcModulation and other enums
dvbsrc: use better nicks for GstDvbSrcModulation and other enums
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.22
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-08-13 06:09 UTC by Sebastian Dröge (slomo)
Modified: 2011-02-02 18:44 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2009-08-13 06:09:28 UTC
Hi,
currently it is like this:
  static GEnumValue modulation_types[] = {
    {QPSK, "QPSK", "QPSK"},
    {QAM_16, "QAM 16", "QAM 16"},
    {QAM_32, "QAM 32", "QAM 32"},
    {QAM_64, "QAM 64", "QAM 64"},
    {QAM_128, "QAM 128", "QAM 128"},
    {QAM_256, "QAM 256", "QAM 256"},
    {QAM_AUTO, "AUTO", "AUTO"},
    {VSB_8, "8VSB", "8VSB"},
    {VSB_16, "16VSB", "16VSB"},
    {0, NULL, NULL},
  };

It should be more like:
  static GEnumValue modulation_types[] = {
    {QPSK, "QPSK", "QPSK"},
    {QAM_16, "QAM 16", "QAM-16"},
    {QAM_32, "QAM 32", "QAM-32"},
    {QAM_64, "QAM 64", "QAM-64"},
    {QAM_128, "QAM 128", "QAM-128"},
    {QAM_256, "QAM 256", "QAM-256"},
    {QAM_AUTO, "AUTO", "AUTO"},
    {VSB_8, "8VSB", "8-VSB"},
    {VSB_16, "16VSB", "16-VSB"},
    {0, NULL, NULL},
  };

Enum nicks usually contain no spaces and are usually all lowercase as well. Every other element I'm aware of uses the same rules as the rules that apply for property nicks.

Problem with spaces is especially when using gst-launch, you need to use modulation="QAM 16" instead of something like modulation=qam-16  (note the "")

Would be nice to change this here before it gets moved to -good :)
Comment 1 Fabrizio Milo 2011-02-02 17:46:02 UTC
Any additional comments on this suggestion? I can make a patch for it.
Comment 2 Tim-Philipp Müller 2011-02-02 18:44:28 UTC
Sounds like a good idea! Thanks for the offer to make a patch, but it's probably faster and easier for me if I just fix it myself now :)

 commit 14375582fa8ae44a356eb4a3aabb267b47fd7327
 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk>
 Date:   Wed Feb 2 18:41:39 2011 +0000

    dvbsrc: fix up enum nick names
    
    https://bugzilla.gnome.org/show_bug.cgi?id=591651