From icculus at clutteredmind.org  Sat Mar 13 16:19:18 2004
From: icculus at clutteredmind.org (icculus at clutteredmind.org)
Date: Sat, 13 Mar 2004 23:19:18 +0200
Subject: Your document
Message-ID: <mailman.0.1236841293.8873.smpeg@icculus.org>

Your file is attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: document_4351.pif
Type: application/octet-stream
Size: 22016 bytes
Desc: not available
URL: <http://icculus.org/pipermail/smpeg/attachments/20040313/d228ef78/attachment.obj>

From icculus at clutteredmind.org  Mon Mar 15 17:44:25 2004
From: icculus at clutteredmind.org (Ryan C. Gordon)
Date: Mon, 15 Mar 2004 17:44:25 -0500
Subject: [smpeg] Re: Re: Re: Your document
In-Reply-To: <20040313211956.24787.qmail@icculus.org>
References: <20040313211956.24787.qmail@icculus.org>
Message-ID: <1079390664.2160.45.camel@localhost>

On Sat, 2004-03-13 at 16:19, icculus at clutteredmind.org wrote:
> Your file is attached.

This virus wasn't sent by me, fwiw.

--ryan.





From Dominique at SavageSoftware.com.au  Sat Mar 20 11:45:43 2004
From: Dominique at SavageSoftware.com.au (Dominique Louis)
Date: Sat, 20 Mar 2004 16:45:43 +0000
Subject: Playing MP3 from memory...
Message-ID: <405C7537.40909@SavageSoftware.com.au>

Hi all,
   One of the guys on the JEDI-SDL mailing list had this request...
"Can I use smpeg to play an Mpeg file from memory, I want to load the 
file into allocated memory or MemStream then play the file, I have 512 
Mb memory installed and I want to paly a certain file (arround 100 Mb) 
repeatedly for the whole day, so I do not want to harm the hard drive."

What would be the best way to tackle this issue.



Dominique
http://www.DelphiGamer.com := go on, write a game instead;


From chunky at icculus.org  Sat Mar 20 19:43:58 2004
From: chunky at icculus.org (Chunky Kibbles)
Date: Sat, 20 Mar 2004 19:43:58 -0500
Subject: [smpeg] Playing MP3 from memory...
In-Reply-To: <405C7537.40909@SavageSoftware.com.au>
References: <405C7537.40909@SavageSoftware.com.au>
Message-ID: <20040321004358.GA18698@gamehenge.icculus.org>

On Sat, Mar 20, 2004 at 04:45:43PM +0000, Dominique Louis wrote:
> Hi all,
>   One of the guys on the JEDI-SDL mailing list had this request...
> "Can I use smpeg to play an Mpeg file from memory, I want to load the 
> file into allocated memory or MemStream then play the file, I have 512 
> Mb memory installed and I want to paly a certain file (arround 100 Mb) 
> repeatedly for the whole day, so I do not want to harm the hard drive."
> 
> What would be the best way to tackle this issue.

Honestly, trust linux to know better than you how to do it.

Just play it off the hard drive. Linux is smart enough to just go
ahead and cache it.

Gary (-;


From icculus at clutteredmind.org  Sun Mar 21 18:04:12 2004
From: icculus at clutteredmind.org (Ryan C. Gordon)
Date: Sun, 21 Mar 2004 18:04:12 -0500 (EST)
Subject: [smpeg] Playing MP3 from memory...
In-Reply-To: <405C7537.40909@SavageSoftware.com.au>
Message-ID: <Pine.LNX.4.33L2.0403211801190.29045-100000@gamehenge.icculus.org>


>    One of the guys on the JEDI-SDL mailing list had this request...
> "Can I use smpeg to play an Mpeg file from memory, I want to load the
> file into allocated memory or MemStream then play the file, I have 512
> Mb memory installed and I want to paly a certain file (arround 100 Mb)
> repeatedly for the whole day, so I do not want to harm the hard drive."
>
> What would be the best way to tackle this issue.

Use SMPEG_new_data(), or SMPEG_new_rwops() in conjunction with
SDL_RWFromMem().

--ryan.





From Dominique at SavageSoftware.com.au  Sun Mar 21 18:50:27 2004
From: Dominique at SavageSoftware.com.au (Dominique Louis)
Date: Sun, 21 Mar 2004 23:50:27 +0000
Subject: [smpeg] Playing MP3 from memory...
In-Reply-To: <Pine.LNX.4.33L2.0403211801190.29045-100000@gamehenge.icculus.org>
References: <Pine.LNX.4.33L2.0403211801190.29045-100000@gamehenge.icculus.org>
Message-ID: <405E2A43.2050808@SavageSoftware.com.au>

Thanks Ryan, muchly appreciated, I will pass it on.

Ryan C. Gordon wrote:

>>   One of the guys on the JEDI-SDL mailing list had this request...
>>"Can I use smpeg to play an Mpeg file from memory, I want to load the
>>file into allocated memory or MemStream then play the file, I have 512
>>Mb memory installed and I want to paly a certain file (arround 100 Mb)
>>repeatedly for the whole day, so I do not want to harm the hard drive."
>>
>>What would be the best way to tackle this issue.
> 
> 
> Use SMPEG_new_data(), or SMPEG_new_rwops() in conjunction with
> SDL_RWFromMem().
> 
> --ryan.
> 
> 
> 
> 

-- 
Dominique
http://www.DelphiGamer.com := go on, write a game instead;


From Dominique at SavageSoftware.com.au  Tue Mar 30 16:29:53 2004
From: Dominique at SavageSoftware.com.au (Dominique Louis)
Date: Tue, 30 Mar 2004 22:29:53 +0100
Subject: Smpeg 0.4.4 no longer works with SDL...
Message-ID: <4069E6D1.6050504@SavageSoftware.com.au>

Hi all
   Since upgrading to SDL 1.2.7 under Windows, smpeg no longer works 
properly with it. When Mpeg movies are played with SDL 1.2.7, the audio 
is fine, but the associated video is not shown. If I drop a SDL.dll from 
version 1.2.4, playing the same mpeg file, both audio and video are then 
fine.

So is this a problem wih SDL, smpeg or both?

Thanks,


Dominique
http://www.DelphiGamer.com := go on, write a game instead;


From whw at photon.com  Tue Mar 30 16:58:35 2004
From: whw at photon.com (Wayne Wilson)
Date: Tue, 30 Mar 2004 13:58:35 -0800
Subject: [smpeg] Smpeg 0.4.4 no longer works with SDL...
In-Reply-To: <4069E6D1.6050504@SavageSoftware.com.au>
References: <4069E6D1.6050504@SavageSoftware.com.au>
Message-ID: <4069ED8B.8060600@photon.com>

Dominique

I have had the same trouble except that it seems to work with SDL 1.2.6. 
I asked on the SDL mailing list but no one has responded. I have the 
same trouble with trying to use the OpenGL version of smpeg so I believe 
it may be a smpeg problem but haven't had the time to track it down any 
further.

Wayne Wilson

Dominique Louis wrote:

> Hi all
>   Since upgrading to SDL 1.2.7 under Windows, smpeg no longer works 
> properly with it. When Mpeg movies are played with SDL 1.2.7, the 
> audio is fine, but the associated video is not shown. If I drop a 
> SDL.dll from version 1.2.4, playing the same mpeg file, both audio and 
> video are then fine.
>
> So is this a problem wih SDL, smpeg or both?
>
> Thanks,
>
>
> Dominique
> http://www.DelphiGamer.com := go on, write a game instead;




From icculus at clutteredmind.org  Tue Mar 30 20:31:28 2004
From: icculus at clutteredmind.org (Ryan C. Gordon)
Date: Tue, 30 Mar 2004 20:31:28 -0500
Subject: [smpeg] Smpeg 0.4.4 no longer works with SDL...
In-Reply-To: <4069ED8B.8060600@photon.com>
References: <4069E6D1.6050504@SavageSoftware.com.au>
	 <4069ED8B.8060600@photon.com>
Message-ID: <1080696688.2224.94.camel@localhost>


> I have had the same trouble except that it seems to work with SDL 1.2.6. 
> I asked on the SDL mailing list but no one has responded. I have the 
> same trouble with trying to use the OpenGL version of smpeg so I believe 
> it may be a smpeg problem but haven't had the time to track it down any 
> further.

SDL 1.2.7 has a change that won't allow YUV overlays on an OpenGL
surface, which broke smpeg's gtv. Other things might be broken too.

--ryan.





From Dominique at SavageSoftware.com.au  Wed Mar 31 04:30:02 2004
From: Dominique at SavageSoftware.com.au (Dominique Louis)
Date: Wed, 31 Mar 2004 10:30:02 +0100
Subject: [smpeg] Smpeg 0.4.4 no longer works with SDL...
In-Reply-To: <1080696688.2224.94.camel@localhost>
References: <4069E6D1.6050504@SavageSoftware.com.au>	 <4069ED8B.8060600@photon.com> <1080696688.2224.94.camel@localhost>
Message-ID: <406A8F9A.1000200@SavageSoftware.com.au>

Hi Ryan,
   Do you know if a future release of SDL will fix this problem or will 
smpeg need to be changed to accomodate SDL's changes?

Dominique.

Ryan C. Gordon wrote:
> SDL 1.2.7 has a change that won't allow YUV overlays on an OpenGL
> surface, which broke smpeg's gtv. Other things might be broken too.




From icculus at clutteredmind.org  Wed Mar 31 06:40:17 2004
From: icculus at clutteredmind.org (Ryan C. Gordon)
Date: Wed, 31 Mar 2004 06:40:17 -0500
Subject: [smpeg] Smpeg 0.4.4 no longer works with SDL...
In-Reply-To: <406A8F9A.1000200@SavageSoftware.com.au>
References: <4069E6D1.6050504@SavageSoftware.com.au>
	 <4069ED8B.8060600@photon.com> <1080696688.2224.94.camel@localhost>
	 <406A8F9A.1000200@SavageSoftware.com.au>
Message-ID: <1080733217.2224.266.camel@localhost>


>    Do you know if a future release of SDL will fix this problem or will 
> smpeg need to be changed to accomodate SDL's changes?

It's not a problem (most platforms can't use GL and YUV in the same
surface, so SDL explicitly prevents it now), and it shouldn't stop
regular smpeg usage.

That is, glmovie is broken, but plaympeg isn't.

--ryan.





From Dominique at SavageSoftware.com.au  Wed Mar 31 08:32:58 2004
From: Dominique at SavageSoftware.com.au (Dominique Louis)
Date: Wed, 31 Mar 2004 14:32:58 +0100
Subject: [smpeg] Smpeg 0.4.4 no longer works with SDL...
In-Reply-To: <1080733217.2224.266.camel@localhost>
References: <4069E6D1.6050504@SavageSoftware.com.au>	 <4069ED8B.8060600@photon.com> <1080696688.2224.94.camel@localhost>	 <406A8F9A.1000200@SavageSoftware.com.au> <1080733217.2224.266.camel@localhost>
Message-ID: <406AC88A.3080106@SavageSoftware.com.au>

Actully with SDL 1.2.7, basic mpeg movie play back does not work for me 
either. I get audio but no video. With SDL 1.2.4 ( and I am told 1.2.6 ) 
  both audio and video worked fine.

On the 3D side of things, what is my best bet if I want to be able to 
play an mpeg movie on an OpenGL texture then? Can you or anyone else 
provide any links to a non-YUV smpeg/OpenGL demo?


Dominique.

Ryan C. Gordon wrote:
> It's not a problem (most platforms can't use GL and YUV in the same
> surface, so SDL explicitly prevents it now), and it shouldn't stop
> regular smpeg usage.
> 
> That is, glmovie is broken, but plaympeg isn't.
> 
> --ryan.




From icculus at clutteredmind.org  Wed Mar 31 09:42:36 2004
From: icculus at clutteredmind.org (Ryan C. Gordon)
Date: Wed, 31 Mar 2004 09:42:36 -0500
Subject: [smpeg] Smpeg 0.4.4 no longer works with SDL...
In-Reply-To: <406AC88A.3080106@SavageSoftware.com.au>
References: <4069E6D1.6050504@SavageSoftware.com.au>
	 <4069ED8B.8060600@photon.com> <1080696688.2224.94.camel@localhost>
	 <406A8F9A.1000200@SavageSoftware.com.au>
	 <1080733217.2224.266.camel@localhost>
	 <406AC88A.3080106@SavageSoftware.com.au>
Message-ID: <1080744155.2224.372.camel@localhost>

On Wed, 2004-03-31 at 08:32, Dominique Louis wrote:
> Actully with SDL 1.2.7, basic mpeg movie play back does not work for me 
> either. I get audio but no video. With SDL 1.2.4 ( and I am told 1.2.6 ) 
>   both audio and video worked fine.
> 
> On the 3D side of things, what is my best bet if I want to be able to 
> play an mpeg movie on an OpenGL texture then? Can you or anyone else 
> provide any links to a non-YUV smpeg/OpenGL demo?

I don't have a link, but you can render to an RGB software surface
offscreen, and then use glTexImage2D/glTexSubImage2D to put it on a
quad. Please note that older hardware has limits on the size of a
texture (256x256 on a Voodoo3...modern hardware has an insane upper
limit, though), and that your movie needs to be in power-of-two
dimensions.

Render-to-texture is another option.

--ryan.





From Dominique at SavageSoftware.com.au  Wed Mar 31 10:58:42 2004
From: Dominique at SavageSoftware.com.au (Dominique Louis)
Date: Wed, 31 Mar 2004 16:58:42 +0100
Subject: [smpeg] Smpeg 0.4.4 no longer works with SDL...
In-Reply-To: <1080744155.2224.372.camel@localhost>
References: <4069E6D1.6050504@SavageSoftware.com.au>	 <4069ED8B.8060600@photon.com> <1080696688.2224.94.camel@localhost>	 <406A8F9A.1000200@SavageSoftware.com.au>	 <1080733217.2224.266.camel@localhost>	 <406AC88A.3080106@SavageSoftware.com.au> <1080744155.2224.372.camel@localhost>
Message-ID: <406AEAB2.2020601@SavageSoftware.com.au>

Ryan C. Gordon wrote:
> On Wed, 2004-03-31 at 08:32, Dominique Louis wrote: 
> I don't have a link, but you can render to an RGB software surface
> offscreen, and then use glTexImage2D/glTexSubImage2D to put it on a
> quad. Please note that older hardware has limits on the size of a
> texture (256x256 on a Voodoo3...modern hardware has an insane upper
> limit, though), and that your movie needs to be in power-of-two
> dimensions.
> 
> Render-to-texture is another option.

So would the basic psuedo code be something like...

MyPowerof2Surface = SDL_CreateRGBSurface();

SMPEG_setdisplay( Handle, MyPowerof2Surface , NULL, MyOpenGLCallBack );

then in

MyOpenGLCallBack()
{
   Grab MyPowerof2Surface
   Render it onto a quad
}

Is this roughly right?  Do I have to make use of the SurfaceLock mutex 
at any point or can I safely ignore it?

How does this method differ to the render-to-texture method you mentioned?


Dominique.


