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

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

0 Members and 1 Guest are viewing this topic.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #60 on: September 15, 2011, 08:54:36 pm »
Any chance you can add cMake or Premake for us linux users?

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #61 on: September 15, 2011, 09:08:20 pm »
Actually, I was thinking of doing so (CMake).
But then I'm not too sure if there's any interested linux users.
Since you mention it, I'll work on it asap.
Thank you for your interest.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #62 on: September 16, 2011, 12:38:31 am »
CMake package available now.

I'm still (very) new to CMake (this is my first CMake script), so if there's any bugs or if you're having problems getting it to work, please let me know.

Also, if you're using the CMake package (rather than those built with Visual C++), you'll have to link libtheoraplayer to your project.

Download it here (also available on the 1st page):
http://ftp://ftp.drivehq.com/zorexxlkl/downloads/SFMLTheora-1.3.1-CMake.zip

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #63 on: September 16, 2011, 12:45:44 am »
got this

Code: [Select]
Scanning dependencies of target SFMLTheora
[ 50%] Building CXX object CMakeFiles/SFMLTheora.dir/src/SFMLTheora/AudioInterface.cpp.o
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/AudioInterface.cpp:32:39: fatal error: SFMLTheora/AudioInterface.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/SFMLTheora.dir/src/SFMLTheora/AudioInterface.cpp.o] Error 1
make[1]: *** [CMakeFiles/SFMLTheora.dir/all] Error 2
make: *** [all] Error 2

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #64 on: September 16, 2011, 06:04:31 am »
Sorry, I think I left out a line.
I've updated it now, please re-download and see if it works.

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #65 on: September 16, 2011, 01:44:58 pm »
Code: [Select]
Scanning dependencies of target SFMLTheora
[ 50%] Building CXX object CMakeFiles/SFMLTheora.dir/src/SFMLTheora/AudioInterface.cpp.o
In file included from /home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/AudioInterface.cpp:32:0:
/home/richy/libs/SFMLTheora-CMake/include/SFMLTheora/AudioInterface.h:38:47: fatal error: theoraplayer/TheoraAudioInterface.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/SFMLTheora.dir/src/SFMLTheora/AudioInterface.cpp.o] Error 1
make[1]: *** [CMakeFiles/SFMLTheora.dir/all] Error 2
make: *** [all] Error 2


Using the link on the OP

Richy19

  • Full Member
  • ***
  • Posts: 190
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #66 on: September 16, 2011, 03:32:19 pm »
Figured out LibTheoraPlayer is a completelly diferent thing to libTheora so installed the right one.

But now I get:
Code: [Select]

make
[ 50%] Building CXX object CMakeFiles/SFMLTheora.dir/src/SFMLTheora/Video.cpp.o
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp: In constructor ‘SFMLTheora::MemoryLoader::MemoryLoader(const string&, const void*, long unsigned int)’:
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp:53:24: error: ‘memset’ was not declared in this scope
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp:54:27: error: ‘memcpy’ was not declared in this scope
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp: In member function ‘void SFMLTheora::MemoryLoader::Set(const string&, const void*, long unsigned int)’:
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp:86:24: error: ‘memset’ was not declared in this scope
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp:87:27: error: ‘memcpy’ was not declared in this scope
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp: In member function ‘virtual int SFMLTheora::MemoryLoader::read(void*, int)’:
/home/richy/libs/SFMLTheora-CMake/src/SFMLTheora/Video.cpp:98:59: error: ‘memcpy’ was not declared in this scope
make[2]: *** [CMakeFiles/SFMLTheora.dir/src/SFMLTheora/Video.cpp.o] Error 1
make[1]: *** [CMakeFiles/SFMLTheora.dir/all] Error 2
make: *** [all] Error 2

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #67 on: September 16, 2011, 08:18:08 pm »
I found that in GCC we have to include <cstring>, try this:
http://ftp://ftp.drivehq.com/zorexxlkl/downloads/SFMLTheora-1.3.2-CMake.zip

greeniekin

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #68 on: September 27, 2011, 08:04:43 am »
I tried to use cmake to build for mingw. Though in the cmake gui i was expecting it to ask for the location of libtheoraplayer, but it didn't. So what are the steps to compile this?

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #69 on: September 27, 2011, 09:35:31 am »
It is a static library and does not need to link with libtheoraplayer during compile.

You only need to link with libtheoraplayer in your project, which means you have to link with both SFMLTheora and libtheoraplayer when you compile your project.

greeniekin

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #70 on: September 27, 2011, 11:07:58 am »
Quote from: "zorexx"
It is a static library and does not need to link with libtheoraplayer during compile.

You only need to link with libtheoraplayer in your project, which means you have to link with both SFMLTheora and libtheoraplayer when you compile your project.

Yes but to compile it as a static library it needs the headers for libtheoraplayer. I ended up just copying from the include directory into your include just to compile.
Though it was a bit weird i think i need to use libtheoraplayer trunk rather than rc2 as it doesn't seem to have been structured like this
includes/libtheoraplayer/*.h
in rc2 it is
includes/*.h

Anyway still have to test it. but i have something to static link to now.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #71 on: September 28, 2011, 03:45:37 am »
About the headers, the structure is:
include/theoraplayer/*.h

You'll have to add libtheoraplayer include and lib directories to your search path, for example, for Code::Blocks (source: http://www.allegro.cc/forums/thread/600860):
Settings -> Compiler & Debugger Settings -> Search Directories

I compiled libtheoraplayer from svn and uploaded it to my blog, but I've only compiled for MSVC++ 2010, so you'll have to compile it yourself if you're using other compilers. You can check the directory structure from there if you need, though.
http://www.zorexxlkl.com/p/other-downloads.html

greeniekin

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #72 on: September 28, 2011, 03:44:26 pm »
I have successfully compiled it with mingw.

I did try using cmake to generate a codeblocks version. Though cmake had errors and couldn't generate the codeblocks version. So i selected mingw make instead. There must be a missing piece of information needed by cmake.

cmake generate fine from SFML2 for codeblocks.

zorexx

  • Full Member
  • ***
  • Posts: 109
    • View Profile
    • zorexx@site
SFMLTheora 1.3 - Play videos in SFML
« Reply #73 on: September 28, 2011, 05:55:38 pm »
May I know what generator are you using?
I tried using "CodeBlocks - MinGW Makefiles" and it generates fine for me.

Can you paste the errors here?

greeniekin

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
SFMLTheora 1.3 - Play videos in SFML
« Reply #74 on: September 29, 2011, 07:45:26 am »
It seems to work now. I had left my computer on for a month straight and some strange things were happening i reset recently. So maybe it is related to that.

Also a quick question about libtheoraplayer. I found binaries for msvc_9 though I couldn't see any available with mingw. Have you ever compiled it with MingW. It seems they use codelite. Though when i try load the work space with codelite an error occurs with the project and it is removed for the workspace. Leaving nothing in the workspace to compile.

Not your problem obviously. I just wondered if you might know anyway.

 

anything