Request for Video Playback

Ideas for Game Editor evolution.

Request for Video Playback

Postby Hblade » Fri Jun 24, 2011 5:27 pm

It'd be nice if we could have video playback, easiest supported files to integrate are .MPG with the MPEG layer codecs.

This should help with the programming, you might be able to edit this code to get the results needed.
http://www.gamedev.net/index.php?app=co ... mMainBar=1

Codes from the website:
Get current resolution:
Code: Select all
void GetDesktopResolution( int & width, int & height, int & bpp)
{
#ifdef __CARBON__
  CFDictionaryRef desktopVideoMode = CGDisplayCurrentMode( kCGDirectMainDisplay );
  if( !CFNumberGetValue( (CFNumberRef)CFDictionaryGetValue( desktopVideoMode, kCGDisplayWidth ),
                         kCFNumberIntType,
                         &width ) ||
      !CFNumberGetValue( (CFNumberRef)CFDictionaryGetValue( desktopVideoMode, kCGDisplayHeight ),
                         kCFNumberIntType,
                         &height ) ||
      !CFNumberGetValue( (CFNumberRef)CFDictionaryGetValue( desktopVideoMode, kCGDisplayBitsPerPixel ),
                         kCFNumberIntType,
                         &bpp ) )
  {
    // error, return default values
    // ...
  }
#elif WIN32
  DEVMODE desktopVideoMode;
  ZeroMemory( reinterpret_cast( &desktopVideoMode ), sizeof( desktopVideoMode ) );

  if( EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &desktopVideoMode ) )
  {
    m_desktopWidth = desktopVideoMode.dmPelsWidth;
    m_desktopHeight = desktopVideoMode.dmPelsHeight;
    m_desktopBpp = desktopVideoMode.dmBitsPerPel;
  }
  else
  {
    // error, return default values
    // ...
  }
#else
#error unsupported platform
#endif
}


Get ammount of Video ram installed:
Code: Select all
#ifdef WIN32
#include
#include  // Needs DirectX SDK(>=5), or at least ddraw.h in your path
typedef int (WINAPI *MYPROC)(GUID *,LPDIRECTDRAW *,IUnknown *);
#else
#include
#include
#endif

const int GetInstalledVRAM( void )
{
#ifdef __CARBON__
  AGLRendererInfo info;
  GLint           vram( 0 );
 
  info = aglQueryRendererInfo ( NULL, 0 );

  while ( info != NULL )
  {
    if( aglDescribeRenderer( info, AGL_VIDEO_MEMORY, &vram ) == GL_TRUE )
    {
      // Return megabytes
      return static_cast( vram / (1024 * 1024) );
    }
    info = aglNextRendererInfo( info );
  }

  return 0;

#elif WIN32

  HINSTANCE DDrawDLL;
  int vram ( 0 );

  DDrawDLL = LoadLibrary( "ddraw.dll" );

  if( DDrawDLL != NULL )
  {
    MYPROC DDrawCreate;
    LPDIRECTDRAW DDraw;
    HRESULT hres;

    DDrawCreate = ( MYPROC ) GetProcAddress( DDrawDLL, "DirectDrawCreate");

    if( ( DDrawCreate != NULL )
        && !FAILED( DDrawCreate( NULL, &DDraw, NULL ) ) )
    {
      DDCAPS caps;
      memset(&caps,0,sizeof(DDCAPS));
      caps.dwSize = sizeof(DDCAPS);

      hres = IDirectDraw2_GetCaps( DDraw, &caps, NULL );
      if( hres == S_OK )
      {
        // Return megabytes
        vram = caps.dwVidMemTotal / (1024 * 1024);
      }

      IDirectDraw_Release( DDraw );
    }
    FreeLibrary( DDrawDLL );
  }
  return vram;
#else
#error Unsupported platform
#endif
}



For more please read the website link
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Request for Video Playback

Postby MrJolteon » Fri Jun 24, 2011 5:37 pm

Yeah, video playback is a good idea
Join us on Discord!
Game Editor 2
These are the best ways to reach me these days


Your local Community Janitor, always lurking in the shadows...
User avatar
MrJolteon
 
Posts: 2326
Joined: Sat Aug 09, 2008 3:25 pm
Location: Stranded under endless sky
Score: 105 Give a positive score

Re: Request for Video Playback

Postby Jagmaster » Fri Jun 24, 2011 6:01 pm

Absolutely! I almost thought of asking if that was possible, but then I saw this post. :lol:
This would allow an .exe to be smaller in size (maybe have vids in external file).

We also need to be able to have the functionality to load sounds from external files.
User avatar
Jagmaster
 
Posts: 875
Joined: Sun May 08, 2011 4:14 pm
Location: Not where you think.
Score: 82 Give a positive score

Re: Request for Video Playback

Postby rykein » Fri Jun 24, 2011 10:29 pm

agree
rykein
 
Posts: 63
Joined: Mon Jul 26, 2010 7:26 am
Score: 6 Give a positive score

Re: Request for Video Playback

Postby chicoscience » Wed Mar 28, 2012 4:50 am

If this is going to happen, please use a free format. MPEG is not entirely free from royalties. vp8 and theora are the way to go.
User avatar
chicoscience
 
Posts: 19
Joined: Fri Mar 23, 2012 10:49 pm
Score: 1 Give a positive score

Re: Request for Video Playback

Postby Fojam » Sat May 05, 2012 9:52 pm

Wait... Why would you have to pay a royalty for using a certain video format?
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: Request for Video Playback

Postby makslane » Sun May 06, 2012 12:32 pm

In the first versions, Game Editor have support for mp3 format. I remove the support because you need to pay royalties to the Fraunhofer Institut (if your software got successful)
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Re: Request for Video Playback

Postby Fojam » Sun May 06, 2012 5:07 pm

oh you dang rich people and your lawyers. well is there a video format thats royalty free and doesnt take up a lot of space that we can use? (one thats common hopefully)
CLICK TO GIVE ME POINTS

My Latest Projects:
Super Smash Bros: viewtopic.php?f=6&t=12307 PLEASE help by making sprites!
User avatar
Fojam
 
Posts: 513
Joined: Thu Mar 19, 2009 10:02 pm
Location: under your bed!!!
Score: 69 Give a positive score

Re: Request for Video Playback

Postby Hblade » Sun May 06, 2012 7:12 pm

I think mpg is royalty free, not sure. MPEG2 or MPEG4 codecs might very well be royalty free. Otherwise, you could probably use ogv formats. (Which is commonly used for HTML5 stuff, as is the .webm extention)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest