• 大小: 29.31MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-21
  • 语言: C/C++
  • 标签: MFC播放器  

资源简介

C++播放器 基于VLC,仅10多行代码的万能播放器。 注意要把代码中的音乐路径换成您本地的音乐路径哦~

资源截图

代码片段和文件信息

#include 
#include 

#include “vlc/vlc.h“
#pragma comment(lib “libvlc.lib“)
#pragma comment(lib “libvlccore.lib“)

int main(int argc char* argv[])
{
    libvlc_instance_t * inst;
    libvlc_media_player_t *mp;
    libvlc_media_t *m;

    inst = libvlc_new (0 NULL);        /* Load the VLC engine */    
    m = libvlc_media_new_path (inst “D:\\_SVNTest\\VLC Tutorial\\cppPlayer\\amani.wma“);  /* Create a new item */  // 请将此路径换成您本地的音乐路径 
    mp = libvlc_media_player_new_from_media (m);    /* Create a media player playing environement */     
    libvlc_media_release (m);           /* No need to keep the media now */

    // 播放文件
    libvlc_media_player_play (mp);      /* play the media_player */    
    Sleep (100 * 1000);                 /* Let it play a bit */

    libvlc_media_player_stop (mp);      /* Stop playing */    
    libvlc_media_player_release (mp);   /* Free the media_player */
    libvlc_release (inst);
    return 0;
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-10-13 22:22  cppPlayer\
     文件         883  2013-10-13 22:10  cppPlayer\cppPlayer.sln
     文件        3920  2013-10-13 22:10  cppPlayer\cppPlayer.vcproj
     目录           0  2013-10-13 22:21  cppPlayer\Debug\
     文件      113664  2013-10-13 22:12  cppPlayer\Debug\libvlc.dll
     文件     2341888  2013-10-13 22:11  cppPlayer\Debug\libvlccore.dll
     目录           0  2013-10-13 22:12  cppPlayer\Debug\plugins\
     目录           0  2013-10-13 22:11  cppPlayer\Debug\plugins\access\
     文件       35840  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_attachment_plugin.dll
     文件      100352  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_bd_plugin.dll
     文件       74240  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_ftp_plugin.dll
     文件      117248  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_http_plugin.dll
     文件       48128  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_imem_plugin.dll
     文件       73216  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_mms_plugin.dll
     文件       41984  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_rar_plugin.dll
     文件       96256  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_realrtsp_plugin.dll
     文件       39424  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_smb_plugin.dll
     文件       35840  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_tcp_plugin.dll
     文件       36352  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_udp_plugin.dll
     文件       76288  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libaccess_vdr_plugin.dll
     文件      162304  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libcdda_plugin.dll
     文件      246784  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libdshow_plugin.dll
     文件      215552  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libdtv_plugin.dll
     文件      258560  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libdvdnav_plugin.dll
     文件      182784  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libdvdread_plugin.dll
     文件       46592  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libfilesystem_plugin.dll
     文件       36864  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libidummy_plugin.dll
     文件     2029568  2013-10-13 22:11  cppPlayer\Debug\plugins\access\liblibbluray_plugin.dll
     文件      624640  2013-10-13 22:11  cppPlayer\Debug\plugins\access\liblive555_plugin.dll
     文件      433152  2013-10-13 22:11  cppPlayer\Debug\plugins\access\librtp_plugin.dll
     文件       43520  2013-10-13 22:11  cppPlayer\Debug\plugins\access\libscreen_plugin.dll
............此处省略392个文件信息

评论

共有 条评论

相关资源