Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SF Video Player  (Read 17103 times)

0 Members and 1 Guest are viewing this topic.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SF Video Player
« Reply #15 on: October 21, 2010, 03:35:44 am »
Try this, instead of void OnSeek(float timeOffset) {}
use:

Code: [Select]
void OnSeek(float timeOffset)
{
  seek(timeOffset);
}

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SF Video Player
« Reply #16 on: October 21, 2010, 03:27:53 pm »
Now it is not dropping frames :) , but still not displaying any images on the screen.

Do you know if there needs to be some updating to the code since I am using sfml2?

Edit: I did video->GetImage()->SaveToFile("testing.bmp"); halfway through the video and it saved a gorgeous image to the hardrive. I know it works now just not being drawn correctly in my app! help :(

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SF Video Player
« Reply #17 on: October 21, 2010, 04:32:18 pm »
try this, in the function SFMLTheora::Video::Update from Video.cpp:

replace
Code: [Select]
SetImage(currentFrame_);

with

Code: [Select]
SetImage(currentFrame_, true);

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SF Video Player
« Reply #18 on: October 21, 2010, 04:36:53 pm »
I actually already tried doing that, spent like half a day trying to fix this.
Still doesnt display any image on the screen. The screen actually goes black instead of showing images.

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SF Video Player
« Reply #19 on: October 21, 2010, 05:05:25 pm »
Ok I managed to get things to render on screen!  :P

I realised that I had

glEnable(GL_DEPTH_TEST);
glDepthMask(GL_TRUE);
glEnable(GL_BLEND);

somewhere way back in the beggining of my app and that causes things to mess up.

Now I have 2 more problems :(

-Audio sync issues
-How to stretch video to go fullscreen?
video->Resize(ClientWidth, ClientHeight); doesnt work

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SF Video Player
« Reply #20 on: October 21, 2010, 05:16:47 pm »
For fullscreen, you have to call resize after Update.

What's wrong with the audio sync? Can you explain in detail?

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SF Video Player
« Reply #21 on: October 21, 2010, 05:24:46 pm »
You are amazing! I put resize after update and it works now! and has no audio sync issues. Before the audio was delayed a second behind the picture.

Amazing library saved me so much time

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SF Video Player
« Reply #22 on: October 21, 2010, 05:41:15 pm »
Haha, I didn't expect the audio sync to be fixed by that though, I don't use sfml2 so I can't test it out, thanks for using it and helping others to get it to work on sfml2 as well, glad you like it. I'll upload the fixed SFMLTheora that works with sfml2(just added the OnSeek function).

http://www.megaupload.com/?d=HLKIEAMP

 

anything