MathewSachin / Captura

Capture Screen, Audio, Cursor, Mouse Clicks and Keystrokes
https://mathewsachin.github.io/Captura/
MIT License
9.81k stars 1.84k forks source link

can't access webcams on surface pro 4 with captura #347

Open phobos6995 opened 5 years ago

phobos6995 commented 5 years ago

I already referenced issues #172 (I tried updating the drivers) above to no avail.

Here is what I get when I try to open captura:

System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Captura.Webcam.CaptureWebcam.RenderGraph() at Captura.Webcam.CaptureWebcam.StartPreview() at Captura.WebcamControl.ShowOnMainWindow(Window MainWindow) at Captura.Models.WebCamProvider.set_SelectedCam(IWebcamItem value)

Thanks in advance.

phobos6995 commented 5 years ago

PS

I can access webcams with OBS Studio, and other screencast software. I don't know if that helps.

MathewSachin commented 5 years ago

Does your webcam work with ScreenToGif. Captura's webcam code is based on it.

phobos6995 commented 5 years ago

I got exactly the same exception when using the webcam feature on ScreenToGif.

phobos6995 commented 5 years ago

The short answer is, no it does not work with ScreenToGif either. It sounds as if there is an issue with the COM port (?)

MathewSachin commented 5 years ago

I'm not sure about the error and searching about it does not help either :cry:

scootec commented 5 years ago

I am also having the same problem :(.

Surface Laptop (Gen 1). I haven't been able to turn up anything on Google either...

System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Captura.Webcam.CaptureWebcam.RenderGraph()
   at Captura.Webcam.CaptureWebcam.StartPreview()
   at Captura.WebcamControl.ShowOnMainWindow(Window MainWindow)
   at Captura.Models.WebCamProvider.set_SelectedCam(IWebcamItem value)
jonnyforestGIS commented 4 years ago

OS: Windows 7 Pro 64-bits Capture Version: v9.0.0 beta Hi, this happens as well in Lenovo T570. Tested in Screen2GIF with the same result.

I'm sending the log file:

System.NullReferenceException: Object reference not set to an instance of an object. at Captura.WebcamPage.<SetupPreview>b__9_0(Object S, DependencyPropertyChangedEventArgs E) at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args) at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) at System.Windows.UIElement.UpdateIsVisibleCache() at System.Windows.UIElement.OnVisualParentChanged(DependencyObject oldParent) at System.Windows.Controls.Page.OnVisualParentChanged(DependencyObject oldParent) at System.Windows.Media.Visual.FireOnVisualParentChanged(DependencyObject oldParent) at System.Windows.Media.Visual.AddVisualChild(Visual child) at System.Windows.FrameworkElement.set_TemplateChild(UIElement value) at System.Windows.Controls.ContentPresenter.UseContentTemplate.BuildVisualTree(FrameworkElement container) at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate) at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField1 templateDataField, FrameworkElement container) at System.Windows.FrameworkElement.ApplyTemplate() at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Control.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Controls.Border.MeasureOverride(Size constraint) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.Window.MeasureOverrideHelper(Size constraint) at System.Windows.Window.MeasureOverride(Size availableSize) at System.Windows.FrameworkElement.MeasureCore(Size availableSize) at System.Windows.UIElement.Measure(Size availableSize) at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.Interop.HwndSource.SetLayoutSize() at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value) at System.Windows.Window.SetRootVisual() at System.Windows.Window.SetRootVisualAndUpdateSTC() at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight) at System.Windows.Window.CreateSourceWindow(Boolean duringShow) at System.Windows.Window.ShowHelper(Object booleanBox) at System.Windows.Window.ShowDialog() at Captura.App.App_OnDispatcherUnhandledException(Object Sender, DispatcherUnhandledExceptionEventArgs Args) at System.Windows.Threading.Dispatcher.CatchException(Exception e) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at Captura.App.Main()

Cheers