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 571106 - Add new GStreamer flags to gvc
Add new GStreamer flags to gvc
Status: RESOLVED FIXED
Product: gnome-media
Classification: Deprecated
Component: gst-mixer
2.25.x
Other All
: Normal normal
: ---
Assigned To: gnome media maintainers
gnome media maintainers
Depends on: 570832 571068
Blocks:
 
 
Reported: 2009-02-09 22:05 UTC by Brian Cameron
Modified: 2009-05-22 19:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
patch adding feature (25.22 KB, patch)
2009-02-09 22:08 UTC, Brian Cameron
none Details | Review
picture showing changes (37.36 KB, image/png)
2009-02-09 22:12 UTC, Brian Cameron
  Details
picture showing Options tab (25.26 KB, patch)
2009-02-18 03:59 UTC, Garrett D'Amore
none Details | Review
picture showing Switches tab (23.06 KB, image/png)
2009-02-18 04:00 UTC, Garrett D'Amore
  Details
updated patch (26.24 KB, patch)
2009-03-03 23:58 UTC, Brian Cameron
none Details | Review
updated patch (25.10 KB, patch)
2009-03-04 22:48 UTC, Brian Cameron
needs-work Details | Review
updated patch (26.83 KB, patch)
2009-05-22 19:07 UTC, Brian Cameron
committed Details | Review

Description Brian Cameron 2009-02-09 22:05:53 UTC
Note GStreamer enhancement request bug #570832 to add some new flags to the base GStreamer mixer class.  This makes it possible to do some new things with 
gvc.  Namely:

1) sliders can specify not to show the MUTE or RECORD buttons if they are not
   meaningful for a specific slider.

2) To group switches and options on the Recording or Playback tabs if the 
   switch or slider makes more sense on that tab.  This is managed by adding
   a table (flagbuttonbox) underneath the sliders where the switches and options
   will be displayed.  So, if the plugin specifies that the switch or option 
   should be displayed on the INPUT or OUTPUT tabs, it will do so.

3) Whether to ignore the built-in whitelist or not.

The code is reasonably backwards compatible so that even if you use a plugin
with the flags with a version of gvc which doesn't support this patch it will
still work, but will the user-interface won't be exactly right.  For example,
a MUTE or RECORD button would be displayed where it isn't meaningful, etc.

Also, note that this patch depends on the fix in bug #571068 which makes the
preferences.c sort_by_page_num function a bit smarter and more efficient.  
This patch will only apply on top of that patch.  You could probably make this
work without applying that patch, but the code in preferences.c would need to
be reworked a bit differently to pass the mixer flag (now needed by get_page_num) into the function.  Perhaps via userdata.

Note Garrett D'Amore <garrett.damore@sun.com> wrote this patch.
Comment 1 Brian Cameron 2009-02-09 22:08:27 UTC
Created attachment 128338 [details] [review]
patch adding feature
Comment 2 Brian Cameron 2009-02-09 22:12:36 UTC
Created attachment 128339 [details]
picture showing changes

Here is a picture showing gvc with this feature and making use of an OSSv4 plugin making use of the new flags.
Comment 3 Garrett D'Amore 2009-02-18 03:59:24 UTC
Created attachment 128948 [details] [review]
picture showing Options tab

This picture shows gvc with some options relating to jack retasking on a Solaris system with a new audio framework.
Comment 4 Garrett D'Amore 2009-02-18 04:00:39 UTC
Created attachment 128949 [details]
picture showing Switches tab

This shows a simple switches tab for a device with only one switch, which is the enabling of the keyboard beep.
Comment 5 Brian Cameron 2009-02-24 17:47:26 UTC
Note bug #570832 was just approved today, so that now the GStreamer flags are supported in gst-plugins-base.  

Can this patch (and the patch for bug #571068) go upstream so that g-v-c can also
support these new flags?

Thanks!
Comment 6 Brian Cameron 2009-03-03 23:58:42 UTC
Created attachment 129984 [details] [review]
updated patch


This updated patch resolves a minor issue with the vertical separators showing
up incorrectly.  This changes the cb_gconf function in element.c so that it
doesn't create vertical separators when "n <2 && track->num_channels ==0".

In other words, when an object is added to the flagbuttonbox, and is not a slider, it shows up in the area below the sliders, so no vertical separator
should be shown in this case.  With this change, the GUI looks better.

I also merged the change from bug #571080 into this patch.  I was previously
confused and thought that this was unrelated to this patch.  But obviously
all the code that checks for "num_channels == 0" is trying to ensure that
any objects which show up in the flagbuttonbox are handled differently.
Comment 7 Brian Cameron 2009-03-04 22:48:53 UTC
Created attachment 130077 [details] [review]
updated patch

This patch now applies against SVN head.  Probably best to not commit this until a new release of gst-plugins-base is released that actually contains the new flag.
Comment 8 Bastien Nocera 2009-03-04 23:10:42 UTC
And you'll need to update configure.ac to show the required version as well.
Comment 9 Brian Cameron 2009-05-22 19:07:59 UTC
Created attachment 135198 [details] [review]
updated patch


This patch adds the change to configure.ac, as requested.
Comment 10 Brian Cameron 2009-05-22 19:08:37 UTC
I committed the latest patch to gnome-media GIT master, so marking this as Fixed.