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 678170 - osxaudiosink: respect the prefered channel layout
osxaudiosink: respect the prefered channel layout
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
0.10.x
Other Mac OS
: Normal enhancement
: 0.10.32
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-15 14:52 UTC by Josep Torra Valles
Modified: 2012-06-19 12:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch that implements the behaviour (14.44 KB, patch)
2012-06-15 14:52 UTC, Josep Torra Valles
needs-work Details | Review
patch that respect the user channel configuration (14.51 KB, patch)
2012-06-19 10:21 UTC, Josep Torra Valles
committed Details | Review

Description Josep Torra Valles 2012-06-15 14:52:05 UTC
Created attachment 216520 [details] [review]
patch that implements the behaviour

In OSX is possible to configure the prefered channel layout using the "Audio MIDI Setup" tool.

The attached patch ensures that exposed caps match with user preferences.
Comment 1 Sebastian Dröge (slomo) 2012-06-17 20:23:40 UTC
Review of attachment 216520 [details] [review]:

+        case kAudioChannelLabel_LeftSurround:
+          pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_LEFT;
+          break;
+        case kAudioChannelLabel_RightSurround:
+          pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT;
+          break;
+        case kAudioChannelLabel_RearSurroundLeft:
+          pos[i] = GST_AUDIO_CHANNEL_POSITION_SIDE_LEFT;
+          break;
+        case kAudioChannelLabel_RearSurroundRight:
+          pos[i] = GST_AUDIO_CHANNEL_POSITION_SIDE_RIGHT;
+          break;
+        case kAudioChannelLabel_CenterSurround:
+          pos[i] = GST_AUDIO_CHANNEL_POSITION_REAR_CENTER;
+          break;

Are you sure this is correct? I would expect:
L/R Surround => L/R Side
L/R Rear Surround => L/R Rear

But for Center Surround => Rear I have no suggestion either ;)


+      gst_caps_append_structure (caps, s);
+      if (max_channels > 2 && use_positions) {
+        s = gst_structure_copy (s);

s not valid after append_structure()!


+        gst_structure_set (s, "channels", G_TYPE_INT, max_channels, NULL);

Really? Shouldn't it allow any permutation and subset of the allowed channels?


You should for 0.10 check when configuring the ringbuffer to caps that these caps are actually supported now for the device. Because of the caps setting "bug" in 0.10, where core only checks against the template caps.
Comment 2 Josep Torra Valles 2012-06-19 10:21:47 UTC
Created attachment 216728 [details] [review]
patch that respect the user channel configuration

New patch with requested fixes
Comment 3 Sebastian Dröge (slomo) 2012-06-19 12:05:21 UTC
commit c6cd91755487fc2af67d71dccef457af01a33d0b
Author: Josep Torra <n770galaxy@gmail.com>
Date:   Tue Jun 19 12:15:33 2012 +0200

    osxaudiosink: respect the prefered channel layout
    
    In OSX is allowed to configure the default audio output device,
    prefered channel layout and speaker positions through the tool
    "Audio MIDI Setup".