Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Pages: 1 2 3 [4]

Author Topic: SourceForge project  (Read 12661 times)

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #45 on: April 11, 2009, 12:45:10 AM »

Ah this is nice :)
I finally got the FFMpegCodec working with audio. I tested out a FLAC file and it works great.
As soon as I get it cleaned up and figure out where the slight stuttering is coming from (might just be linux), I'll commit it to svn along with WavCodec.

Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: SourceForge project
« Reply #46 on: April 11, 2009, 06:43:07 AM »

Hmm, stuttering might be decoding issue, timing issue, threading issue, or playback issue (buffering issue: underflow). Hard to say.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #47 on: April 11, 2009, 10:49:49 AM »

Well the difficult thing is that it is very slight, like every 45 seconds or so, just for a split second. I'll see if WavCodec has the same problem.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #48 on: April 11, 2009, 11:25:37 PM »

I've committed FFMpegCodec, WavCodec, Codec, AudioClip, AudioManager, RingBuffer, and an updated WGETest to svn.
It now requires boost::date_time and boost::thread in addition to boost::python. Also FFMpeg would be good too. ;)
It needs a test file for FFMpegCodec (I didn't have anything that I could distribute) in wge/build/WGETest/Media/. The demo is set right now to use "test.mkv", but you can just set it to anything audio or video that has audio.

I never found the source of the stuttering, though I can rarely reproduce it. I'll give it a try on some other computers when I get a chance.
If you end up testing this, let me know how the threads behave as I'm on a quad core.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #49 on: April 13, 2009, 09:15:55 PM »

I've started on the video decoding now. I'm thinking of having both audio and video decoding reside in the same codec because they are pretty tied together (unlike with the ogg container format, where it makes sense to split up the decoders used). I'll have either a separate function or a flag that determines whether to decode video, audio, or both (Probably a flag with a pointer to a material that can be null).

I'm going to add the Ogg decoders back in as well as some compile-time flags (#defines) to disable the usage of FFMpeg and the Ogg codecs.

I'll add back the AvManager soon to provide the high-level interface for accessing audio and video (right now I'm accessing the codecs directly).

Do you have any suggestions with regards to the api?

Heh we certainly have support for a wide variety of media. ;D
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #50 on: April 14, 2009, 08:33:25 AM »

Cool I've got it decoding to an Ogre texture.
Just some cleanup and timing now. :)

Btw, just if ya remember off the top of your head, If I have an Ogre::Plane what would I set in a material to have the texture stretch across the entire plane?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: SourceForge project
« Reply #51 on: April 14, 2009, 10:44:35 AM »

That's pretty sweet! You can look at the theora texture setup code to see what it does. I don't recall off the top of my head.. Only object UV's matter as I think textures also have some type of scaling factor.

Also, we should probably only support power of two texture dimensions and movie dimensions.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #52 on: April 16, 2009, 07:33:55 PM »

I can understand power-of-two for the textures, for performance and because non power-of-two textures have problems on some cards, but why only power-of-two movie dimensions? I think that I can take a non-power-of-two movie and stick it into a power-of-two texture.

I've got it rendering to a ManualObject that always stays in front of the camera, and I was thinking of turning that into a utility class to make it easy to do for cut-scenes and such.
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #53 on: April 20, 2009, 07:49:51 PM »

Once I have synchronization working, what do you think about using the RingBuffer class to store the queue of packets FFMpeg sends, so it will be lockless?

Sorry for the delay on all of this, but I'm getting really close to the end of school, so it is getting hectic. Should return to normal soon enough. :D
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: SourceForge project
« Reply #54 on: April 21, 2009, 07:40:20 PM »

Heh, no complaints, we are all busy. Plus, it's not like we have any schedule :D I'm trying to pick back up a little OIS dev right now (going to finally try to get joys working on OSX).

A utility class for cutscenes would be cool. As for ring buffers for packets, might be a good idea. Though, it might also be able to use a fixed size vector if we know how many we want to queue. It is of course a tradeoff between performance, clarity, and memory. Might be better to store uncompressed bitmaps instead of packets.

Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #55 on: May 26, 2009, 12:31:59 PM »

Ah finally summer time :), just graduated on Friday so time to start back up.
I'm gonna write the synchronization stuff, add a ring buffer for the decoded video, some cleanup, and as far as I can remember we should be good.
Any suggestions / wanted features after this?
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: SourceForge project
« Reply #56 on: May 27, 2009, 04:19:22 PM »

Nice, cool that you're on summer break (I sure miss those! :) ).
Logged

mysterycoder

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 447
    • View Profile
Re: SourceForge project
« Reply #57 on: June 14, 2009, 02:15:01 PM »

Ahhhh! I deleted the video-supporting FFMpegCodec in a horrible partitioning accident!   :'(
Oh well, a second go around will only make it cleaner.  :-[
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2653
    • View Profile
    • http://www.wreckedgames.com
Re: SourceForge project
« Reply #58 on: June 23, 2009, 05:05:18 PM »

I've been on a bit of vacation as of late. Sucks that the file got deleted, partitioning is always dangerous ;)
Logged
Pages: 1 2 3 [4]