PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Problem opening video files

clintsinger · 18 Jan 2007, 00:59 UTC
Hi,

After giving up on trying to get GledPlay to work on my Windows CE 5.0 board I thought I would try it out on my Dell x51v. The sample worked fine until I wanted to try out the video class. More specifically all my calls to the "open" method return ReturnCode::ERROR_OPENING_VIDEO regardless of what kind of video I have tried, including ogg/theora created using ffmpeg2theora using the default settings as well as those suggested in the gledplay video documenation. I have also tried mpeg 2 files but I get the same result.

Any suggestions?

Cheers,
Clint
Hi,

Is it working on Windows?
Can you send us a (small) copy of the video?
Can you publish a piece of the source code?

Thank you,
Sergio.
clintsinger · 18 Jan 2007, 22:49 UTC
Hi,

I tried opening the file using the desktop version and while it opens fine, all I get is a pink surface blitted to the screen. I will see what I can do about sending the file. The code is pretty simple in that it is just the multistate application with the following changes.

Code:

HRESULT MainEventHandler::onInit(Surface* pBackBuffer, Panel* panel, Application* application)
{
//Save the pointer to the application, to acces shared components.
this->application = (InitialApplication *) application;

frame = 0;

int nRet = video.open(TEXT("macreddin_sample_wmv.ogg"));
if (nRet != ReturnCode::OK)
{
return ReturnCode::ERROR_OPENING_VIDEO;
}

return ReturnCode::OK;
}

HRESULT MainEventHandler::onNextFrame(Surface* pBackBuffer, Panel* mainPanel)
{
HRESULT hr = video.getNextFrame(&videosurface;);
switch(hr)
{
case ReturnCode::OK:
// Blit the image to the screen
pBackBuffer->bltFast(0, 0, &videosurface;);
frame++;
break;
case ReturnCode::END_OF_VIDEO:
// Video is over
break;
default:
break;
}

return ReturnCode::OK;
}


On another note, the xp build of the application has an extremely annoying behaviour where it minimizes the screen when it loses focus.
I'm sorry, but I'm really going to need an example video. Could you send it (up to 10Mb) to

sergio (at) gledplay.com

I'm really sorry for all this inconveniences.

Best regards,
Sergio.