<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:DE;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Arial",sans-serif;
        color:black;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.keywordflow
        {mso-style-name:keywordflow;}
span.stringliteral
        {mso-style-name:stringliteral;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">Hi Hristo,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">thanks again for your support.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">I tried with <o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:Consolas;color:black">avformat_open_input(&m_pFormatCtxInCam, </span><span lang="EN-US" style="font-family:Consolas;color:gray">szUrl</span><span lang="EN-US" style="font-family:Consolas;color:black">, m_pInFrmt, </span><span lang="EN-US" style="font-family:Consolas;color:blue">nullptr</span><span lang="EN-US" style="font-family:Consolas;color:black">)<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">which did not solve the issue. Same error as before.<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">Yes, </span><span lang="EN-US" style="color:black">m_pFormatCtxInCam->iformat->create_device_capabilities </span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">is nullptr in my case.<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">Same is the case for </span><span lang="EN-US" style="font-family:Consolas;color:black">m_pInFrmt</span><span lang="EN-US" style="color:black">->create_device_capabilities.</span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US"><o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">Actually I tried the same code with <o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:Consolas;color:black">m_pInFrmt = m_pLibAvFormatWrapper->av_find_input_format(“rtsp”); </span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">and szUrl being a valid rtsp stream url. Same here.<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">(the stream opens successfully and I can grab and decode frames etc… all good there)<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">Probably I am missing some register-call… <o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">In the link you send me for this API the first call is<o:p></o:p></span></pre>
<pre style="background:white"><a href="https://ffmpeg.org/doxygen/trunk/avformat_8h.html#a0234fa1116af3c0a72edaa08a2ba304f"><span lang="EN-US" style="color:#4665A2;background:#FBFCFD">avformat_alloc_output_context2</span></a><span lang="EN-US" style="color:black;background:#FBFCFD">(&oc, </span><a href="https://ffmpeg.org/doxygen/trunk/coverity_8c.html#a070d2ce7b6bb7e5c05602aa8c308d0c4"><span lang="EN-US" style="color:#4665A2;background:#FBFCFD">NULL</span></a><span lang="EN-US" style="color:black;background:#FBFCFD">, </span><span class="stringliteral"><span lang="EN-US" style="color:#002080;background:#FBFCFD">"opengl"</span></span><span lang="EN-US" style="color:black;background:#FBFCFD">, </span><a href="https://ffmpeg.org/doxygen/trunk/coverity_8c.html#a070d2ce7b6bb7e5c05602aa8c308d0c4"><span lang="EN-US" style="color:#4665A2;background:#FBFCFD">NULL</span></a><span lang="EN-US" style="color:black;background:#FBFCFD">)<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">I am not doing this, because I am not interested in option-ranges of the output format. But there is no</span><span lang="EN-US" style="color:black;background:#FBFCFD"> avformat_alloc_input_context-</span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">function, right? Or do I need to use</span><span lang="EN-US" style="color:black;background:#FBFCFD"> avformat_alloc_output_context2 </span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US">in my case? But then, what would be useful parameters?<o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Mit freundlichen Grüßen / Best regards<br>
<br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#0070C0">Sven Hans</span><span lang="EN-US" style="color:black"><br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#0070C0">DERMA</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#0070C0">LOG Identification Systems GmbH<br>
Systems Engineer</span><span style="color:black"><br>
<br>
</span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D">Mittelweg 120 | 20148 Hamburg</span><span style="color:black"><o:p></o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D;mso-fareast-language:EN-US">Fon +49 40 413227 0<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td valign="top" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D;mso-fareast-language:EN-US">Fax +49-40-413227-40<o:p></o:p></span></p>
</td>
</tr>
<tr>
<td nowrap="" valign="top" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D;mso-fareast-language:EN-US">Mail
</span><span style="mso-fareast-language:EN-US"><a href="mailto:Sven.Hans@dermalog.com" title="Click to send email to Hans, Sven"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D">Sven.Hans@dermalog.com</span></a></span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td nowrap="" valign="top" style="padding:0cm 0cm 0cm 0cm">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D;mso-fareast-language:EN-US">Web
</span><span style="mso-fareast-language:EN-US"><a href="https://www.dermalog.com"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D">www.dermalog.com</span></a></span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D;mso-fareast-language:EN-US"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span lang="EN-US" style="color:black"><br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#7D7D7D">This e-mail may contain information that is confidential or proprietary to DERMALOG Identification Systems GmbH. Any unauthorized disclosure, distribution or other
 use is prohibited. <br>
</span><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><br>
</span><span style="font-size:7.5pt;font-family:Webdings;color:#00B050">P</span><span lang="EN-US" style="font-size:7.5pt;font-family:"Arial",sans-serif;color:#00B050"> Please consider the environment before printing this email</span><span lang="EN-US" style="font-family:"Arial",sans-serif;color:black">
</span><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Libav-user <libav-user-bounces@ffmpeg.org>
<b>On Behalf Of </b>Hristo Ivanov<br>
<b>Sent:</b> Mittwoch, 17. April 2019 15:03<br>
<b>To:</b> This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. <libav-user@ffmpeg.org><br>
<b>Subject:</b> Re: [Libav-user] list all available formats of webcam<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">Hi.</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">The implementation of 'avdevice_capabilities_create'(</span><a href="https://ffmpeg.org/doxygen/trunk/avdevice_8c_source.html#l00143"><span lang="EN-US" style="font-family:"Courier New"">https://ffmpeg.org/doxygen/trunk/avdevice_8c_source.html#l00143</span></a><span lang="EN-US" style="font-family:"Courier New"">)
 starts with the following lines:</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<pre style="white-space:pre-wrap"><span lang="EN-US" style="color:black">1    int ret;<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">2    av_assert0(s && caps);<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">3    av_assert0(s->iformat || s->oformat);<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">4    if ((s->oformat && !s->oformat->create_device_capabilities) ||<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">5        (s->iformat && !s->iformat->create_device_capabilities))<o:p></o:p></span></pre>
<pre><span lang="EN-US" style="color:black">6        return AVERROR(ENOSYS);<o:p></o:p></span></pre>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">My guess is the -40(ENOSYS) error is returned in line 6. Can you check in your code if '<span style="color:black">m_pFormatCtxInCam->iformat->create_device_capabilities' is different
 from null.</span></span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New";color:black">The next step would be to understand why is
</span><span lang="EN-US" style="font-family:"Courier New"">'<span style="color:black">m_pFormatCtxInCam->iformat->create_device_capabilities' null.
</span>With ffmpeg you just have to dive in the source code and try to understand it.</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">Compiling a debug version of the ffmpeg libs/dlls is extremely useful for this purpose.</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">> Maybe I did not initialize everything correctly or bad ordering of open input?</span><span lang="EN-US"><o:p></o:p></span></p>
</div>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US">> Please see my code:<o:p></o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US"><o:p> </o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US">The code seems correct, my only problem with the above code is in the next line:<o:p></o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US"><o:p> </o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US">> int ret = avformat_open_input(&m_pFormatCtxInCam, szUrl, m_pInFrmt, &m_pInOptions);<o:p></o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">Try using no(NULL) options:<o:p></o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US"><o:p> </o:p></span></pre>
<pre style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US">int ret = avformat_open_input(&m_pFormatCtxInCam, szUrl, m_pInFrmt, NULL);<o:p></o:p></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
<pre><span lang="EN-US">Maybe opening an input with options shuts down the querying capabilities of the input, I don't really know, it's just a guess.<o:p></o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span lang="EN-US"><o:p> </o:p></span></pre>
<pre style="white-space:pre-wrap;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">Regards.<o:p></o:p></pre>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
DERMALOG Identification Systems GmbH * Mittelweg 120, 20148 Hamburg, Germany<br>
CEO/Managing Director: Günther Mull * Commercial Register: AG Hamburg HRB 69547 <br>
</font>
</body>
</html>