• 大小: 4.35MB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2023-09-15
  • 语言: 其他
  • 标签: DirectShow  播放器  MFC  

资源简介

此程序包含了DirectShow开发的示例程序 有以下几个子程序: simplest_directshow_player: 最简单的基于DirectShow的视频播放器。 simplest_directshow_player_custom: 最简单的基于DirectShow的视频播放器(Custom)。 playerGUI: 最简单的基于DirectShow的播放器-图形界面版。 simplest_directshow_info: 最简单的Directshow信息。

资源截图

代码片段和文件信息

/**
 * 最简单的基于DirectShow的播放器-图形界面版
 * Simplest DirectShow Player GUI
 *
 * 雷霄骅 Lei Xiaohua
 * leixiaohua1020@126.com
 * 中国传媒大学/数字电视技术
 * Communication University of China / Digital TV Technology
 * http://blog.csdn.net/leixiaohua1020
 *
 * 本程序是一个最简单的基于DirectShow的图形界面播放器。
 * 适合初学者学习DirectShow。
 *
 * This example is the simplest Player based on DirectShow.
 * And it has a simple Graphical User Interface.
 * Suitable for the beginner of DirectShow.
 */

#include “stdafx.h“
#include “playerGUI.h“
#include “playerGUIDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CplayerGUIApp

BEGIN_MESSAGE_MAP(CplayerGUIApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()


// CplayerGUIApp 构造

CplayerGUIApp::CplayerGUIApp()
{
// 支持重新启动管理器
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

// TODO: 在此处添加构造代码,
// 将所有重要的初始化放置在 InitInstance 中
}


// 唯一的一个 CplayerGUIApp 对象

CplayerGUIApp theApp;


// CplayerGUIApp 初始化

BOOL CplayerGUIApp::InitInstance()
{
// 如果一个运行在 Windows XP 上的应用程序清单指定要
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
//则需要 InitCommonControlsEx()。否则,将无法创建窗口。
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// 将它设置为包括所有要在应用程序中使用的
// 公共控件类。
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();


AfxEnableControlContainer();

// 创建 shell 管理器,以防对话框包含
// 任何 shell 树视图控件或 shell 列表视图控件。
CShellManager *pShellManager = new CShellManager;

// 标准初始化
// 如果未使用这些功能并希望减小
// 最终可执行文件的大小,则应移除下列
// 不需要的特定初始化例程
// 更改用于存储设置的注册表项
// TODO: 应适当修改该字符串,
// 例如修改为公司或组织名
SetRegistryKey(_T(“应用程序向导生成的本地应用程序“));

CplayerGUIDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: 在此放置处理何时用
//  “确定”来关闭对话框的代码
}
else if (nResponse == IDCANCEL)
{
// TODO: 在此放置处理何时用
//  “取消”来关闭对话框的代码
}

// 删除上面创建的 shell 管理器。
if (pShellManager != NULL)
{
delete pShellManager;
}

// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
//  而不是启动应用程序的消息泵。
return FALSE;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件         46  2014-09-30 17:13  simplest_directshow_example\.gitignore

     文件         25  2014-06-05 19:32  simplest_directshow_example\playerGUI\.gitignore

     文件     832516  2015-01-02 00:24  simplest_directshow_example\playerGUI\playerGUI.aps

     文件       2512  2015-01-01 22:57  simplest_directshow_example\playerGUI\playerGUI.cpp

     文件        933  2015-01-01 22:57  simplest_directshow_example\playerGUI\playerGUI.h

     文件      18858  2015-01-02 00:24  simplest_directshow_example\playerGUI\playerGUI.rc

     文件       6171  2015-01-02 00:19  simplest_directshow_example\playerGUI\playerGUI.vcxproj

     文件       2090  2014-12-31 18:33  simplest_directshow_example\playerGUI\playerGUI.vcxproj.filters

     文件        143  2014-10-06 00:17  simplest_directshow_example\playerGUI\playerGUI.vcxproj.user

     文件      16395  2015-01-08 21:14  simplest_directshow_example\playerGUI\playerGUIDlg.cpp

     文件       2220  2015-01-01 22:57  simplest_directshow_example\playerGUI\playerGUIDlg.h

     文件        475  2015-01-01 23:32  simplest_directshow_example\playerGUI\ReadMe.txt

     文件      99678  2014-12-30 13:49  simplest_directshow_example\playerGUI\res\playerGUI.ico

     文件        674  2014-10-06 00:17  simplest_directshow_example\playerGUI\res\playerGUI.rc2

     文件     691254  2015-01-01 14:37  simplest_directshow_example\playerGUI\res\welcome.BMP

     文件       3772  2015-01-01 15:49  simplest_directshow_example\playerGUI\resource.h

     文件        142  2014-10-06 00:17  simplest_directshow_example\playerGUI\stdafx.cpp

     文件       1632  2014-10-06 00:17  simplest_directshow_example\playerGUI\stdafx.h

     文件        234  2014-10-06 00:17  simplest_directshow_example\playerGUI\targetver.h

     文件       1043  2015-01-02 00:01  simplest_directshow_example\ReadMe.txt

     文件       2977  2015-01-01 23:33  simplest_directshow_example\simplest_directshow_example.sln

    ..A..H.     46080  2015-01-08 21:17  simplest_directshow_example\simplest_directshow_example.suo

     文件         25  2014-06-05 19:32  simplest_directshow_example\simplest_directshow_filter\.gitignore

     文件       3990  2015-01-01 23:20  simplest_directshow_example\simplest_directshow_filter\simplest_directshow_filter.vcxproj

     文件        823  2015-01-01 23:20  simplest_directshow_example\simplest_directshow_filter\simplest_directshow_filter.vcxproj.filters

     文件        143  2015-01-01 23:20  simplest_directshow_example\simplest_directshow_filter\simplest_directshow_filter.vcxproj.user

     文件          0  2015-01-01 23:30  simplest_directshow_example\simplest_directshow_filter\unfinished.txt

     文件         25  2014-06-05 19:32  simplest_directshow_example\simplest_directshow_info\.gitignore

     文件        510  2015-01-01 23:32  simplest_directshow_example\simplest_directshow_info\ReadMe.txt

     文件       6448  2015-01-04 23:35  simplest_directshow_example\simplest_directshow_info\simplest_directshow_info.cpp

............此处省略43个文件信息

评论

共有 条评论