Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: [1] 2

Author Topic: Whats this ?  (Read 5961 times)

Anonymous

  • Guest
Whats this ?
« on: December 07, 2005, 09:48:39 AM »

I keep getting this after including the theora headers. I'm not defining anything so what is this ?

Quote
Macro defintion of max detected - undefining
Macro defintion of min detected - undefining
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Whats this ?
« Reply #1 on: December 07, 2005, 09:50:58 AM »

What do you mean after including the theora headers? Are you talking about the headers to the Ogre plugin? or theora itself? Did you build the plugin and demo?

This sounds like a problem of Windows.h. It uses #define min and #define max which conflicts with the std::min and std::max.
Logged

M&M

  • Regular
  • *
  • Karma: +0/-0
  • Posts: 30
    • View Profile
    • http://www.blueprintgames.com
Whats this ?
« Reply #2 on: December 07, 2005, 10:12:05 AM »

oh sorry, I should've been more clearer. I've built the plugin successfully and added it to my project's dependancies. I included those TheoraVideoController.h TheoraMovieClip.h to write my own MovieLogic implementation.

When I try to compile I get those 2 warnings.


Also, I got a couple of other questions,
1st, does this plugin support playing multiple videos ? or just one at a time ?
2nd, why doesn't it store information like pause state, max time....etc in the TheoraClip itself, and instead leaves it up to the MovieLogic implementation.
Logged
url=http://www.blueprintgames.com/][/url]

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Whats this ?
« Reply #3 on: December 07, 2005, 10:25:39 AM »

Are those errors or warnings? If errors, just #undef min and #undef max before including the theora header stuff.. Really, windows.h should not be using defines.. it really makes things nasty for us programmers :)

1) The plugin can handle more than one movie at a time - within reason, theora itself is not optimised very much, so you may bog down the CPU for multiple high quality playbacks - experiementaion for the proper settings is needed. Also, for some reason, playing the same video file twice at the same time (which is opeing two reading streams is really really slow - not sure why ifstream does that :/, tests have shown using regular FILE and fread is much quicker ), so as long as that is not the case - ie. playing different videos - you should be fine.

2) Well, I thought I added a method to get pause state from the clip :? .. As for why the max time is not a regular part of the clip class... well, the reason is that the only way to know the max time is to seek to the end of the file first, then seek back - which is done only when seeking is enabled. It is also done within the decoding thread - so you do not notice a slow down - and is passed to you via the message class so you do not need mutex's. So, the majority of the time the max length is not known (seeking is off by default - and is experimental), so I do not provide a method to get it.
Logged

M&M

  • Regular
  • *
  • Karma: +0/-0
  • Posts: 30
    • View Profile
    • http://www.blueprintgames.com
Whats this ?
« Reply #4 on: December 07, 2005, 05:03:27 PM »

they're warnings, actually they aren't reported as warnings but they appear while compiling, and I don't like that. As for Windows.h, it shouldn't be using alot of things :P.
Also, there was some problem with not #including Winsock in ptypes when you check for win32. That caused an error here, although I fixed it with an #ifdef #endif statement, you might want to have a look at it.

about pausing, I looked everywhere inside the theora plugin code, there doesn't seem to be any variables to store the pause state of the movie, unless you consider TextureEffectPause as one.

about maxTime, what about audio, can't you get it from there ? the ffmeg2theora managed to get the time as well, i doubt it used seeking (although i didn't look), isn't there some other way for it ?

one last thing, you only seem to have Movie messages for stream(s) done, what about paused or stopped ? do those trigger done as well ?
Logged
url=http://www.blueprintgames.com/][/url]

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Whats this ?
« Reply #5 on: December 07, 2005, 05:31:39 PM »

Quote from: "M&M"
they're warnings, actually they aren't reported as warnings but they appear while compiling, and I don't like that. As for Windows.h, it shouldn't be using alot of things :P.
Also, there was some problem with not #including Winsock in ptypes when you check for win32. That caused an error here, although I fixed it with an #ifdef #endif statement, you might want to have a look at it.

Wierd, I have never seen any errors (or had any reported) for the included version of ptypes.. Though, one is free to update to the latest version of ptypes if needed (I have tested it on linux and it works - after applying a patch mentioned in the ptypes forum to fix compile errors there). I would update the Ptypes in cvs, however, I do not really want to as it works in most compiles, and ogreaddons is not really a place to store such a dependency.. I just included it to make it easy to build everything at once for windows users.

Quote

about pausing, I looked everywhere inside the theora plugin code, there doesn't seem to be any variables to store the pause state of the movie, unless you consider TextureEffectPause as one.

Isn't TheoraMovieClip::getPlayMode() what you are asking about?... Unless you are talking about something different?

Quote

about maxTime, what about audio, can't you get it from there ? the ffmeg2theora managed to get the time as well, i doubt it used seeking (although i didn't look), isn't there some other way for it ?

one last thing, you only seem to have Movie messages for stream(s) done, what about paused or stopped ? do those trigger done as well ?

Niether vorbis nor theora store the length of the stream in the initial headers... You have to (for disk streams that have an actual end) scan to the end of the file.. There are quick ways to do it then the way I do.. But I am also building a seek map in the process to make subsequent seeks faster.

And there are only three messages about the stream currently sent out.. Stream done, vorbis done, and theora done. There is also the discoveredMovie Time event.
Logged

M&M

  • Regular
  • *
  • Karma: +0/-0
  • Posts: 30
    • View Profile
    • http://www.blueprintgames.com
Whats this ?
« Reply #6 on: December 08, 2005, 05:53:07 AM »

does discoveredMovieTime indicate the max time or the time spent in playback ?

edit:
hey, I came across another problem. I have my plugins folder somewhere else other then the root directory (where the exe is). But i can't launch the exe unless I keep the Plugin_Theora....dll in the root directory, as well as the plugins folder.

When I try to launch without it I get an error similar to what would appear if I would remove OgreMain.dll for example.
Logged
url=http://www.blueprintgames.com/][/url]

manowar

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 14
    • View Profile
Whats this ?
« Reply #7 on: December 08, 2005, 05:59:57 AM »

@M&M

It is an Ogre problem, nothing linked with Theora plugin. Have you changed the Plugin folder path in  Plugins.cfg file ? Make sure you set the right one when you move files!

Eric
Logged

Anonymous

  • Guest
Whats this ?
« Reply #8 on: December 08, 2005, 10:10:22 AM »

The best place to look for answers is in the header files... Or run Doxgen against the headers/source as it is in doxy format comments... However:
Code: [Select]

/**
@remarks
This message is sent once the movie length is determined
@param discoveredTime
Movie duration in seconds
*/
virtual void discoveredMovieTime( float discoveredTime ) {}

It is the length of the entire clip.

As far as the place of the dll.. The problems lays in the fact that Plugin_TheoraVideo needs to be statically linked to your exe.. Which makes it immediately loaded when the exe is started up (prior to Ogre's dynamic loading stuff).. Hence, you would have to add the path where your plugins are to the system path too (and in plugins.cfg).
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Whats this ?
« Reply #9 on: December 08, 2005, 10:11:11 AM »

above post was mine.
Logged

M&M

  • Regular
  • *
  • Karma: +0/-0
  • Posts: 30
    • View Profile
    • http://www.blueprintgames.com
Whats this ?
« Reply #10 on: December 08, 2005, 11:52:01 AM »

Does this mean I have to build Plugin_TheoraVideoSystem both statically & dynamically ? use the dynamic in the plugin area and static in the root directory ?

Quote
Hence, you would have to add the path where your plugins are to the system path too (and in plugins.cfg).

I already did that. All my plugins are working fine from where they are
Logged
url=http://www.blueprintgames.com/][/url]

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Whats this ?
« Reply #11 on: December 08, 2005, 01:02:26 PM »

No, you do not build the plugin statically and dynamically. When I said statically linked, I meant using the import dll lib. There is a difference between loading a dll manually and having to get function addresses, and linking against the dll's import lib.

Once the plugin is listed in the plugins.cfg file, Ogre will load it up and init it - even after it has been loaded up by the exe during it's dll loading phase. You just have to make sure that the *system path* contains the directory where the plugins are.. not just the plugins.cfg, but both need to be set. Now, if you did that, and it still does not work, then I do not know.. Though, it is best to keep all you exe's and dll's in one directory anyway, as that is how it is typically done. On windows, you can place the exe's shortcut into a different directory (and on linux the setup is a little different in regards to where the shred libs are placed, but symbolic links can be used in place of shortcuts there too)
Logged

M&M

  • Regular
  • *
  • Karma: +0/-0
  • Posts: 30
    • View Profile
    • http://www.blueprintgames.com
Whats this ?
« Reply #12 on: December 09, 2005, 08:26:12 AM »

how exactly do I change the system path ? and wouldn't that mean all my dlls will be moved to a different folder ?

I just want to have all my plugins in a single area (subfolder of root), like with the ogre demos downloadable from the ogre page, not the ones with the source.
Logged
url=http://www.blueprintgames.com/][/url]

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Whats this ?
« Reply #13 on: December 09, 2005, 09:09:41 AM »

In control panel->system->advanced->Environment Variables->System Variables->Path then edit it to add your new location (semi colon delimited list) - you may need to restart to have settings take effect. No, you do not need to move any other dll's.. Just add the path that they are currently in, and place the theora plugin there.
Logged

M&M

  • Regular
  • *
  • Karma: +0/-0
  • Posts: 30
    • View Profile
    • http://www.blueprintgames.com
Whats this ?
« Reply #14 on: December 09, 2005, 12:19:36 PM »

yikes ! that doesn't look too nice. This is supposed to be a game project so we shouldn't have to do that for every user who is gonna try it now would we  :?
Logged
url=http://www.blueprintgames.com/][/url]
Pages: [1] 2