Evan changing the memcpy for a loop the image is messed...
Code: Select all
for (int i = 0; i < width*height; i++)
_p[i] = _pimage[i];
For now, the only way the image is OK here is creating the texture every frame...
Code: Select all
for (int i = 0; i < width*height; i++)
_p[i] = _pimage[i];
Code: Select all
videoPlayer = new murmuurVIDEO(irrVideo, device->getTimer(), 1024, 768, videoOutput);
Every time I tried to create the murmuurVIDEO with bigger desiredW and desiredH than my original video height and width, this error happens...Unhandled exception at 0x066d6570 in FFMpeg2.exe: 0xC0000005: Access violation.
Code: Select all
videoPlayer = new murmuurVIDEO(irrVideo, device->getTimer(), 350, 240, videoOutput);
Code: Select all
videoPlayer = new murmuurVIDEO(irrVideo, device->getTimer(), 256, 128, videoOutput);
is this the only type that should be replaced me wonders???randomMesh wrote:Maybe sizeof(irr::s32) is not 4 on your system. It would be best to replace all occurrences of irr::s32 by uint32_t anyway.PauloPina wrote:Using memcpy the picture is aways messed...
hmm, i dont see this one, dont get a crash whichever size i set the output toPauloPina wrote: 1- sws_scale() only works if my Video size is bigger than the "new murmuurVIDEO" size values. If width or height of the video is smaller than the width / height values supplied during criation, the program drops Access Violation.
this is the original problem, i have solved this partially by settingPauloPina wrote: 2- The video still playing slowly... Appear that some frames are droped... The audio works perfecly, but the video is not smooth...
One more time, Apologize me for the prior problem... but I will be happy if anyone can help me with those 2 other problems...
Code: Select all
videoPlayer->setVideoSpeed(900);
Code: Select all
if (videoPlayer->psVideostate == Playing) { // play active
if (!videoPlayer->refresh()) { // no more AV
videoPlayer->goToFrame(0);
/*
if (videoPlayer->bVideoLoaded) {
videoPlayer->close();
delete videoPlayer;
videoPlayer = new murmuurVIDEO( device->getVideoDriver(), device->getTimer(), VideoWidth, VideoHeight);
videoPlayer->open("..\\..\\movie\\1.avi",0);
}
*/
} else { // still playing so draw the next frame
videoPlayer->drawVideoTexture();
}
}