<div dir="ltr"><div><font face="monospace, monospace">Hi.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">The implementation of 'avdevice_capabilities_create'(<a href="https://ffmpeg.org/doxygen/trunk/avdevice_8c_source.html#l00143">https://ffmpeg.org/doxygen/trunk/avdevice_8c_source.html#l00143</a>) starts with the following lines:</font></div><div><pre style="color:rgb(0,0,0);white-space:pre-wrap"><font face="monospace, monospace">1    int ret;
2    av_assert0(s && caps);
3    av_assert0(s->iformat || s->oformat);
4    if ((s->oformat && !s->oformat->create_device_capabilities) ||
5        (s->iformat && !s->iformat->create_device_capabilities))
6        return AVERROR(ENOSYS);</font></pre></div><div><font face="monospace, monospace">My guess is the -40(ENOSYS) error is returned in line 6. Can you check in your code if '<span style="color:black;white-space:pre-wrap">m_</span><span style="color:black;white-space:pre-wrap">pFormatCtxInCam->iformat->create_device_capabilities' is different from null.</span></font></div><div><font face="monospace, monospace"><span style="color:black;white-space:pre-wrap">The next step would be to understand why is </span>'<span style="color:black;white-space:pre-wrap">m_</span><span style="color:black;white-space:pre-wrap">pFormatCtxInCam->iformat->create_device_capabilities' null. </span>With ffmpeg you just have to dive in the source code and try to understand it.</font></div><div><font face="monospace, monospace">Compiling a debug version of the ffmpeg libs/dlls is extremely useful for this purpose.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">> <span style="white-space:pre-wrap">Maybe I did not initialize everything correctly or bad ordering of open input?</span></font></div><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US" style=""><font face="monospace, monospace" style="">> Please see my code:</font></span></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US" style=""><font face="monospace, monospace" style=""><br></font></span></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US" style=""><font face="monospace, monospace" style="">The code seems correct, my only problem with the above code is in the next line:</font></span></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><font face="monospace, monospace"><br></font></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><font face="monospace, monospace">> int ret = avformat_open_input(&m_pFormatCtxInCam, szUrl, m_pInFrmt, &m_pInOptions);<br></font></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US" style=""><font face="monospace, monospace">
Try using no(NULL) options:</font></span></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><font face="monospace, monospace"><br></font></pre><pre style="margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US" style=""><font face="monospace, monospace"><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">int ret = avformat_open_input(&m_pFormatCtxInCam, szUrl, m_pInFrmt, NULL);</pre><span style="white-space:pre-wrap">
Maybe opening an input with options shuts down the querying capabilities of the input, I don't really know, it's just a guess.</span></font></span></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US" style=""><font face="monospace, monospace"><br></font></span></pre><pre style="white-space:pre-wrap;margin:0cm 0cm 0.0001pt;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><font face="monospace, monospace">Regards.</font></pre></div>