/// <summary>
        /// Finds the VBI pin on the video capture device.
        /// If it existst the pin is stored in _pinVBI
        /// </summary>
        /// <param name="graph">The stored graph</param>
        private void FindVBIPin(Graph graph)
        {
            Log.Log.WriteFile("analog: FindVBIPin on VideoCapture");
            int pinIndex;

            try
            {
                IPin pinVBI = FilterGraphTools.GetPinByCategoryAndDirection(_filterVideoCapture, PinCategory.VideoPortVBI, 0,
                                                                            PinDirection.Output, out pinIndex);
                if (pinVBI != null)
                {
                    Log.Log.WriteFile("analog: VideoPortVBI pin found");
                    Release.ComObject(pinVBI);
                    return;
                }
                pinVBI = FilterGraphTools.GetPinByCategoryAndDirection(_filterVideoCapture, PinCategory.VBI, 0,
                                                                       PinDirection.Output, out pinIndex);
                if (pinVBI != null)
                {
                    Log.Log.WriteFile("analog: VBI pin found");
                    graph.Capture.TeletextPin = pinIndex;
                    _pinVBI = pinVBI;
                    return;
                }
            }
            catch (COMException ex)
            {
                if (ex.ErrorCode.Equals(unchecked ((Int32)0x80070490)))
                {
                    // pin on a NVTV capture filter is named VBI..
                    Log.Log.WriteFile("analog: getCategory not supported by collection ? ERROR:0x{0:x} :" + ex.Message,
                                      ex.ErrorCode);

                    if (_filterVideoCapture == null)
                    {
                        return;
                    }
                    Log.Log.WriteFile("analog: find VBI pin by name");

                    IPin pinVBI = FilterGraphTools.GetPinByName(_filterVideoCapture, "VBI", PinDirection.Output, out pinIndex);
                    if (pinVBI != null)
                    {
                        Log.Log.WriteFile("analog: pin named VBI found");
                        graph.Capture.TeletextPin = pinIndex;
                        _pinVBI = pinVBI;
                        return;
                    }
                }
                Log.Log.WriteFile("analog: Error in searching vbi pin - Skipping error");
            }
            Log.Log.WriteFile("analog: FindVBIPin on VideoCapture no vbi pin found");
        }