GNOME Bugzilla – Bug 777458
decklinkaudiosrc: Option to use max channels supported by device
Last modified: 2017-01-26 14:20:43 UTC
Query the device for the maximum number of channels supported and have an option to use that. Default is still 2.
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.
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
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.
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