AFAIK it's not "tied in" to dshow as of yet, is this a really big priority?

On Wed, Aug 20, 2014 at 8:16 AM, Mike Charikov <[email protected]> wrote:
>
> Hi!
>
>
>
> I try to use avdevice_list_devices() for getting list of video devices, but 
> don’t clearly understand, how to do that properly. How should I properly init 
> AVFormatContext for calling avdevice_list_devices()?
>
>
>
> Tried something like that:
>
>
>
> int main() {
>
>
>
>                 avdevice_register_all();
>
>                 avcodec_register_all();
>
>
>
>                 AVFormatContext* format_context = avformat_alloc_context();
>
>                 AVInputFormat *fmt = av_find_input_format("dshow");
>
>                 AVDeviceInfoList *device_list=NULL;
>
>
>
>                 int err = avformat_open_input(&format_context, NULL, fmt, 
> NULL);
>
>                 if (err != 0) {
>
>                                fprintf(stderr, "ffmpeg: Unable to open input: 
> %d\n", err);
>
>                 }
>
>
>
>                 int i = avdevice_list_devices(format_context, &device_list);
>
>
>
>                 return 0;
>
> }
>
>
>
> But avformat_open_input() returns error (code -1414092869), and so does 
> avdevice_list_devices() (code -40)
>
>
>
>
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user
>
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to