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 777458 - decklinkaudiosrc: Option to use max channels supported by device
decklinkaudiosrc: Option to use max channels supported by device
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 1.11.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-18 16:32 UTC by Vivia Nikolaidou
Modified: 2017-01-26 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-decklinkaudiosrc-Option-to-use-max-channels-supporte.patch (3.71 KB, patch)
2017-01-18 16:33 UTC, Vivia Nikolaidou
none Details | Review
0001-decklinkaudiosrc-Option-to-use-max-channels-supporte.patch (4.15 KB, patch)
2017-01-26 13:19 UTC, Vivia Nikolaidou
committed Details | Review

Description Vivia Nikolaidou 2017-01-18 16:32:44 UTC
Query the device for the maximum number of channels supported and have
an option to use that. Default is still 2.
Comment 1 Vivia Nikolaidou 2017-01-18 16:33:37 UTC
Created attachment 343733 [details] [review]
0001-decklinkaudiosrc-Option-to-use-max-channels-supporte.patch

This works, but it feels a bit clumsy in some parts. Please review.
Comment 2 Sebastian Dröge (slomo) 2017-01-19 10:53:12 UTC
Review of attachment 343733 [details] [review]:

::: sys/decklink/gstdecklinkaudiosrc.cpp
@@ +742,3 @@
+    if (self->input->attributes) {
+      HRESULT ret = self->input->attributes->GetInt
+          (BMDDeckLinkMaximumAudioChannels, &self->channels_found);

I would move that to gstdecklink.cpp in the loop where we detect all the cards, and then just reuse that value here

@@ +758,3 @@
+        self->channels_found = DEFAULT_CHANNELS;
+      }
+    }

You might also want to negotiate here the maximum of the channels supported by the card and downstream, i.e. always return the whole range here and in fixate_caps() fixate to the maximum
Comment 3 Vivia Nikolaidou 2017-01-26 13:19:18 UTC
Created attachment 344321 [details] [review]
0001-decklinkaudiosrc-Option-to-use-max-channels-supporte.patch

Thanks, here is the new patch. I didn't move the channel detection code BTW (as discussed IRL) because a "git grep" showed me that other parts of the code do it the same way as here, so I kept it consistent. I only changed the negotiation.
Comment 4 Sebastian Dröge (slomo) 2017-01-26 14:19:34 UTC
commit f23277e55df363ec8e3686f19edf21d1810ab62d
Author: Vivia Nikolaidou <vivia@toolsonair.com>
Date:   Wed Jan 18 17:53:00 2017 +0200

    decklinkaudiosrc: Option to use max channels supported by device
    
    Query the device for the maximum number of channels supported and have
    an option to use that. Default is still 2.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777458