您当前的位置: 首页 > 

令狐掌门

暂无认证

  • 2浏览

    0关注

    513博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

VS2013编译vlc源码

令狐掌门 发布时间:2019-12-07 02:03:49 ,浏览量:2

        VLC 是一款自由、开源的跨平台多媒体播放器及框架,可播放大多数多媒体文件,以及 DVD、音频 CD、VCD 及各类流媒体协议。界面用Qt实现的,对Qt VLC开发感细兴趣可以了解一下。

        官网地址:http://www.videolan.org/

        源码是linux下开发的,但是已经有人把它修改到VS下,github上有链接:  https://github.com/sunqueen?tab=repositories

        我下载的是下面的版本

        该版本需要用VS2013 update4编译,下载安装后,打开最后的解决方案winvlc.sln,等待程序加载完毕。

       该版本的解决方案下一共313个项目,直接全部编译即可,如果是VS2013 update4版本编译,不会有任何报错。例如,我的编译运行结果:

      winvlc模块是程序启动项,main函数如下:

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
                    LPSTR lpCmdLine,
                    int nCmdShow )
{
    int argc;

    /* VLC does not change the thread locale, so gettext/libintil will use the
     * user default locale as reference. */
    /* gettext versions 0.18-0.18.1 will use the Windows Vista locale name
     * if the GETTEXT_MUI environment variable is set. If not set or if running
     * on Windows 2000/XP/2003 an hard-coded language ID list is used. This
     * putenv() call may become redundant with later versions of gettext. */
    putenv("GETTEXT_MUI=1");
#ifdef TOP_BUILDDIR
    putenv("VLC_PLUGIN_PATH=Z:"TOP_BUILDDIR"/modules");
    putenv("VLC_DATA_PATH=Z:"TOP_SRCDIR"/share");
#endif

    SetErrorMode(SEM_FAILCRITICALERRORS);
    HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);

    /* SetProcessDEPPolicy */
    HINSTANCE h_Kernel32 = LoadLibraryW(L"kernel32.dll");
    if(h_Kernel32)
    {
        BOOL (WINAPI * mySetProcessDEPPolicy)( DWORD dwFlags);
        BOOL (WINAPI * mySetDllDirectoryA)(const char* lpPathName);
# define PROCESS_DEP_ENABLE 1

        mySetProcessDEPPolicy = (BOOL (WINAPI *)(DWORD))			// sunqueen modify
                            GetProcAddress(h_Kernel32, "SetProcessDEPPolicy");

    。。。。。。
    。。。。。。
}

          vlc播放器界面用的Qt, 以插件的形式实现了很多功能,我们可以自由修改。

          vlc模块学习官方文档 http://www.videolan.org/developers/vlc/doc/doxygen/html/modules.html

          vlc sdk下载:http://download.videolan.org/pub/videolan/vlc/

关注
打赏
1652240117
查看更多评论
立即登录/注册

微信扫码登录

0.0762s