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

Author Topic: sfTheora 1.4 - Play videos in SFML  (Read 49338 times)

0 Members and 1 Guest are viewing this topic.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #30 on: April 16, 2011, 11:43:53 am »
Can you try it with the SFMLTheora 1.0.1 which is still available from the previous thread and see if it still works with the old one?

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #31 on: April 16, 2011, 12:03:14 pm »
1.0.1 works perfect. Tbh I think I will stickwith it since I dont really need pause functionality. But if the newest one will get fixed that would be awesome.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #32 on: April 16, 2011, 12:58:25 pm »
Alright, I'll try to fix it meanwhile. Going to take a look at 1.0.1 again and see if I can find anything that might be the cause. ;)

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #33 on: April 16, 2011, 01:35:34 pm »
Can you try this:
http://hotfile.com/dl/114624944/0818ce1/SFMLTheoraTesting.zip.html

I removed the Play, Pause, and Stop which are inherited from sf::SoundStream.

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #34 on: April 16, 2011, 03:28:26 pm »
That stutters as well.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #35 on: April 16, 2011, 04:13:53 pm »
Can you try commenting out everything in the OnSeek function and see if it still stutters?

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #36 on: April 16, 2011, 04:28:52 pm »
Yes that fixed it awesome  :D
Hooray!

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #37 on: April 16, 2011, 05:05:19 pm »
Awesome, I'll update the code and upload it as 1.2.4.
Thanks for helping me to fix this bug.  :D

Edit: Uploaded as 1.2.4.

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #38 on: April 17, 2011, 11:42:02 am »
Lol now there is another problem.
Memory leak is caused when allocating a video

{314425} normal block at 0x0C6DD638, 32 bytes long.
 Data: <./data/video/log> 2E 2F 64 61 74 61 2F 76 69 64 65 6F 2F 6C 6F 67
{314424} normal block at 0x0C6DD5F0, 8 bytes long.
 Data: <  m     > E8 D4 6D 0C 00 00 00 00
{314421} normal block at 0x0C6DD4E0, 44 bytes long.
 Data: <`   x  X  m 8 m > 60 19 1C 00 78 F5 AF 58 F0 D5 6D 0C 38 D6 6D 0C

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #39 on: April 17, 2011, 12:24:36 pm »
>.<
How do you trigger that error? (When does it occur?)

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #40 on: April 17, 2011, 12:27:44 pm »
I tried commenting out my video and it no longer leaks.
As soon as I uncomment it, it produces those 2 leaks.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #41 on: April 17, 2011, 01:11:59 pm »
Wait, I just remembered something, there was a memory leak all the while, it's caused by the libtheoraplayer (in the TheoraVideoClip class), but since it didn't really cause any problems, I just left it as is.
All we can do now is to wait for the libtheoraplayer author to fix it (the libtheoraplayer project seems to be inactive for sometime already though, so I'm not sure if it'll ever be fixed).

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #42 on: April 17, 2011, 03:47:04 pm »
Do we have the source for it? Can we try fix it?

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #43 on: April 17, 2011, 03:55:16 pm »
Yes, the source is available from the libtheoraplayer svn, but I'd prefer to just leave it for now. You can try fixing it if you want to. :)

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #44 on: May 22, 2011, 12:11:26 pm »
As of the latest sfml2 svn, this library no longer works (white screen)
Also the onseek needs to be changed to unsigned int instead of float.

 

anything