45fan.com - 路饭网

搜索: 您的位置主页 > 电脑频道 > 电脑教程 > 阅读资讯:如何使用real producer sdk和windows media sdk开发程序?

如何使用real producer sdk和windows media sdk开发程序?

2016-08-26 17:18:12 来源:www.45fan.com 【

如何使用real producer sdk和windows media sdk开发程序?

第一步就是设置的问题了,只有正确的设置了系统,才能进行调试开发,下面试我自己摸索出来的一点点经验。

主要是Real SDK的问题。以下的选项都是指VC中的菜单。
● 首先,对于头文件的问题
stdafx.cpp:
#define INITGUID(否则出现IDD_…为定义错误)
#include "pntypes.h"(必须包含在windows的.h文件之前)
#include "stdafx.h"
XXXview.cpp:(必须是使用函数的文件,否则出现重复调用)
#include "StdAfx.h"
#include "pnwintyp.h"
#include "pnresult.h"
#include "pncom.h"
#include "rmaenum.h"
#include "engtypes.h"
#include "engtargs.h"
#include "engcodec.h"
#include "rmbldeng.h"
#include "rmmetain.h"
#include "rmapckts.h"
#include "progsink.h"
● 在Tools――options――Directories里加上头文件和lib文件的目录(设置路径)
● 在Project――Setting――Debug――Working Directory 里写上Real DLL所在目录
● 在Project――Setting――Link――Object/Library modules里写上Real SDK的lib文件
● 在Project――Setting――Link――Object/Library modules里写上 enceng.lib rmtools.lib Vfw32.lib wmstub.lib WMVCORE.lib Msvcrtd.lib
● 如果Real SDK和Windows Media SDK一起使用的话,在包含#define INITGUID的情况下,会和MFC的文件冲突,解决方法是去掉这个定义,但去掉之后,那些IDD就无法使用,带来极大不便,解决方法只能自己手动在程序中定义,目前只能用这个方法来解决。

呵呵,兴趣来了,也贴一个。同样,可以这样操作,也许更科学。
见笑了,已经n久没有摸sdk了,所以感触不那么建设性了。不过,也算一说罢,可以一试。

1.在自定义headers.h文件中将所有可能用到的real头文件聚会,以后在具体调用real头文件的cpp的h文件中就可以只引用一个文件--headers.h了。这样显然便于管理。比如播放主程序PlayerDlg.h中#include "Headers.h",进度条控制RmEdit.h中:#include "Headers.h"。但是要注意,众多real.h文件的排列顺序有一定的要求,具体情况需要具体分析了。
以下是可执行的h文件排列。headers.h
#ifndef __MYHEADERS_H__
#define __MYHEADERS_H__

//the followed headers are used for player
#include "Include/pnwintyp.h"
#include "Include/pncom.h"
#include "Include/rmapckts.h"
#include "Include/rmacomm.h"
#include "Include/rmafiles.h"
#include "Include/rmaengin.h"
#include "Include/rmacore.h"
#include "Include/rmaclsnk.h"
#include "Include/rmaerror.h"
#include "Include/rmaauth.h"
#include "Include/rmawin.h"
#include "Include/rmasite2.h"
#include "Include/rmavsurf.h"

#include "Include/os.h"

#include
//the follow header files are used by rmedit
#include "include/pnresult.h"
#include "include/rmaflsnk.h"
#include "include/rmaedit.h"

#include "include/rmaedit2.h"
#include "include/rmafdump.h"
#include "include/rmmetain.h"
#include "include/setdllac.h"

#include "Defines.h"
#endif

2. 关于#define INITGUID和#include
我没有同时使用Real SDK和Windows Media SDK,但确实我用到了MFC。没有引起“和MFC的文件冲突”。
具体操作是,添加一个cpp到工程里边,仅仅添加就能解决,呵呵,说实话,我也不知道为什么。(如果哪位仁兄知道能解释,望帖子告知,谢过了先)
我用到的cpp文件为guids.cpp,其完全内容如下:
/****************************************************************************
*
* $Id: guids.cpp,v 1.5 1999/03/17 18:20:25 lyoung Exp $
*
* Copyright ?998 RealNetworks.
* All rights reserved.
*
* http://www.real.com/devzone
*
* This program contains proprietary information of RealNetworks, Inc.,
* and is licensed subject to restrictions on use and distribution.
*
* Definition of RMA IIDs for this DLL
*
*/

// define all guids here once...
#include "stdafx.h"

#define INITGUID
#include

#include "Include/pnwintyp.h"
#include "Include/pncom.h"
#include "Include/rmapckts.h"
#include "Include/rmacomm.h"
#include "Include/rmafiles.h"
#include "Include/rmaengin.h"
#include "Include/rmacore.h"
//#include "Include/rmaclsnk.h"
#include "Include/rmaerror.h"
#include "Include/rmaauth.h"
#include "Include/rmawin.h"
#include "Include/rmamon.h"
#include "Include/rmasite2.h"
//#include "Include/rmavsurf.h"

//the following are used by rmedit
//#include "Include/rmaflsnk.h"
#include "Include/rmaedit.h"
#include "Include/rmaedit2.h"
//#include "Include/rmafcopy.h"
#include "Include/rmafdump.h"
#include "Include/rmaiids.h"
//#include // MFC Automation classes
//#include // MFC support for Internet Explorer 4 Common Controls


本文地址:http://www.45fan.com/dnjc/68052.html
Tags: SDK Real producer
编辑:路饭网
关于我们 | 联系我们 | 友情链接 | 网站地图 | Sitemap | App | 返回顶部