项目搭建
This commit is contained in:
28
cxx/main.cc
Normal file
28
cxx/main.cc
Normal file
@ -0,0 +1,28 @@
|
||||
#include <iostream>
|
||||
// #pragma comment(lib, "ws2_32.lib")
|
||||
// #pragma comment(lib, "winmm.lib")
|
||||
// #pragma comment(lib, "strmiids")
|
||||
// #pragma comment(lib, "mfplat")
|
||||
// #pragma comment(lib, "mfuuid")
|
||||
// #pragma comment(lib, "Ws2_32")
|
||||
// #pragma comment(lib, "Secur32")
|
||||
// #pragma comment(lib, "Bcrypt")
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
#include <libavformat/avformat.h>
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int, char **)
|
||||
{
|
||||
AVFormatContext *ifmt_ctx = nullptr;
|
||||
if (avformat_open_input(&ifmt_ctx, "http://vjs.zencdn.net/v/oceans.mp4", nullptr, nullptr) < 0)
|
||||
printf("avformat_open_input failed\n");
|
||||
printf("nb_stream=%d\n", ifmt_ctx->nb_streams);
|
||||
|
||||
std::cout << "Hello, from ffmpeg!\n";
|
||||
}
|
Reference in New Issue
Block a user