29 lines
716 B
C++
29 lines
716 B
C++
#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";
|
|
}
|