[longomatch] Filter out BlackMagic DeckLink video capture cards coming through the DirectShow plugin.



commit ef03ff20afafc64f9f065518498f4e87d3a4e11f
Author: Xavi Artigas <xartigas fluendo com>
Date:   Tue Oct 28 12:20:42 2014 +0100

    Filter out BlackMagic DeckLink video capture cards coming through the DirectShow plugin.
    
    The Direct Show plugin does not seem to handle them very well, and they are accessible through the 
ksvideosrc element anyway.

 LongoMatch.Multimedia/Utils/VideoDevice.cs |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/LongoMatch.Multimedia/Utils/VideoDevice.cs b/LongoMatch.Multimedia/Utils/VideoDevice.cs
index 66beb3b..0789535 100644
--- a/LongoMatch.Multimedia/Utils/VideoDevice.cs
+++ b/LongoMatch.Multimedia/Utils/VideoDevice.cs
@@ -16,6 +16,7 @@
 //  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 // 
 using System.Collections.Generic;
+using System.Text.RegularExpressions;
 using LongoMatch.Core.Common;
 using LongoMatch.Video.Capturer;
 
@@ -38,6 +39,13 @@ namespace LongoMatch.Multimedia.Utils
 
                        foreach (string source in devices) {
                                foreach (string devname in GstCameraCapturer.ListVideoDevices (source)) {
+                                       /* The Direct Show GStreamer element seems to have problems with the
+                                        * BlackMagic DeckLink cards, so filter them out. They are also
+                                        * available through the ksvideosrc element. */
+                                       if (source == "dshowvideosrc" &&
+                                               Regex.Match (devname, ".*blackmagic.*|.*decklink.*", 
RegexOptions.IgnoreCase).Success) {
+                                               continue;
+                                       }
                                        devicesList.Add (new Device {
                                                ID = devname,
                                                DeviceType = CaptureSourceType.System,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]