Visual studio 2010 在Windows上仅使用DLL';s

Visual studio 2010 在Windows上仅使用DLL';s,visual-studio-2010,visual-c++,ffmpeg,Visual Studio 2010,Visual C++,Ffmpeg,我真正想要的是,使用ffMPEG。 限制条件是仅使用MSVC。由于可维护性问题,不允许使用 因此考虑使用来完成任务。它只包含DLL。没有lib文件,所以我尝试使用HINSTANCE-hInstLibrary=LoadLibrary(“avcodec-54.DLL”)加载一个DLL并且它可以工作。但是我在任何地方都找不到这个DLL的接口。有人能帮忙吗?我如何知道我可以调用DLL的哪些函数以及我可以传递哪些参数以便获得视频帧 使用来自的ffmpeg的公共接口 ffmpegdir/include/li

我真正想要的是,使用ffMPEG。
限制条件是仅使用MSVC。由于可维护性问题,不允许使用


因此考虑使用来完成任务。它只包含DLL。没有
lib
文件,所以我尝试使用
HINSTANCE-hInstLibrary=LoadLibrary(“avcodec-54.DLL”)加载一个DLL并且它可以工作。但是我在任何地方都找不到这个DLL的接口。有人能帮忙吗?我如何知道我可以调用DLL的哪些函数以及我可以传递哪些参数以便获得视频帧

使用来自的ffmpeg的公共接口

ffmpegdir/include/libavcodec/
ffmpegdir/include/libavformat/
etc.
例如,要打开文件进行读取,请使用ffmpegdir/include/libavformat/avformat.h中的avformat\u open\u输入

AVFormatContext * ctx= NULL;
int err = avformat_open_input(&ctx, file_name, NULL, NULL);
您可以从以下位置获取ffmpeg的最新版本:

ffmpegdir/include/libavcodec/
ffmpegdir/include/libavformat/
etc.
公共头文件可以在开发版本中找到(http://ffmpeg.zeranoe.com/builds/win32/dev/)

UPD: 下面是一个工作示例(无其他静态链接)

#包括“stdafx.h”
#包括
#包括
typedef int(uuuu cdecl*uuu avformat\u open\u输入)(AVFormatContext**,const char*,AVInputFormat*,AVDictionary**);
类型定义无效(uuu cdecl*uuu av_uregister_uall)(无效);
int _tmain(int argc,_TCHAR*argv[]
{
const char*ffp=“f:\\Projects\\Temp\\testFFMPEG\\Debug\\avformat-54.dll”;
HINSTANCE hinstLib=载荷库A(ffp);
__avformat_open_input_uuavformat_open_input_proc=(uu avformat_open_input)GetProcAddress(hinstLib,“avformat_open_input”);
__av_register_all uu av_register_all_proc=(uu av_register_all)GetProcAddress(hinstLib,“av_register_all”);
__av_寄存器_all_proc();
::AVFormatContext*ctx=NULL;
int err=\uu avformat\u open\u input\u proc(&ctx,“g:\\Media\\The喷嚏的熊猫宝宝.flv”,NULL,NULL);
返回0;
}

谢谢。到目前为止,对于
avformat\u open\u input
,我得到了一个
未解析的外部符号
错误。您的代码是否也包含
lib
文件?因为我试图完全使用共享构建的ffmpeg DLL来完成任务(我也不介意知道如何使用开发构建。在尝试使用开发构建时,我遇到了一些错误),所以通常使用静态库(ffmpeg\lib\libavformat.DLL.a)来访问动态运行时库。如果由于某种原因不可能,请尝试使用“GetProcAddress(hInstLibrary,“avformat\u open\u input”)”函数,如图所示,我得到的未解决外部符号错误位于我使用GetProcAddress的行中。我正在使用从下载的inttypes.h文件,因为common.h需要它。即使包括LIB,我也会得到以下
Error 1 Error LNK2019:未解析的外部符号“void”\uu cdecl av\u register\u all(void)”(?av\u register\u all@@YAXXZ)在函数\u main F:\Projects\VisualStudio\ffmpegTestProgram\ffmpegTestProgram\main.obj中引用过您的程序(删除
stdafx
,将
\u TCHAR
转换为
char
并将
\u tmain
转换为
main
)后,它成功构建。非常感谢!:)我只希望能够使用API将rgb值转换为char数组,这是我最初想要的。使用开发版本的相关页面:。相信我,使用此链接中的答案编写程序要比使用下面的答案容易得多,因为下面的答案需要加载DLL函数并将其用作functionname\u proc