I wrote c# wpf project which is recording audio and video. This project is normally works on my PC but when i deploy setup to other PC s this is not working. I need help
Error HRESULT E_FAIL has been returned from a call to a COM component
28-08 10:49:16.296 [ERROR] Tenter code hereestCamera.MainWindow.StartRecording-1 - Error HRESULT E_FAIL has been returned from a call to a COM component. System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
try
{
var filters = new Filters();
GetDevices();
foreach (Filter v in filters.VideoInputDevices)
{
foreach (Filter a in filters.AudioInputDevices)
{
try
{
capture = new Capture(v, a);
device = true;
//capture.VideoCompressor = filters.VideoCompressors[0];
//capture.AudioCompressor = filters.AudioCompressors[0];
logger.Info("audio connected--" + a.Name + "--" + a.MonikerString);
logger.Info("video connected--" + v.Name + "--" + v.MonikerString);
break;
}
catch (Exception ex)
{
logger.Error(ex);
continue;
}
}
if (device)
{
break;
}
}
if (device)
{
capture.Stop();
capture.Filename = GetRecordingPath(ticketId);
capture.Start();//-----------error in there
logger.Info("camera started");
}
else
{
MessageBox.Show("Kamera qoşulmayıb");
}
}
catch (Exception ex)
{
logger.Error(ex, ex.Message);
}
}
User contributions licensed under CC BY-SA 3.0