关于TcpMp在指定窗口播放的问题

lishiqi_ 2012-07-12 12:17:35
各位好,求各位看个问题吧:
我建立了一个dlg 用来播放TcpMp

代码如下
初始化dlg:
BOOL ClsqTcpmpDlg::OnInitDialog()
{
CDialog::OnInitDialog();
AfxMessageBox(_T("11!"));
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
AfxMessageBox(_T("22!"));
CenterWindow(GetDesktopWindow()); // center to the hpc screen
AfxMessageBox(_T("33!"));
// TODO: Add extra initialization here
g_pPlayerWnd = this;

AfxMessageBox(_T("444 !"));

InitTcpmp();
AfxMessageBox(_T("55!"));

return TRUE; // return TRUE unless you set the focus to a control
}


播放初始化:
rect DefaultRect = {0,0,320,240};//播放电影窗口区域
wchar_t URL[] = _T("\\USB Disk\\11.avi");//播放文件的路径

//初始化TCPMP
BOOL ClsqTcpmpDlg::InitTcpmp()
{
//初始化
if(Context_Init(_T("TCPMP"),_T("0.72RC1"),3,(wchar_t*)AfxGetApp()->m_lpCmdLine,NULL))//
{
AfxMessageBox(_T("66 !"));
context* pContext=Context();//获得上下文

if(pContext)
m_Player=(player*)(pContext->Player);
else
return false;


Context_Wnd(this->GetSafeHwnd());//播放窗口关联

//设置通知处理函数
Notify.Func = (notifyfunc)PlayerNotify;
Notify.This = (void*)m_Player;

if(m_Player)
m_Player->Set(m_Player,PLAYER_NOTIFY,¬ify,sizeof(Notify));

AfxMessageBox(_T("77 !"));
int i = 0;
m_Player->Set(m_Player,PLAYER_LIST_COUNT,&i,sizeof(int));//播放列表清空

m_Player->Set(m_Player,PLAYER_LIST_URL+0,URL,sizeof(URL));
AfxMessageBox(_T("88 !"));
m_Player->Set(m_Player,PLAYER_SKIN_VIEWPORT,&DefaultRect,sizeof(rect));//设置播放电影窗口区域
AfxMessageBox(_T("99 !"));

int index = 0;
m_Player->Set(m_Player,PLAYER_LIST_CURRIDX,&index,sizeof(index));//设置播放列表里的某个文件为当前播放文件
AfxMessageBox(_T("aa !"));
m_Player->Set(m_Player,PLAYER_PLAY,&m_bPlayOrPaulse,sizeof(BOOL));//开始播放
AfxMessageBox(_T("bb!"));
}
else
return false;

return true;

}



问题来了:
AfxMessageBox(_T("99 !"));
后会弹出“ERR_FFFFFFF3”
AfxMessageBox(_T("aa !"));
后会弹出“ERR_FFFFFFF3”

然后AfxMessageBox(_T("bb !"));

然后出现窗口,但是只是一个空窗口

我想知道那两个错误是怎么回事呢,是指针的问题么,但是源代码也是这么写的呢

百思不得其解啊




...全文
52 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kwanvin 2012-07-13
  • 打赏
  • 举报
回复
查一下这个错误码:ERR_FFFFFFF3
woshi_ziyu 2012-07-12
  • 打赏
  • 举报
回复
m_Player->Set(m_Player,PLAYER_LIST_CURRIDX,&index,sizeof(index));//设置播放列表里的某个文件为当前播放文件
AfxMessageBox(_T("aa !"));

报什么错误

19,502

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 嵌入开发(WinCE)
社区管理员
  • 嵌入开发(WinCE)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧