Created
March 31, 2015 00:09
-
-
Save kkm/343c122f86c3b3e9b51c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================================================ | |
Name : test_ffmpeg.c | |
Author : | |
Version : | |
Copyright : Your copyright notice | |
Description : Hello World in C, Ansi-style | |
============================================================================ | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <libavformat/avformat.h> | |
#include <libavcodec/avcodec.h> | |
#include <libavdevice/avdevice.h> | |
#include <libavutil/avutil.h> | |
int main(void) { | |
avcodec_register_all(); | |
avdevice_register_all(); | |
//Geht nicht es ist gleiche fehler wie vstudio crash | |
/*AVDeviceInfoList **device_list = NULL; | |
AVFormatContext *pAVFormatCtx = avformat_alloc_context(); | |
AVInputFormat *inputFmt = av_find_input_format("dshow"); | |
pAVFormatCtx->iformat = inputFmt; | |
if (avdevice_list_devices(pAVFormatCtx, device_list) < 0) { | |
printf("can not list devices\n"); | |
return -1; | |
}*/ | |
AVFormatContext *formatC = avformat_alloc_context(); | |
AVDictionary* options = NULL; | |
av_dict_set(&options, "list_devices", "true", 0); | |
AVInputFormat *iformat = av_find_input_format("dshow"); | |
avformat_open_input(&formatC, "video=dummy", iformat, &options); | |
puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */ | |
getchar(); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment