Re: [pygame] Re: Movie module being merged

2009-10-03 Thread Tyler Laing
Nevermind, if you add a slight delay after the stop command in test_stop,
then the tests work.

I'll be committing an updated unit test later today.

On Sat, Oct 3, 2009 at 9:48 AM, Tyler Laing  wrote:

> Yeah, I turned off the pygame.quit already. Hmm, then maybe more time is
> needed to ensure the deletion of the movie module...
>
> I fixed the issue by adding a movie.stop() and a time.sleep(1) before the
> del movie call. This actually fixes the mess of threads issue. Stop isn't
> behaving right, so I'll fix that, and then commit.
>
> -Tyler
>
>
> On Sat, Oct 3, 2009 at 9:29 AM, Lenard Lindstrom  wrote:
>
>> Hi Tyler,
>>
>> Tyler Laing wrote:
>>
>>> Part of the issue is that the movie isn't cleaning up properly after
>>> itself. The threads do take a miniscule amount of time to end and clean up.
>>> After each call I've added a 1 second wait, as the movie object does not and
>>> cannot act instantaneously, but quite close to instantaneously.
>>>
>> The unit tests are unrealistic since Pygame is not officially designed to
>> be restarted. If sleep calls fix the problem, great. I don't know what the
>> answer is otherwise.
>>
>>
>>> I'm also noticing in the debugging that it seems that the unittest
>>> framework runs the methods in parallel? Is this right?
>>>
>> I understand it can, but never tried it. By default it should be single
>> threaded.
>>
>>
>>> On Sat, Oct 3, 2009 at 8:55 AM, Tyler Laing >> trinio...@gmail.com>> wrote:
>>>
>>>Nevermind, now I am.
>>>
>>>On Sat, Oct 3, 2009 at 8:54 AM, Tyler Laing >>> wrote:
>>>
>>>Hmm, not seeing the same issue here Lenard, sorry. What kind
>>>of movie file are you using? (Sorry been busy with midterms
>>>and assignments. I have a free weekend now, aside from errands.)
>>>
>>>
>>>On Tue, Sep 1, 2009 at 11:25 AM, Lenard Lindstrom
>>>mailto:le...@telus.net>> wrote:
>>>
>>>Hi Tyler,
>>>
>>>Debian lenny, Python 2.5,
>>>
>>>I am getting a segfault in _movie_test.py, test_resize(),
>>>movie.resize(movie.width/2, movie.height/2).
>>>
>>>The order of test method execution I get is test_height,
>>>test_init, test_play_pause, test_resize. I have modified
>>>_movie_test.py to execute as a stand-alone program so
>>>print statements work.
>>>
>>>python test/_movie_test.py
>>>
>>>Lenard
>>>
>>>
>>>Tyler Laing wrote:
>>>
>>>Okay I've commited a revision, with a new MovieInfo
>>>object, which allows the programmers to handle any
>>>kind of movie, if its loadable, and do some
>>>introspection before actually loading the movie, like
>>>screen-size etc.
>>>
>>>I was wondering if anyone that has had errors or
>>>crashes can send me their logs please?
>>>
>>>-
>>>
>>>
>>>
>> Lenard Lindstrom
>>
>>
>
>
> --
> Visit my blog at http://oddco.ca/zeroth/zblog
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-10-03 Thread Tyler Laing
Yeah, I turned off the pygame.quit already. Hmm, then maybe more time is
needed to ensure the deletion of the movie module...

I fixed the issue by adding a movie.stop() and a time.sleep(1) before the
del movie call. This actually fixes the mess of threads issue. Stop isn't
behaving right, so I'll fix that, and then commit.

-Tyler

On Sat, Oct 3, 2009 at 9:29 AM, Lenard Lindstrom  wrote:

> Hi Tyler,
>
> Tyler Laing wrote:
>
>> Part of the issue is that the movie isn't cleaning up properly after
>> itself. The threads do take a miniscule amount of time to end and clean up.
>> After each call I've added a 1 second wait, as the movie object does not and
>> cannot act instantaneously, but quite close to instantaneously.
>>
> The unit tests are unrealistic since Pygame is not officially designed to
> be restarted. If sleep calls fix the problem, great. I don't know what the
> answer is otherwise.
>
>
>> I'm also noticing in the debugging that it seems that the unittest
>> framework runs the methods in parallel? Is this right?
>>
> I understand it can, but never tried it. By default it should be single
> threaded.
>
>
>> On Sat, Oct 3, 2009 at 8:55 AM, Tyler Laing > trinio...@gmail.com>> wrote:
>>
>>Nevermind, now I am.
>>
>>On Sat, Oct 3, 2009 at 8:54 AM, Tyler Laing >> wrote:
>>
>>Hmm, not seeing the same issue here Lenard, sorry. What kind
>>of movie file are you using? (Sorry been busy with midterms
>>and assignments. I have a free weekend now, aside from errands.)
>>
>>
>>On Tue, Sep 1, 2009 at 11:25 AM, Lenard Lindstrom
>>mailto:le...@telus.net>> wrote:
>>
>>Hi Tyler,
>>
>>Debian lenny, Python 2.5,
>>
>>I am getting a segfault in _movie_test.py, test_resize(),
>>movie.resize(movie.width/2, movie.height/2).
>>
>>The order of test method execution I get is test_height,
>>test_init, test_play_pause, test_resize. I have modified
>>_movie_test.py to execute as a stand-alone program so
>>print statements work.
>>
>>python test/_movie_test.py
>>
>>Lenard
>>
>>
>>Tyler Laing wrote:
>>
>>Okay I've commited a revision, with a new MovieInfo
>>object, which allows the programmers to handle any
>>kind of movie, if its loadable, and do some
>>introspection before actually loading the movie, like
>>screen-size etc.
>>
>>I was wondering if anyone that has had errors or
>>crashes can send me their logs please?
>>
>>-
>>
>>
>>
> Lenard Lindstrom
>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-10-03 Thread Lenard Lindstrom

Hi Tyler,

Tyler Laing wrote:
Part of the issue is that the movie isn't cleaning up properly after 
itself. The threads do take a miniscule amount of time to end and 
clean up. After each call I've added a 1 second wait, as the movie 
object does not and cannot act instantaneously, but quite close to 
instantaneously.
The unit tests are unrealistic since Pygame is not officially designed 
to be restarted. If sleep calls fix the problem, great. I don't know 
what the answer is otherwise.




I'm also noticing in the debugging that it seems that the unittest 
framework runs the methods in parallel? Is this right?
I understand it can, but never tried it. By default it should be single 
threaded.




On Sat, Oct 3, 2009 at 8:55 AM, Tyler Laing > wrote:


Nevermind, now I am.

On Sat, Oct 3, 2009 at 8:54 AM, Tyler Laing mailto:trinio...@gmail.com>> wrote:

Hmm, not seeing the same issue here Lenard, sorry. What kind
of movie file are you using? (Sorry been busy with midterms
and assignments. I have a free weekend now, aside from errands.)


On Tue, Sep 1, 2009 at 11:25 AM, Lenard Lindstrom
mailto:le...@telus.net>> wrote:

Hi Tyler,

Debian lenny, Python 2.5,

I am getting a segfault in _movie_test.py, test_resize(),
movie.resize(movie.width/2, movie.height/2).

The order of test method execution I get is test_height,
test_init, test_play_pause, test_resize. I have modified
_movie_test.py to execute as a stand-alone program so
print statements work.

python test/_movie_test.py

Lenard


Tyler Laing wrote:

Okay I've commited a revision, with a new MovieInfo
object, which allows the programmers to handle any
kind of movie, if its loadable, and do some
introspection before actually loading the movie, like
screen-size etc.

I was wondering if anyone that has had errors or
crashes can send me their logs please?

-




Lenard Lindstrom



Re: [pygame] Re: Movie module being merged

2009-10-03 Thread Tyler Laing
Part of the issue is that the movie isn't cleaning up properly after itself.
The threads do take a miniscule amount of time to end and clean up. After
each call I've added a 1 second wait, as the movie object does not and
cannot act instantaneously, but quite close to instantaneously.

I'm also noticing in the debugging that it seems that the unittest framework
runs the methods in parallel? Is this right?

On Sat, Oct 3, 2009 at 8:55 AM, Tyler Laing  wrote:

> Nevermind, now I am.
>
> On Sat, Oct 3, 2009 at 8:54 AM, Tyler Laing  wrote:
>
>> Hmm, not seeing the same issue here Lenard, sorry. What kind of movie file
>> are you using? (Sorry been busy with midterms and assignments. I have a free
>> weekend now, aside from errands.)
>>
>>
>> On Tue, Sep 1, 2009 at 11:25 AM, Lenard Lindstrom wrote:
>>
>>> Hi Tyler,
>>>
>>> Debian lenny, Python 2.5,
>>>
>>> I am getting a segfault in _movie_test.py, test_resize(),
>>> movie.resize(movie.width/2, movie.height/2).
>>>
>>> The order of test method execution I get is test_height, test_init,
>>> test_play_pause, test_resize. I have modified _movie_test.py to execute as a
>>> stand-alone program so print statements work.
>>>
>>> python test/_movie_test.py
>>>
>>> Lenard
>>>
>>>
>>> Tyler Laing wrote:
>>>
 Okay I've commited a revision, with a new MovieInfo object, which allows
 the programmers to handle any kind of movie, if its loadable, and do some
 introspection before actually loading the movie, like screen-size etc.

 I was wondering if anyone that has had errors or crashes can send me
 their logs please?

 -

>>>
>>>
>>
>>
>> --
>> Visit my blog at http://oddco.ca/zeroth/zblog
>>
>
>
>
> --
> Visit my blog at http://oddco.ca/zeroth/zblog
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-10-03 Thread Tyler Laing
Hmm, not seeing the same issue here Lenard, sorry. What kind of movie file
are you using? (Sorry been busy with midterms and assignments. I have a free
weekend now, aside from errands.)

On Tue, Sep 1, 2009 at 11:25 AM, Lenard Lindstrom  wrote:

> Hi Tyler,
>
> Debian lenny, Python 2.5,
>
> I am getting a segfault in _movie_test.py, test_resize(),
> movie.resize(movie.width/2, movie.height/2).
>
> The order of test method execution I get is test_height, test_init,
> test_play_pause, test_resize. I have modified _movie_test.py to execute as a
> stand-alone program so print statements work.
>
> python test/_movie_test.py
>
> Lenard
>
>
> Tyler Laing wrote:
>
>> Okay I've commited a revision, with a new MovieInfo object, which allows
>> the programmers to handle any kind of movie, if its loadable, and do some
>> introspection before actually loading the movie, like screen-size etc.
>>
>> I was wondering if anyone that has had errors or crashes can send me their
>> logs please?
>>
>> -
>>
>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-10-03 Thread Tyler Laing
Nevermind, now I am.

On Sat, Oct 3, 2009 at 8:54 AM, Tyler Laing  wrote:

> Hmm, not seeing the same issue here Lenard, sorry. What kind of movie file
> are you using? (Sorry been busy with midterms and assignments. I have a free
> weekend now, aside from errands.)
>
>
> On Tue, Sep 1, 2009 at 11:25 AM, Lenard Lindstrom  wrote:
>
>> Hi Tyler,
>>
>> Debian lenny, Python 2.5,
>>
>> I am getting a segfault in _movie_test.py, test_resize(),
>> movie.resize(movie.width/2, movie.height/2).
>>
>> The order of test method execution I get is test_height, test_init,
>> test_play_pause, test_resize. I have modified _movie_test.py to execute as a
>> stand-alone program so print statements work.
>>
>> python test/_movie_test.py
>>
>> Lenard
>>
>>
>> Tyler Laing wrote:
>>
>>> Okay I've commited a revision, with a new MovieInfo object, which allows
>>> the programmers to handle any kind of movie, if its loadable, and do some
>>> introspection before actually loading the movie, like screen-size etc.
>>>
>>> I was wondering if anyone that has had errors or crashes can send me
>>> their logs please?
>>>
>>> -
>>>
>>
>>
>
>
> --
> Visit my blog at http://oddco.ca/zeroth/zblog
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-09-01 Thread Lenard Lindstrom

Hi Tyler,

Debian lenny, Python 2.5,

I am getting a segfault in _movie_test.py, test_resize(), 
movie.resize(movie.width/2, movie.height/2).


The order of test method execution I get is test_height, test_init, 
test_play_pause, test_resize. I have modified _movie_test.py to execute 
as a stand-alone program so print statements work.


python test/_movie_test.py

Lenard

Tyler Laing wrote:
Okay I've commited a revision, with a new MovieInfo object, which 
allows the programmers to handle any kind of movie, if its loadable, 
and do some introspection before actually loading the movie, like 
screen-size etc.


I was wondering if anyone that has had errors or crashes can send me 
their logs please?


-




Re: [pygame] Re: Movie module being merged

2009-08-25 Thread Jussi Toivola
Well, let me see...

File: _gmovie.c

in stream_component_start

if (stream_index < 0 || stream_index >= ic->nb_streams)
{
if(threaded)
GRABGIL
Py_DECREF(movie);
if(threaded)
RELEASEGIL
return -1;
}

in stream_component_end
--
if (stream_index < 0 || stream_index >= ic->nb_streams)
{
if(threaded)
GRABGIL
if(movie->ob_refcnt!=0)
{
Py_DECREF(movie);
}
if(threaded)
RELEASEGIL
return;
}



Jussi Toivola



2009/8/26 Tyler Laing :
> Thanks for the input. Could you tell me which lines you noticed this on?
>
> -Tyler
>
> On Tue, Aug 25, 2009 at 2:01 PM, Jussi Toivola  wrote:
>>
>> Hi,
>> not sure if this is related. GIL trouble anyway. Noticed this while I
>> was tinkering with ffmpeg for Symbian. It's probably too slow on the
>> phones, but I just want to see if I get it working... Anyway, there
>> are several lines like this one:
>> ...
>>  if(threaded)
>>        GRABGIL
>> ...
>>  if(threaded)
>>        RELEASEGIL
>> ...
>>
>> Might seem like nothing wrong, but once the preprocessor expands those
>> macros:
>>
>> if(threaded)    // GRABGIL
>>   PyEval_AcquireLock();
>>   _oldtstate = PyThreadState_Swap(movie->_tstate);
>>
>> The PyThreadState_Swap is called even if 'threaded' is false, without
>> acquiring the lock, causing a crash. I suggest always using curly
>> braces with 'if' :) Hopefully this helps.
>>
>> 
>> Jussi Toivola
>>
>>
>>
>> 2009/8/22 Tyler Laing :
>> > "tstate mix-up". I've looked, and there are no Python calls done without
>> > having the GIL. Like I said, its an extremely weird bug. It also occurs
>> > if
>> > you do five play throughs(play(0)) sequentially.
>> >
>> > -Tyler
>> >
>> > On Fri, Aug 21, 2009 at 6:11 PM, Lenard Lindstrom 
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> Is it always a "tstate mix-up". If so, then it is likely a threading
>> >> problem. Absolutely no Python api calls should be made while the GIL is
>> >> released. If not then probably a memory problem.
>> >>
>> >> Lenard
>> >>
>> >> Tyler Laing wrote:
>> >>>
>> >>> Yeah I know about that. Its because of everything that is done to the
>> >>> video file in the example code. Its a very hard error to pindown.
>> >>> Sometimes
>> >>> it happens during debugging, sometimes not. It happens on various
>> >>> kinds of
>> >>> videos, so its not format dependent, and it only happens after
>> >>> stopping and
>> >>> restarting, and adding surfaces. I haven't found it happening any
>> >>> other way.
>> >>>
>> >>> Thanks for the feedback.
>> >>>
>> >>> -Tyler
>> >>>
>> >>> On Thu, Aug 20, 2009 at 2:05 PM, Lenard Lindstrom > >>> > wrote:
>> >>>
>> >>>    Hi,
>> >>>
>> >>>    It builds and installs in Debian lenny now. The __movie_test.py
>> >>>    even works for the most part, though fails at the end with this
>> >>> error:
>> >>>
>> >>>    Unpausing...
>> >>>    True
>> >>>    True
>> >>>    Stopping..., sleeping for 3 seconds
>> >>>    Playing again...
>> >>>    done restart play...
>> >>>    Surface time...
>> >>>    ValueError: surface does not have the same aspect ratio as the
>> >>>    video. This would cause surface corruption.
>> >>>    Fatal Python error: ceval: tstate mix-up
>> >>>    Aborted
>> >>>
>> >>>    I was playing an .flv file, so maybe that had something to do with
>> >>> it.
>> >>>
>> >>>    Lenard
>> >>>
>> >>>    Tyler Laing wrote:
>> >>>
>> >>>        Fixed that, sorry. I should have done an else, but I did an
>> >>>        endif >.>
>> >>>
>> >>>        -Tyler
>> >>>
>> >>>        On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom
>> >>>        mailto:le...@telus.net>
>> >>>        >> wrote:
>> >>>
>> >>>           Hi Tyler,
>> >>>
>> >>>           It is finding the headers, but now I am getting this
>> >>>        compiler error:
>> >>>
>> >>>           gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2
>> >>> -Wall
>> >>>           -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>> >>>           -I/usr/include/SDL -I/usr/include/ffmpeg
>> >>> -I/usr/include/ffmpeg
>> >>>           -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c
>> >>> -o
>> >>>           build/temp.linux-i686-2.5/src/_gmovie.o
>> >>>
>> >>>           src/_gmovie.c: In function ‘video_image_display’:
>> >>>           src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
>> >>>           src/_gmovie.c: In function ‘queue_picture’:
>> >>>           src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
>> >>>           src/_gmovie.c: In function ‘stream_open’:
>> >>>           src/_gmovie.c:1482: warning: unused variable
>> >>>        ‘wanted_subti_stream’
>> >>>
>> >>>           src/_gmovie.c: In function ‘video_render’:
>> >>>           src/

Re: [pygame] Re: Movie module being merged

2009-08-25 Thread Tyler Laing
Thanks for the input. Could you tell me which lines you noticed this on?

-Tyler

On Tue, Aug 25, 2009 at 2:01 PM, Jussi Toivola  wrote:

> Hi,
> not sure if this is related. GIL trouble anyway. Noticed this while I
> was tinkering with ffmpeg for Symbian. It's probably too slow on the
> phones, but I just want to see if I get it working... Anyway, there
> are several lines like this one:
> ...
>  if(threaded)
>GRABGIL
> ...
>  if(threaded)
>RELEASEGIL
> ...
>
> Might seem like nothing wrong, but once the preprocessor expands those
> macros:
>
> if(threaded)// GRABGIL
>   PyEval_AcquireLock();
>   _oldtstate = PyThreadState_Swap(movie->_tstate);
>
> The PyThreadState_Swap is called even if 'threaded' is false, without
> acquiring the lock, causing a crash. I suggest always using curly
> braces with 'if' :) Hopefully this helps.
>
> 
> Jussi Toivola
>
>
>
> 2009/8/22 Tyler Laing :
> > "tstate mix-up". I've looked, and there are no Python calls done without
> > having the GIL. Like I said, its an extremely weird bug. It also occurs
> if
> > you do five play throughs(play(0)) sequentially.
> >
> > -Tyler
> >
> > On Fri, Aug 21, 2009 at 6:11 PM, Lenard Lindstrom 
> wrote:
> >>
> >> Hi,
> >>
> >> Is it always a "tstate mix-up". If so, then it is likely a threading
> >> problem. Absolutely no Python api calls should be made while the GIL is
> >> released. If not then probably a memory problem.
> >>
> >> Lenard
> >>
> >> Tyler Laing wrote:
> >>>
> >>> Yeah I know about that. Its because of everything that is done to the
> >>> video file in the example code. Its a very hard error to pindown.
> Sometimes
> >>> it happens during debugging, sometimes not. It happens on various kinds
> of
> >>> videos, so its not format dependent, and it only happens after stopping
> and
> >>> restarting, and adding surfaces. I haven't found it happening any other
> way.
> >>>
> >>> Thanks for the feedback.
> >>>
> >>> -Tyler
> >>>
> >>> On Thu, Aug 20, 2009 at 2:05 PM, Lenard Lindstrom  >>> > wrote:
> >>>
> >>>Hi,
> >>>
> >>>It builds and installs in Debian lenny now. The __movie_test.py
> >>>even works for the most part, though fails at the end with this
> error:
> >>>
> >>>Unpausing...
> >>>True
> >>>True
> >>>Stopping..., sleeping for 3 seconds
> >>>Playing again...
> >>>done restart play...
> >>>Surface time...
> >>>ValueError: surface does not have the same aspect ratio as the
> >>>video. This would cause surface corruption.
> >>>Fatal Python error: ceval: tstate mix-up
> >>>Aborted
> >>>
> >>>I was playing an .flv file, so maybe that had something to do with
> it.
> >>>
> >>>Lenard
> >>>
> >>>Tyler Laing wrote:
> >>>
> >>>Fixed that, sorry. I should have done an else, but I did an
> >>>endif >.>
> >>>
> >>>-Tyler
> >>>
> >>>On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom
> >>>mailto:le...@telus.net>
> >>>>> wrote:
> >>>
> >>>   Hi Tyler,
> >>>
> >>>   It is finding the headers, but now I am getting this
> >>>compiler error:
> >>>
> >>>   gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2
> -Wall
> >>>   -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
> >>>   -I/usr/include/SDL -I/usr/include/ffmpeg
> -I/usr/include/ffmpeg
> >>>   -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c
> -o
> >>>   build/temp.linux-i686-2.5/src/_gmovie.o
> >>>
> >>>   src/_gmovie.c: In function ‘video_image_display’:
> >>>   src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
> >>>   src/_gmovie.c: In function ‘queue_picture’:
> >>>   src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
> >>>   src/_gmovie.c: In function ‘stream_open’:
> >>>   src/_gmovie.c:1482: warning: unused variable
> >>>‘wanted_subti_stream’
> >>>
> >>>   src/_gmovie.c: In function ‘video_render’:
> >>>   src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member
> named
> >>>   ‘reordered_opaque’
> >>>
> >>>   error: command 'gcc' failed with exit status 1
> >>>   l
> >>>
> >>>   Here is the version information returned by ffmpeg:
> >>>
> >>>   $/usr/bin/ffmpeg
> >>>   FFmpeg version r11872+debian_0.svn20080206-17+lenny1,
> Copyright
> >>>   (c) 2000-2008 Fabrice Bellard, et al.
> >>>configuration: --enable-gpl --enable-libfaad --enable-pp
> >>>   --enable-swscaler --enable-x11grab --prefix=/usr
> >>>--enable-libgsm
> >>>   --enable-libtheora --enable-libvorbis --enable-pthreads
> >>>   --disable-strip --enable-libdc1394 --disable-armv5te
> >>>   --disable-armv6 --disable-altivec --disable-vis
> --enable-shared
> >>>   --disable-static
> >>>libavutil versi

Re: [pygame] Re: Movie module being merged

2009-08-25 Thread Jussi Toivola
Hi,
not sure if this is related. GIL trouble anyway. Noticed this while I
was tinkering with ffmpeg for Symbian. It's probably too slow on the
phones, but I just want to see if I get it working... Anyway, there
are several lines like this one:
...
  if(threaded)
GRABGIL
...
  if(threaded)
RELEASEGIL
...

Might seem like nothing wrong, but once the preprocessor expands those macros:

if(threaded)// GRABGIL
   PyEval_AcquireLock();
   _oldtstate = PyThreadState_Swap(movie->_tstate);

The PyThreadState_Swap is called even if 'threaded' is false, without
acquiring the lock, causing a crash. I suggest always using curly
braces with 'if' :) Hopefully this helps.


Jussi Toivola



2009/8/22 Tyler Laing :
> "tstate mix-up". I've looked, and there are no Python calls done without
> having the GIL. Like I said, its an extremely weird bug. It also occurs if
> you do five play throughs(play(0)) sequentially.
>
> -Tyler
>
> On Fri, Aug 21, 2009 at 6:11 PM, Lenard Lindstrom  wrote:
>>
>> Hi,
>>
>> Is it always a "tstate mix-up". If so, then it is likely a threading
>> problem. Absolutely no Python api calls should be made while the GIL is
>> released. If not then probably a memory problem.
>>
>> Lenard
>>
>> Tyler Laing wrote:
>>>
>>> Yeah I know about that. Its because of everything that is done to the
>>> video file in the example code. Its a very hard error to pindown. Sometimes
>>> it happens during debugging, sometimes not. It happens on various kinds of
>>> videos, so its not format dependent, and it only happens after stopping and
>>> restarting, and adding surfaces. I haven't found it happening any other way.
>>>
>>> Thanks for the feedback.
>>>
>>> -Tyler
>>>
>>> On Thu, Aug 20, 2009 at 2:05 PM, Lenard Lindstrom >> > wrote:
>>>
>>>    Hi,
>>>
>>>    It builds and installs in Debian lenny now. The __movie_test.py
>>>    even works for the most part, though fails at the end with this error:
>>>
>>>    Unpausing...
>>>    True
>>>    True
>>>    Stopping..., sleeping for 3 seconds
>>>    Playing again...
>>>    done restart play...
>>>    Surface time...
>>>    ValueError: surface does not have the same aspect ratio as the
>>>    video. This would cause surface corruption.
>>>    Fatal Python error: ceval: tstate mix-up
>>>    Aborted
>>>
>>>    I was playing an .flv file, so maybe that had something to do with it.
>>>
>>>    Lenard
>>>
>>>    Tyler Laing wrote:
>>>
>>>        Fixed that, sorry. I should have done an else, but I did an
>>>        endif >.>
>>>
>>>        -Tyler
>>>
>>>        On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom
>>>        mailto:le...@telus.net>
>>>        >> wrote:
>>>
>>>           Hi Tyler,
>>>
>>>           It is finding the headers, but now I am getting this
>>>        compiler error:
>>>
>>>           gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>>           -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>>           -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
>>>           -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
>>>           build/temp.linux-i686-2.5/src/_gmovie.o
>>>
>>>           src/_gmovie.c: In function ‘video_image_display’:
>>>           src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
>>>           src/_gmovie.c: In function ‘queue_picture’:
>>>           src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
>>>           src/_gmovie.c: In function ‘stream_open’:
>>>           src/_gmovie.c:1482: warning: unused variable
>>>        ‘wanted_subti_stream’
>>>
>>>           src/_gmovie.c: In function ‘video_render’:
>>>           src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member named
>>>           ‘reordered_opaque’
>>>
>>>           error: command 'gcc' failed with exit status 1
>>>           l
>>>
>>>           Here is the version information returned by ffmpeg:
>>>
>>>           $/usr/bin/ffmpeg
>>>           FFmpeg version r11872+debian_0.svn20080206-17+lenny1, Copyright
>>>           (c) 2000-2008 Fabrice Bellard, et al.
>>>            configuration: --enable-gpl --enable-libfaad --enable-pp
>>>           --enable-swscaler --enable-x11grab --prefix=/usr
>>>        --enable-libgsm
>>>           --enable-libtheora --enable-libvorbis --enable-pthreads
>>>           --disable-strip --enable-libdc1394 --disable-armv5te
>>>           --disable-armv6 --disable-altivec --disable-vis --enable-shared
>>>           --disable-static
>>>            libavutil version: 49.6.0
>>>            libavcodec version: 51.50.0
>>>            libavformat version: 52.7.0
>>>            libavdevice version: 52.0.0
>>>            built on Apr 28 2009 02:12:01, gcc: 4.3.2
>>>
>>>           Though ffmpeg is statically linked I assume it use the same
>>>           library versions as the share libraries.
>>>
>>>           Lenard
>>>
>>>           Tyler Laing wrote:
>>>
>>>               And

Re: [pygame] Re: Movie module being merged

2009-08-21 Thread Tyler Laing
"tstate mix-up". I've looked, and there are no Python calls done without
having the GIL. Like I said, its an extremely weird bug. It also occurs if
you do five play throughs(play(0)) sequentially.

-Tyler

On Fri, Aug 21, 2009 at 6:11 PM, Lenard Lindstrom  wrote:

> Hi,
>
> Is it always a "tstate mix-up". If so, then it is likely a threading
> problem. Absolutely no Python api calls should be made while the GIL is
> released. If not then probably a memory problem.
>
> Lenard
>
> Tyler Laing wrote:
>
>> Yeah I know about that. Its because of everything that is done to the
>> video file in the example code. Its a very hard error to pindown. Sometimes
>> it happens during debugging, sometimes not. It happens on various kinds of
>> videos, so its not format dependent, and it only happens after stopping and
>> restarting, and adding surfaces. I haven't found it happening any other way.
>>
>> Thanks for the feedback.
>>
>> -Tyler
>>
>> On Thu, Aug 20, 2009 at 2:05 PM, Lenard Lindstrom > le...@telus.net>> wrote:
>>
>>Hi,
>>
>>It builds and installs in Debian lenny now. The __movie_test.py
>>even works for the most part, though fails at the end with this error:
>>
>>Unpausing...
>>True
>>True
>>Stopping..., sleeping for 3 seconds
>>Playing again...
>>done restart play...
>>Surface time...
>>ValueError: surface does not have the same aspect ratio as the
>>video. This would cause surface corruption.
>>Fatal Python error: ceval: tstate mix-up
>>Aborted
>>
>>I was playing an .flv file, so maybe that had something to do with it.
>>
>>Lenard
>>
>>Tyler Laing wrote:
>>
>>Fixed that, sorry. I should have done an else, but I did an
>>endif >.>
>>
>>-Tyler
>>
>>On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom
>>mailto:le...@telus.net>
>>>> wrote:
>>
>>   Hi Tyler,
>>
>>   It is finding the headers, but now I am getting this
>>compiler error:
>>
>>   gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>   -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>   -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
>>   -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
>>   build/temp.linux-i686-2.5/src/_gmovie.o
>>
>>   src/_gmovie.c: In function ‘video_image_display’:
>>   src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
>>   src/_gmovie.c: In function ‘queue_picture’:
>>   src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
>>   src/_gmovie.c: In function ‘stream_open’:
>>   src/_gmovie.c:1482: warning: unused variable
>>‘wanted_subti_stream’
>>
>>   src/_gmovie.c: In function ‘video_render’:
>>   src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member named
>>   ‘reordered_opaque’
>>
>>   error: command 'gcc' failed with exit status 1
>>   l
>>
>>   Here is the version information returned by ffmpeg:
>>
>>   $/usr/bin/ffmpeg
>>   FFmpeg version r11872+debian_0.svn20080206-17+lenny1, Copyright
>>   (c) 2000-2008 Fabrice Bellard, et al.
>>configuration: --enable-gpl --enable-libfaad --enable-pp
>>   --enable-swscaler --enable-x11grab --prefix=/usr
>>--enable-libgsm
>>   --enable-libtheora --enable-libvorbis --enable-pthreads
>>   --disable-strip --enable-libdc1394 --disable-armv5te
>>   --disable-armv6 --disable-altivec --disable-vis --enable-shared
>>   --disable-static
>>libavutil version: 49.6.0
>>libavcodec version: 51.50.0
>>libavformat version: 52.7.0
>>libavdevice version: 52.0.0
>>built on Apr 28 2009 02:12:01, gcc: 4.3.2
>>
>>   Though ffmpeg is statically linked I assume it use the same
>>   library versions as the share libraries.
>>
>>   Lenard
>>
>>   Tyler Laing wrote:
>>
>>   And I've now committed a fix for throwing exceptions if the
>>   surface given has the wrong aspect ratio.
>>
>>   -Tyler
>>
>>   On Thu, Aug 20, 2009 at 9:46 AM, Tyler Laing
>>   mailto:trinio...@gmail.com>
>>>
>>   > >>
>>  I have this fixed, with it committed in revision
>>2628. I have a
>>  custom Dependency class that adds extra directories
>>to the
>>   include
>>  search path(like libavformat or ffmpeg). This
>>prevents any
>>  accidental conflict of namespaces. Let me know if this
>>   work

Re: [pygame] Re: Movie module being merged

2009-08-21 Thread Lenard Lindstrom

Hi,

Is it always a "tstate mix-up". If so, then it is likely a threading 
problem. Absolutely no Python api calls should be made while the GIL is 
released. If not then probably a memory problem.


Lenard

Tyler Laing wrote:
Yeah I know about that. Its because of everything that is done to the 
video file in the example code. Its a very hard error to pindown. 
Sometimes it happens during debugging, sometimes not. It happens on 
various kinds of videos, so its not format dependent, and it only 
happens after stopping and restarting, and adding surfaces. I haven't 
found it happening any other way.


Thanks for the feedback.

-Tyler

On Thu, Aug 20, 2009 at 2:05 PM, Lenard Lindstrom > wrote:


Hi,

It builds and installs in Debian lenny now. The __movie_test.py
even works for the most part, though fails at the end with this error:

Unpausing...
True
True
Stopping..., sleeping for 3 seconds
Playing again...
done restart play...
Surface time...
ValueError: surface does not have the same aspect ratio as the
video. This would cause surface corruption.
Fatal Python error: ceval: tstate mix-up
Aborted

I was playing an .flv file, so maybe that had something to do with it.

Lenard

Tyler Laing wrote:

Fixed that, sorry. I should have done an else, but I did an
endif >.>

-Tyler

On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom
mailto:le...@telus.net>
>> wrote:

   Hi Tyler,

   It is finding the headers, but now I am getting this
compiler error:

   gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
   -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
   -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
   -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
   build/temp.linux-i686-2.5/src/_gmovie.o

   src/_gmovie.c: In function ‘video_image_display’:
   src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
   src/_gmovie.c: In function ‘queue_picture’:
   src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
   src/_gmovie.c: In function ‘stream_open’:
   src/_gmovie.c:1482: warning: unused variable
‘wanted_subti_stream’

   src/_gmovie.c: In function ‘video_render’:
   src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member named
   ‘reordered_opaque’

   error: command 'gcc' failed with exit status 1
   l

   Here is the version information returned by ffmpeg:

   $/usr/bin/ffmpeg
   FFmpeg version r11872+debian_0.svn20080206-17+lenny1, Copyright
   (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-libfaad --enable-pp
   --enable-swscaler --enable-x11grab --prefix=/usr
--enable-libgsm
   --enable-libtheora --enable-libvorbis --enable-pthreads
   --disable-strip --enable-libdc1394 --disable-armv5te
   --disable-armv6 --disable-altivec --disable-vis --enable-shared
   --disable-static
libavutil version: 49.6.0
libavcodec version: 51.50.0
libavformat version: 52.7.0
libavdevice version: 52.0.0
built on Apr 28 2009 02:12:01, gcc: 4.3.2

   Though ffmpeg is statically linked I assume it use the same
   library versions as the share libraries.

   Lenard

   Tyler Laing wrote:

   And I've now committed a fix for throwing exceptions if the
   surface given has the wrong aspect ratio.

   -Tyler

   On Thu, Aug 20, 2009 at 9:46 AM, Tyler Laing
   mailto:trinio...@gmail.com>
>
    
>
  


Re: [pygame] Re: Movie module being merged

2009-08-21 Thread Tyler Laing
Yeah I know about that. Its because of everything that is done to the video
file in the example code. Its a very hard error to pindown. Sometimes it
happens during debugging, sometimes not. It happens on various kinds of
videos, so its not format dependent, and it only happens after stopping and
restarting, and adding surfaces. I haven't found it happening any other way.

Thanks for the feedback.

-Tyler

On Thu, Aug 20, 2009 at 2:05 PM, Lenard Lindstrom  wrote:

> Hi,
>
> It builds and installs in Debian lenny now. The __movie_test.py even works
> for the most part, though fails at the end with this error:
>
> Unpausing...
> True
> True
> Stopping..., sleeping for 3 seconds
> Playing again...
> done restart play...
> Surface time...
> ValueError: surface does not have the same aspect ratio as the video. This
> would cause surface corruption.
> Fatal Python error: ceval: tstate mix-up
> Aborted
>
> I was playing an .flv file, so maybe that had something to do with it.
>
> Lenard
>
> Tyler Laing wrote:
>
>> Fixed that, sorry. I should have done an else, but I did an endif >.>
>>
>> -Tyler
>>
>> On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom > le...@telus.net>> wrote:
>>
>>Hi Tyler,
>>
>>It is finding the headers, but now I am getting this compiler error:
>>
>>gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>-I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
>>-I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
>>build/temp.linux-i686-2.5/src/_gmovie.o
>>
>>src/_gmovie.c: In function ‘video_image_display’:
>>src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
>>src/_gmovie.c: In function ‘queue_picture’:
>>src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
>>src/_gmovie.c: In function ‘stream_open’:
>>src/_gmovie.c:1482: warning: unused variable ‘wanted_subti_stream’
>>
>>src/_gmovie.c: In function ‘video_render’:
>>src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member named
>>‘reordered_opaque’
>>
>>error: command 'gcc' failed with exit status 1
>>l
>>
>>Here is the version information returned by ffmpeg:
>>
>>$/usr/bin/ffmpeg
>>FFmpeg version r11872+debian_0.svn20080206-17+lenny1, Copyright
>>(c) 2000-2008 Fabrice Bellard, et al.
>> configuration: --enable-gpl --enable-libfaad --enable-pp
>>--enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm
>>--enable-libtheora --enable-libvorbis --enable-pthreads
>>--disable-strip --enable-libdc1394 --disable-armv5te
>>--disable-armv6 --disable-altivec --disable-vis --enable-shared
>>--disable-static
>> libavutil version: 49.6.0
>> libavcodec version: 51.50.0
>> libavformat version: 52.7.0
>> libavdevice version: 52.0.0
>> built on Apr 28 2009 02:12:01, gcc: 4.3.2
>>
>>Though ffmpeg is statically linked I assume it use the same
>>library versions as the share libraries.
>>
>>Lenard
>>
>>Tyler Laing wrote:
>>
>>And I've now committed a fix for throwing exceptions if the
>>surface given has the wrong aspect ratio.
>>
>>-Tyler
>>
>>On Thu, Aug 20, 2009 at 9:46 AM, Tyler Laing
>>mailto:trinio...@gmail.com>
>>>> wrote:
>>
>>   I have this fixed, with it committed in revision 2628. I have a
>>   custom Dependency class that adds extra directories to the
>>include
>>   search path(like libavformat or ffmpeg). This prevents any
>>   accidental conflict of namespaces. Let me know if this
>>works or not.
>>
>>   -Tyler
>>
>>
>>   On Tue, Aug 18, 2009 at 5:17 PM, Lenard Lindstrom
>>mailto:le...@telus.net>
>>   >> wrote:
>>
>>   Hi,
>>
>>   No, I don't see any Debian specific predefined compiler
>>   macros. ffmpeg library information is available through
>>   pkg-config.
>>
>>   Lenard
>>
>>   Tyler Laing wrote:
>>
>>   Does debian have a unique compile time flag I can use?
>>
>>   -Tyler
>>
>>   On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom
>>   mailto:le...@telus.net>
>>>
>>   
>>>
>>  Hi Tyler,
>>
>>  /usr/include is included in the default header
>>search
>>   paths. What
>>  is installed is /usr/include/ffmpeg/avformat.h, not
>>  /usr/include/ffmpeg/libavformat/avformat.h. This
>>may be
>>   a quirk of
>>

Re: [pygame] Re: Movie module being merged

2009-08-20 Thread Lenard Lindstrom

Hi,

It builds and installs in Debian lenny now. The __movie_test.py even 
works for the most part, though fails at the end with this error:


Unpausing...
True
True
Stopping..., sleeping for 3 seconds
Playing again...
done restart play...
Surface time...
ValueError: surface does not have the same aspect ratio as the video. 
This would cause surface corruption.

Fatal Python error: ceval: tstate mix-up
Aborted

I was playing an .flv file, so maybe that had something to do with it.

Lenard

Tyler Laing wrote:

Fixed that, sorry. I should have done an else, but I did an endif >.>

-Tyler

On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom > wrote:


Hi Tyler,

It is finding the headers, but now I am getting this compiler error:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
-I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
-I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
build/temp.linux-i686-2.5/src/_gmovie.o

src/_gmovie.c: In function ‘video_image_display’:
src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
src/_gmovie.c: In function ‘queue_picture’:
src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
src/_gmovie.c: In function ‘stream_open’:
src/_gmovie.c:1482: warning: unused variable ‘wanted_subti_stream’

src/_gmovie.c: In function ‘video_render’:
src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member named
‘reordered_opaque’

error: command 'gcc' failed with exit status 1
l

Here is the version information returned by ffmpeg:

$/usr/bin/ffmpeg
FFmpeg version r11872+debian_0.svn20080206-17+lenny1, Copyright
(c) 2000-2008 Fabrice Bellard, et al.
 configuration: --enable-gpl --enable-libfaad --enable-pp
--enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm
--enable-libtheora --enable-libvorbis --enable-pthreads
--disable-strip --enable-libdc1394 --disable-armv5te
--disable-armv6 --disable-altivec --disable-vis --enable-shared
--disable-static
 libavutil version: 49.6.0
 libavcodec version: 51.50.0
 libavformat version: 52.7.0
 libavdevice version: 52.0.0
 built on Apr 28 2009 02:12:01, gcc: 4.3.2

Though ffmpeg is statically linked I assume it use the same
library versions as the share libraries.

Lenard

Tyler Laing wrote:

And I've now committed a fix for throwing exceptions if the
surface given has the wrong aspect ratio.

-Tyler

On Thu, Aug 20, 2009 at 9:46 AM, Tyler Laing
mailto:trinio...@gmail.com>
>> wrote:

   I have this fixed, with it committed in revision 2628. I have a
   custom Dependency class that adds extra directories to the
include
   search path(like libavformat or ffmpeg). This prevents any
   accidental conflict of namespaces. Let me know if this
works or not.

   -Tyler


   On Tue, Aug 18, 2009 at 5:17 PM, Lenard Lindstrom
mailto:le...@telus.net>
   >> wrote:

   Hi,

   No, I don't see any Debian specific predefined compiler
   macros. ffmpeg library information is available through
   pkg-config.

   Lenard

   Tyler Laing wrote:

   Does debian have a unique compile time flag I can use?

   -Tyler

   On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom
   mailto:le...@telus.net>
>
   

  

Re: [pygame] Re: Movie module being merged

2009-08-20 Thread Tyler Laing
Fixed that, sorry. I should have done an else, but I did an endif >.>

-Tyler

On Thu, Aug 20, 2009 at 1:09 PM, Lenard Lindstrom  wrote:

> Hi Tyler,
>
> It is finding the headers, but now I am getting this compiler error:
>
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
> -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
> -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
> build/temp.linux-i686-2.5/src/_gmovie.o
> src/_gmovie.c: In function ‘video_image_display’:
> src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
> src/_gmovie.c: In function ‘queue_picture’:
> src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
> src/_gmovie.c: In function ‘stream_open’:
> src/_gmovie.c:1482: warning: unused variable ‘wanted_subti_stream’
> src/_gmovie.c: In function ‘video_render’:
> src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member named
> ‘reordered_opaque’
> error: command 'gcc' failed with exit status 1
> l
>
> Here is the version information returned by ffmpeg:
>
> $/usr/bin/ffmpeg
> FFmpeg version r11872+debian_0.svn20080206-17+lenny1, Copyright (c)
> 2000-2008 Fabrice Bellard, et al.
>  configuration: --enable-gpl --enable-libfaad --enable-pp --enable-swscaler
> --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora
> --enable-libvorbis --enable-pthreads --disable-strip --enable-libdc1394
> --disable-armv5te --disable-armv6 --disable-altivec --disable-vis
> --enable-shared --disable-static
>  libavutil version: 49.6.0
>  libavcodec version: 51.50.0
>  libavformat version: 52.7.0
>  libavdevice version: 52.0.0
>  built on Apr 28 2009 02:12:01, gcc: 4.3.2
>
> Though ffmpeg is statically linked I assume it use the same library
> versions as the share libraries.
>
> Lenard
>
> Tyler Laing wrote:
>
>> And I've now committed a fix for throwing exceptions if the surface given
>> has the wrong aspect ratio.
>>
>> -Tyler
>>
>> On Thu, Aug 20, 2009 at 9:46 AM, Tyler Laing > trinio...@gmail.com>> wrote:
>>
>>I have this fixed, with it committed in revision 2628. I have a
>>custom Dependency class that adds extra directories to the include
>>search path(like libavformat or ffmpeg). This prevents any
>>accidental conflict of namespaces. Let me know if this works or not.
>>
>>-Tyler
>>
>>
>>On Tue, Aug 18, 2009 at 5:17 PM, Lenard Lindstrom >> wrote:
>>
>>Hi,
>>
>>No, I don't see any Debian specific predefined compiler
>>macros. ffmpeg library information is available through
>>pkg-config.
>>
>>Lenard
>>
>>Tyler Laing wrote:
>>
>>Does debian have a unique compile time flag I can use?
>>
>>-Tyler
>>
>>On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom
>>mailto:le...@telus.net>
>>>> wrote:
>>
>>   Hi Tyler,
>>
>>   /usr/include is included in the default header search
>>paths. What
>>   is installed is /usr/include/ffmpeg/avformat.h, not
>>   /usr/include/ffmpeg/libavformat/avformat.h. This may be
>>a quirk of
>>   the Debian dev package and not the general case.
>>
>>   Lenard
>>
>>   Tyler Laing wrote:
>>
>>   You don't have -l/usr/include actually. What I will
>>do is add
>>   to the directories searched, for the specific
>>libraries to
>>   search in /usr/include/ffmpeg && /usr/include/>   library name> for if people install from source.
>>Does that
>>   sound like a good solution?
>>
>>   -Tyler
>>
>>   On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom
>>   mailto:le...@telus.net>
>>>
>>   
>>>
>>  Ok, when I add
>>
>>  _movie src/_gsound.c src/_gmovie.c
>>src/_gcommand.c src/gmovie.c
>>  $(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)
>>
>>  to Setup I get these build errors:
>>
>>
>>  building 'pygame._movie' extension
>>  gcc -pthread -fno-strict-aliasing -DNDEBUG -g
>>-fwrapv -O2 -Wall
>>  -Wstrict-prototypes -fPIC -D_REENTRANT
>>-I/usr/X11R6/include
>>  -I/usr/include/SDL -I/usr/include/SDL
>>   -I/usr/include/python2.5 -c
>>  src/_gsound.c -o
>>build/temp.linux-i686-2.5/src/_gsound.o
>>  In file included from src/_gsound.c:35:
>>  src/_gsou

Re: [pygame] Re: Movie module being merged

2009-08-20 Thread Lenard Lindstrom

Hi Tyler,

It is finding the headers, but now I am getting this compiler error:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include 
-I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg 
-I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o 
build/temp.linux-i686-2.5/src/_gmovie.o

src/_gmovie.c: In function ‘video_image_display’:
src/_gmovie.c:516: warning: unused variable ‘_oldtstate’
src/_gmovie.c: In function ‘queue_picture’:
src/_gmovie.c:826: warning: unused variable ‘_oldtstate’
src/_gmovie.c: In function ‘stream_open’:
src/_gmovie.c:1482: warning: unused variable ‘wanted_subti_stream’
src/_gmovie.c: In function ‘video_render’:
src/_gmovie.c:2444: error: ‘AVCodecContext’ has no member named 
‘reordered_opaque’

error: command 'gcc' failed with exit status 1
l

Here is the version information returned by ffmpeg:

$/usr/bin/ffmpeg
FFmpeg version r11872+debian_0.svn20080206-17+lenny1, Copyright (c) 
2000-2008 Fabrice Bellard, et al.
 configuration: --enable-gpl --enable-libfaad --enable-pp 
--enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm 
--enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip 
--enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec 
--disable-vis --enable-shared --disable-static

 libavutil version: 49.6.0
 libavcodec version: 51.50.0
 libavformat version: 52.7.0
 libavdevice version: 52.0.0
 built on Apr 28 2009 02:12:01, gcc: 4.3.2

Though ffmpeg is statically linked I assume it use the same library 
versions as the share libraries.


Lenard

Tyler Laing wrote:
And I've now committed a fix for throwing exceptions if the surface 
given has the wrong aspect ratio.


-Tyler

On Thu, Aug 20, 2009 at 9:46 AM, Tyler Laing > wrote:


I have this fixed, with it committed in revision 2628. I have a
custom Dependency class that adds extra directories to the include
search path(like libavformat or ffmpeg). This prevents any
accidental conflict of namespaces. Let me know if this works or not.

-Tyler


On Tue, Aug 18, 2009 at 5:17 PM, Lenard Lindstrom mailto:le...@telus.net>> wrote:

Hi,

No, I don't see any Debian specific predefined compiler
macros. ffmpeg library information is available through
pkg-config.

Lenard

Tyler Laing wrote:

Does debian have a unique compile time flag I can use?

-Tyler

On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom
mailto:le...@telus.net>
>> wrote:

   Hi Tyler,

   /usr/include is included in the default header search
paths. What
   is installed is /usr/include/ffmpeg/avformat.h, not
   /usr/include/ffmpeg/libavformat/avformat.h. This may be
a quirk of
   the Debian dev package and not the general case.

   Lenard

   Tyler Laing wrote:

   You don't have -l/usr/include actually. What I will
do is add
   to the directories searched, for the specific
libraries to
   search in /usr/include/ffmpeg && /usr/include/ for if people install from source.
Does that
   sound like a good solution?

   -Tyler

   On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom
   mailto:le...@telus.net>
>
   


Re: [pygame] Re: Movie module being merged

2009-08-20 Thread Tyler Laing
And I've now committed a fix for throwing exceptions if the surface given
has the wrong aspect ratio.

-Tyler

On Thu, Aug 20, 2009 at 9:46 AM, Tyler Laing  wrote:

> I have this fixed, with it committed in revision 2628. I have a custom
> Dependency class that adds extra directories to the include search path(like
> libavformat or ffmpeg). This prevents any accidental conflict of namespaces.
> Let me know if this works or not.
>
> -Tyler
>
>
> On Tue, Aug 18, 2009 at 5:17 PM, Lenard Lindstrom  wrote:
>
>> Hi,
>>
>> No, I don't see any Debian specific predefined compiler macros. ffmpeg
>> library information is available through pkg-config.
>>
>> Lenard
>>
>> Tyler Laing wrote:
>>
>>> Does debian have a unique compile time flag I can use?
>>>
>>> -Tyler
>>>
>>> On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom >> le...@telus.net>> wrote:
>>>
>>>Hi Tyler,
>>>
>>>/usr/include is included in the default header search paths. What
>>>is installed is /usr/include/ffmpeg/avformat.h, not
>>>/usr/include/ffmpeg/libavformat/avformat.h. This may be a quirk of
>>>the Debian dev package and not the general case.
>>>
>>>Lenard
>>>
>>>Tyler Laing wrote:
>>>
>>>You don't have -l/usr/include actually. What I will do is add
>>>to the directories searched, for the specific libraries to
>>>search in /usr/include/ffmpeg && /usr/include/>>library name> for if people install from source. Does that
>>>sound like a good solution?
>>>
>>>-Tyler
>>>
>>>On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom
>>>mailto:le...@telus.net>
>>>>> wrote:
>>>
>>>   Ok, when I add
>>>
>>>   _movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c
>>>   $(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)
>>>
>>>   to Setup I get these build errors:
>>>
>>>
>>>   building 'pygame._movie' extension
>>>   gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>>   -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>>   -I/usr/include/SDL -I/usr/include/SDL
>>>-I/usr/include/python2.5 -c
>>>   src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
>>>   In file included from src/_gsound.c:35:
>>>   src/_gsound.h:36:34: error: libavformat/avformat.h: No such
>>>file
>>>   or directory
>>>   src/_gsound.c: In function ‘seekBuffer’:
>>>   src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared
>>>(first use
>>>   in this function)
>>>   src/_gsound.c:403: error: (Each undeclared identifier is
>>>reported
>>>   only once
>>>   src/_gsound.c:403: error: for each function it appears in.)
>>>   error: command 'gcc' failed with exit status 1
>>>
>>>   The Debian dev package installs avformat.h in ffmpeg, not
>>>libavformat.
>>>
>>>   Lenard
>>>
>>>
>>>   Lenard Lindstrom wrote:
>>>
>>>   Hi René,
>>>
>>>   My mistake. I didn't pay attention to the error.
>>>_movie.so was
>>>   not event built since the _movie entry is missing in
>>>Setup.in.
>>>   I had to manually enter it to Setup the last time, and that
>>>   was clobbered when I reran config.py.
>>>
>>>   Lenard
>>>
>>>
>>>   René Dudfield wrote:
>>>
>>>   On Tue, Aug 18, 2009 at 4:47 PM, Lenard
>>>   Lindstrommailto:le...@telus.net>
>>>>> wrote:
>>>
>>>   Hi Tyler,
>>>
>>>   The module now builds, but the _movie_test.py unit
>>>   tests fail:
>>>
>>>   ERROR: MovieTypeTest.test_height
>>>
>>> --
>>>   Traceback (most recent call last):
>>>   File
>>>
>>> "/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",
>>>
>>>   line 125, in test_height
>>>   movie = gmovie.Movie(movie_file)
>>>   AttributeError: 'NoneType' object has no
>>>attribute 'Movie'
>>>
>>>   If "movie_file" is missing shouldn't gmovie.Movie
>>>   raise an exception?
>>>
>>>   Lenard
>>>
>>>
>>>   hi,
>>>
>>>   check out the try/except at the top of that test...
>>>maybe
>>>   it is
>>>   raising an exception, and catching it.
>>>
>>>   that try/except was added to try and get the build
>>>bot to
>>>   build again.
>>>
>>>   cheers,
>>>
>>>
>>>
>>>
>>>
>>>
>>>--Visit my blog at http://oddco.ca/zeroth/z

Re: [pygame] Re: Movie module being merged

2009-08-20 Thread Tyler Laing
I have this fixed, with it committed in revision 2628. I have a custom
Dependency class that adds extra directories to the include search path(like
libavformat or ffmpeg). This prevents any accidental conflict of namespaces.
Let me know if this works or not.

-Tyler

On Tue, Aug 18, 2009 at 5:17 PM, Lenard Lindstrom  wrote:

> Hi,
>
> No, I don't see any Debian specific predefined compiler macros. ffmpeg
> library information is available through pkg-config.
>
> Lenard
>
> Tyler Laing wrote:
>
>> Does debian have a unique compile time flag I can use?
>>
>> -Tyler
>>
>> On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom > le...@telus.net>> wrote:
>>
>>Hi Tyler,
>>
>>/usr/include is included in the default header search paths. What
>>is installed is /usr/include/ffmpeg/avformat.h, not
>>/usr/include/ffmpeg/libavformat/avformat.h. This may be a quirk of
>>the Debian dev package and not the general case.
>>
>>Lenard
>>
>>Tyler Laing wrote:
>>
>>You don't have -l/usr/include actually. What I will do is add
>>to the directories searched, for the specific libraries to
>>search in /usr/include/ffmpeg && /usr/include/>library name> for if people install from source. Does that
>>sound like a good solution?
>>
>>-Tyler
>>
>>On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom
>>mailto:le...@telus.net>
>>>> wrote:
>>
>>   Ok, when I add
>>
>>   _movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c
>>   $(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)
>>
>>   to Setup I get these build errors:
>>
>>
>>   building 'pygame._movie' extension
>>   gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>   -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>   -I/usr/include/SDL -I/usr/include/SDL
>>-I/usr/include/python2.5 -c
>>   src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
>>   In file included from src/_gsound.c:35:
>>   src/_gsound.h:36:34: error: libavformat/avformat.h: No such
>>file
>>   or directory
>>   src/_gsound.c: In function ‘seekBuffer’:
>>   src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared
>>(first use
>>   in this function)
>>   src/_gsound.c:403: error: (Each undeclared identifier is
>>reported
>>   only once
>>   src/_gsound.c:403: error: for each function it appears in.)
>>   error: command 'gcc' failed with exit status 1
>>
>>   The Debian dev package installs avformat.h in ffmpeg, not
>>libavformat.
>>
>>   Lenard
>>
>>
>>   Lenard Lindstrom wrote:
>>
>>   Hi René,
>>
>>   My mistake. I didn't pay attention to the error.
>>_movie.so was
>>   not event built since the _movie entry is missing in
>>Setup.in.
>>   I had to manually enter it to Setup the last time, and that
>>   was clobbered when I reran config.py.
>>
>>   Lenard
>>
>>
>>   René Dudfield wrote:
>>
>>   On Tue, Aug 18, 2009 at 4:47 PM, Lenard
>>   Lindstrommailto:le...@telus.net>
>>>> wrote:
>>
>>   Hi Tyler,
>>
>>   The module now builds, but the _movie_test.py unit
>>   tests fail:
>>
>>   ERROR: MovieTypeTest.test_height
>>
>> --
>>   Traceback (most recent call last):
>>   File
>>
>> "/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",
>>
>>   line 125, in test_height
>>   movie = gmovie.Movie(movie_file)
>>   AttributeError: 'NoneType' object has no
>>attribute 'Movie'
>>
>>   If "movie_file" is missing shouldn't gmovie.Movie
>>   raise an exception?
>>
>>   Lenard
>>
>>
>>   hi,
>>
>>   check out the try/except at the top of that test...
>>maybe
>>   it is
>>   raising an exception, and catching it.
>>
>>   that try/except was added to try and get the build
>>bot to
>>   build again.
>>
>>   cheers,
>>
>>
>>
>>
>>
>>
>>--Visit my blog at http://oddco.ca/zeroth/zblog
>>
>>
>>
>>
>>
>> --
>> Visit my blog at http://oddco.ca/zeroth/zblog
>>
>
>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-19 Thread Tyler Laing
Okay, I'll do those in a couple of days. To enable multiple movie playback,
I'd have to go a layer deeper and use SDL_Audio directly, as there is no way
to store a void * reference to the movie object with SDL_mixer. Thanks. :)

On Wed, Aug 19, 2009 at 12:49 AM, René Dudfield  wrote:

> On Tue, Aug 18, 2009 at 5:11 PM, Tyler Laing wrote:
> > It could be. That, however, increases the coupling between the sound
> > subsystem and the movie module. If you want me to, I will, but I would
> need
> > to consider how best to make sure the sound subsystem can be replaced on
> > demand.
> >
>
> ah, yeah.  Good to keep that coupling low.  I guess it would need one
> of those for each movie instance.
>
> Or for now, we can just limit movie playback to one at a time... and
> change it later to support multiple movies in the future.  That's the
> main use case anyway.
>
>
> > And then for separate movie screens, it would be entirely possible if you
> > just give different surfaces to each movie object. You're correct there.
> I'm
> > going to add a MovieInfo object, which will do all the same sort of setup
> > stuff, but can give the user info about their movie file, for dynamic
> use.
>
> ok, that sounds good.
>
> > As well, there is an issue if you give a surface to the movie object that
> > does not have the same aspect ratio as the video file. This is what was
> > causing the weird image corruption issues before. I'm not sure how I can
> > programmatically solve that, beyond maybe throwing an exception if the
> given
> > surface does not have the same aspect ratio.
> >
>
> yeah, I think just raising an exception if the supplied surface is the
> wrong size is fine.  That's something that could be added later
> really.
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-19 Thread René Dudfield
On Tue, Aug 18, 2009 at 5:11 PM, Tyler Laing wrote:
> It could be. That, however, increases the coupling between the sound
> subsystem and the movie module. If you want me to, I will, but I would need
> to consider how best to make sure the sound subsystem can be replaced on
> demand.
>

ah, yeah.  Good to keep that coupling low.  I guess it would need one
of those for each movie instance.

Or for now, we can just limit movie playback to one at a time... and
change it later to support multiple movies in the future.  That's the
main use case anyway.


> And then for separate movie screens, it would be entirely possible if you
> just give different surfaces to each movie object. You're correct there. I'm
> going to add a MovieInfo object, which will do all the same sort of setup
> stuff, but can give the user info about their movie file, for dynamic use.

ok, that sounds good.

> As well, there is an issue if you give a surface to the movie object that
> does not have the same aspect ratio as the video file. This is what was
> causing the weird image corruption issues before. I'm not sure how I can
> programmatically solve that, beyond maybe throwing an exception if the given
> surface does not have the same aspect ratio.
>

yeah, I think just raising an exception if the supplied surface is the
wrong size is fine.  That's something that could be added later
really.


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Lenard Lindstrom

Hi,

No, I don't see any Debian specific predefined compiler macros. ffmpeg 
library information is available through pkg-config.


Lenard

Tyler Laing wrote:

Does debian have a unique compile time flag I can use?

-Tyler

On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom > wrote:


Hi Tyler,

/usr/include is included in the default header search paths. What
is installed is /usr/include/ffmpeg/avformat.h, not
/usr/include/ffmpeg/libavformat/avformat.h. This may be a quirk of
the Debian dev package and not the general case.

Lenard

Tyler Laing wrote:

You don't have -l/usr/include actually. What I will do is add
to the directories searched, for the specific libraries to
search in /usr/include/ffmpeg && /usr/include/ for if people install from source. Does that
sound like a good solution?

-Tyler

On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom
mailto:le...@telus.net>
>> wrote:

   Ok, when I add

   _movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c
   $(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)

   to Setup I get these build errors:


   building 'pygame._movie' extension
   gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
   -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
   -I/usr/include/SDL -I/usr/include/SDL
-I/usr/include/python2.5 -c
   src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
   In file included from src/_gsound.c:35:
   src/_gsound.h:36:34: error: libavformat/avformat.h: No such
file
   or directory
   src/_gsound.c: In function ‘seekBuffer’:
   src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared
(first use
   in this function)
   src/_gsound.c:403: error: (Each undeclared identifier is
reported
   only once
   src/_gsound.c:403: error: for each function it appears in.)
   error: command 'gcc' failed with exit status 1

   The Debian dev package installs avformat.h in ffmpeg, not
libavformat.

   Lenard


   Lenard Lindstrom wrote:

   Hi René,

   My mistake. I didn't pay attention to the error.
_movie.so was
   not event built since the _movie entry is missing in
Setup.in.
   I had to manually enter it to Setup the last time, and that
   was clobbered when I reran config.py.

   Lenard


   René Dudfield wrote:

   On Tue, Aug 18, 2009 at 4:47 PM, Lenard
   Lindstrommailto:le...@telus.net>
>> wrote:

   Hi Tyler,

   The module now builds, but the _movie_test.py unit
   tests fail:

   ERROR: MovieTypeTest.test_height
 
 --

   Traceback (most recent call last):
   File
 
 "/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",


   line 125, in test_height
   movie = gmovie.Movie(movie_file)
   AttributeError: 'NoneType' object has no
attribute 'Movie'

   If "movie_file" is missing shouldn't gmovie.Movie
   raise an exception?

   Lenard


   hi,

   check out the try/except at the top of that test...
maybe
   it is
   raising an exception, and catching it.

   that try/except was added to try and get the build
bot to
   build again.

   cheers,






-- 
Visit my blog at http://oddco.ca/zeroth/zblog






--
Visit my blog at http://oddco.ca/zeroth/zblog





Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Tyler Laing
Does debian have a unique compile time flag I can use?

-Tyler

On Tue, Aug 18, 2009 at 12:09 PM, Lenard Lindstrom  wrote:

> Hi Tyler,
>
> /usr/include is included in the default header search paths. What is
> installed is /usr/include/ffmpeg/avformat.h, not
> /usr/include/ffmpeg/libavformat/avformat.h. This may be a quirk of the
> Debian dev package and not the general case.
>
> Lenard
>
> Tyler Laing wrote:
>
>> You don't have -l/usr/include actually. What I will do is add to the
>> directories searched, for the specific libraries to search in
>> /usr/include/ffmpeg && /usr/include/ for if people
>> install from source. Does that sound like a good solution?
>>
>> -Tyler
>>
>> On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom > le...@telus.net>> wrote:
>>
>>Ok, when I add
>>
>>_movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c
>>$(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)
>>
>>to Setup I get these build errors:
>>
>>
>>building 'pygame._movie' extension
>>gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>-I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c
>>src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
>>In file included from src/_gsound.c:35:
>>src/_gsound.h:36:34: error: libavformat/avformat.h: No such file
>>or directory
>>src/_gsound.c: In function ‘seekBuffer’:
>>src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use
>>in this function)
>>src/_gsound.c:403: error: (Each undeclared identifier is reported
>>only once
>>src/_gsound.c:403: error: for each function it appears in.)
>>error: command 'gcc' failed with exit status 1
>>
>>The Debian dev package installs avformat.h in ffmpeg, not libavformat.
>>
>>Lenard
>>
>>
>>Lenard Lindstrom wrote:
>>
>>Hi René,
>>
>>My mistake. I didn't pay attention to the error. _movie.so was
>>not event built since the _movie entry is missing in Setup.in.
>>I had to manually enter it to Setup the last time, and that
>>was clobbered when I reran config.py.
>>
>>Lenard
>>
>>
>>René Dudfield wrote:
>>
>>On Tue, Aug 18, 2009 at 4:47 PM, Lenard
>>Lindstrommailto:le...@telus.net>> wrote:
>>
>>Hi Tyler,
>>
>>The module now builds, but the _movie_test.py unit
>>tests fail:
>>
>>ERROR: MovieTypeTest.test_height
>>
>>  --
>>Traceback (most recent call last):
>>File
>>
>>  
>> "/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",
>>
>>line 125, in test_height
>>movie = gmovie.Movie(movie_file)
>>AttributeError: 'NoneType' object has no attribute 'Movie'
>>
>>If "movie_file" is missing shouldn't gmovie.Movie
>>raise an exception?
>>
>>Lenard
>>
>>
>>hi,
>>
>>check out the try/except at the top of that test... maybe
>>it is
>>raising an exception, and catching it.
>>
>>that try/except was added to try and get the build bot to
>>build again.
>>
>>cheers,
>>
>>
>>
>>
>>
>>
>> --
>> Visit my blog at http://oddco.ca/zeroth/zblog
>>
>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Lenard Lindstrom

Hi Tyler,

/usr/include is included in the default header search paths. What is 
installed is /usr/include/ffmpeg/avformat.h, not 
/usr/include/ffmpeg/libavformat/avformat.h. This may be a quirk of the 
Debian dev package and not the general case.


Lenard

Tyler Laing wrote:
You don't have -l/usr/include actually. What I will do is add to the 
directories searched, for the specific libraries to search in 
/usr/include/ffmpeg && /usr/include/ for if 
people install from source. Does that sound like a good solution?


-Tyler

On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom > wrote:


Ok, when I add

_movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c
$(SDL) $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)

to Setup I get these build errors:


building 'pygame._movie' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
-I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c
src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
In file included from src/_gsound.c:35:
src/_gsound.h:36:34: error: libavformat/avformat.h: No such file
or directory
src/_gsound.c: In function ‘seekBuffer’:
src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use
in this function)
src/_gsound.c:403: error: (Each undeclared identifier is reported
only once
src/_gsound.c:403: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1

The Debian dev package installs avformat.h in ffmpeg, not libavformat.

Lenard


Lenard Lindstrom wrote:

Hi René,

My mistake. I didn't pay attention to the error. _movie.so was
not event built since the _movie entry is missing in Setup.in.
I had to manually enter it to Setup the last time, and that
was clobbered when I reran config.py.

Lenard


René Dudfield wrote:

On Tue, Aug 18, 2009 at 4:47 PM, Lenard
Lindstrommailto:le...@telus.net>> wrote:

Hi Tyler,

The module now builds, but the _movie_test.py unit
tests fail:

ERROR: MovieTypeTest.test_height

--
Traceback (most recent call last):
File

"/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",

line 125, in test_height
movie = gmovie.Movie(movie_file)
AttributeError: 'NoneType' object has no attribute 'Movie'

If "movie_file" is missing shouldn't gmovie.Movie
raise an exception?

Lenard


hi,

check out the try/except at the top of that test... maybe
it is
raising an exception, and catching it.

that try/except was added to try and get the build bot to
build again.

cheers,






--
Visit my blog at http://oddco.ca/zeroth/zblog




Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Tyler Laing
You don't have -l/usr/include actually. What I will do is add to the
directories searched, for the specific libraries to search in
/usr/include/ffmpeg && /usr/include/ for if people
install from source. Does that sound like a good solution?

-Tyler

On Tue, Aug 18, 2009 at 9:03 AM, Lenard Lindstrom  wrote:

> Ok, when I add
>
> _movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c $(SDL)
> $(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)
>
> to Setup I get these build errors:
>
> building 'pygame._movie' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
> -I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c
> src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
> In file included from src/_gsound.c:35:
> src/_gsound.h:36:34: error: libavformat/avformat.h: No such file or
> directory
> src/_gsound.c: In function ‘seekBuffer’:
> src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use in this
> function)
> src/_gsound.c:403: error: (Each undeclared identifier is reported only once
> src/_gsound.c:403: error: for each function it appears in.)
> error: command 'gcc' failed with exit status 1
>
> The Debian dev package installs avformat.h in ffmpeg, not libavformat.
>
> Lenard
>
>
> Lenard Lindstrom wrote:
>
>> Hi René,
>>
>> My mistake. I didn't pay attention to the error. _movie.so was not event
>> built since the _movie entry is missing in Setup.in. I had to manually enter
>> it to Setup the last time, and that was clobbered when I reran config.py.
>>
>> Lenard
>>
>>
>> René Dudfield wrote:
>>
>>> On Tue, Aug 18, 2009 at 4:47 PM, Lenard Lindstrom
>>> wrote:
>>>
 Hi Tyler,

 The module now builds, but the _movie_test.py unit tests fail:

 ERROR: MovieTypeTest.test_height
 --
 Traceback (most recent call last):
 File
 "/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",

 line 125, in test_height
 movie = gmovie.Movie(movie_file)
 AttributeError: 'NoneType' object has no attribute 'Movie'

 If "movie_file" is missing shouldn't gmovie.Movie raise an exception?

 Lenard


>>> hi,
>>>
>>> check out the try/except at the top of that test... maybe it is
>>> raising an exception, and catching it.
>>>
>>> that try/except was added to try and get the build bot to build again.
>>>
>>> cheers,
>>>
>>
>>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Tyler Laing
It could be. That, however, increases the coupling between the sound
subsystem and the movie module. If you want me to, I will, but I would need
to consider how best to make sure the sound subsystem can be replaced on
demand.

And then for separate movie screens, it would be entirely possible if you
just give different surfaces to each movie object. You're correct there. I'm
going to add a MovieInfo object, which will do all the same sort of setup
stuff, but can give the user info about their movie file, for dynamic use.
As well, there is an issue if you give a surface to the movie object that
does not have the same aspect ratio as the video file. This is what was
causing the weird image corruption issues before. I'm not sure how I can
programmatically solve that, beyond maybe throwing an exception if the given
surface does not have the same aspect ratio.

-Tyler

On Tue, Aug 18, 2009 at 8:49 AM, René Dudfield  wrote:

> On Tue, Aug 18, 2009 at 4:22 PM, Tyler Laing wrote:
> > Running at the same time? No. Unless there is a way to have multiple
> > separate SDL screens. Even then, it will be an issue as there is a global
> > struct used to record info in the sound module. Otherwise, everything
> else
> > can be instantiated per movie.
> >
> > -Tyler
> >
>
> I guess that struct can be moved into a Movie instance?  Then getting
> the movie to write onto a separate surface each, rather than using the
> Overlay calls directly might work.
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Lenard Lindstrom

Ok, when I add

_movie src/_gsound.c src/_gmovie.c src/_gcommand.c src/gmovie.c $(SDL) 
$(AVFORMAT) $(SWSCALE) $(MIXER) $(DEBUG)


to Setup I get these build errors:

building 'pygame._movie' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include 
-I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c 
src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o

In file included from src/_gsound.c:35:
src/_gsound.h:36:34: error: libavformat/avformat.h: No such file or 
directory

src/_gsound.c: In function ‘seekBuffer’:
src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use in this 
function)

src/_gsound.c:403: error: (Each undeclared identifier is reported only once
src/_gsound.c:403: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1

The Debian dev package installs avformat.h in ffmpeg, not libavformat.

Lenard

Lenard Lindstrom wrote:

Hi René,

My mistake. I didn't pay attention to the error. _movie.so was not 
event built since the _movie entry is missing in Setup.in. I had to 
manually enter it to Setup the last time, and that was clobbered when 
I reran config.py.


Lenard


René Dudfield wrote:
On Tue, Aug 18, 2009 at 4:47 PM, Lenard Lindstrom 
wrote:

Hi Tyler,

The module now builds, but the _movie_test.py unit tests fail:

ERROR: MovieTypeTest.test_height
--
Traceback (most recent call last):
File
"/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py", 


line 125, in test_height
movie = gmovie.Movie(movie_file)
AttributeError: 'NoneType' object has no attribute 'Movie'

If "movie_file" is missing shouldn't gmovie.Movie raise an exception?

Lenard



hi,

check out the try/except at the top of that test... maybe it is
raising an exception, and catching it.

that try/except was added to try and get the build bot to build again.

cheers,






Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Lenard Lindstrom

Hi René,

My mistake. I didn't pay attention to the error. _movie.so was not event 
built since the _movie entry is missing in Setup.in. I had to manually 
enter it to Setup the last time, and that was clobbered when I reran 
config.py.


Lenard


René Dudfield wrote:

On Tue, Aug 18, 2009 at 4:47 PM, Lenard Lindstrom wrote:
  

Hi Tyler,

The module now builds, but the _movie_test.py unit tests fail:

ERROR: MovieTypeTest.test_height
--
Traceback (most recent call last):
 File
"/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",
line 125, in test_height
  movie = gmovie.Movie(movie_file)
AttributeError: 'NoneType' object has no attribute 'Movie'

If "movie_file" is missing shouldn't gmovie.Movie raise an exception?

Lenard




hi,

check out the try/except at the top of that test...  maybe it is
raising an exception, and catching it.

that try/except was added to try and get the build bot to build again.

cheers,
  




Re: [pygame] Re: Movie module being merged

2009-08-18 Thread René Dudfield
On Tue, Aug 18, 2009 at 4:22 PM, Tyler Laing wrote:
> Running at the same time? No. Unless there is a way to have multiple
> separate SDL screens. Even then, it will be an issue as there is a global
> struct used to record info in the sound module. Otherwise, everything else
> can be instantiated per movie.
>
> -Tyler
>

I guess that struct can be moved into a Movie instance?  Then getting
the movie to write onto a separate surface each, rather than using the
Overlay calls directly might work.


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread René Dudfield
On Tue, Aug 18, 2009 at 4:47 PM, Lenard Lindstrom wrote:
> Hi Tyler,
>
> The module now builds, but the _movie_test.py unit tests fail:
>
> ERROR: MovieTypeTest.test_height
> --
> Traceback (most recent call last):
>  File
> "/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py",
> line 125, in test_height
>   movie = gmovie.Movie(movie_file)
> AttributeError: 'NoneType' object has no attribute 'Movie'
>
> If "movie_file" is missing shouldn't gmovie.Movie raise an exception?
>
> Lenard
>

hi,

check out the try/except at the top of that test...  maybe it is
raising an exception, and catching it.

that try/except was added to try and get the build bot to build again.

cheers,


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Lenard Lindstrom

Hi Tyler,

The module now builds, but the _movie_test.py unit tests fail:

ERROR: MovieTypeTest.test_height
--
Traceback (most recent call last):
 File 
"/home/lenard/.local/lib/python2.5/site-packages/pygame/tests/_movie_test.py", 
line 125, in test_height

   movie = gmovie.Movie(movie_file)
AttributeError: 'NoneType' object has no attribute 'Movie'

If "movie_file" is missing shouldn't gmovie.Movie raise an exception?

Lenard

Tyler Laing wrote:
Thanks Rene, Lenard. I've committed a fix for the compile issues you 
sent me lenard, it should work now, but let me know if it doesn't.


Rene, is the movie test set to interactive?

-Tyler

On Tue, Aug 18, 2009 at 3:59 AM, René Dudfield > wrote:


hi,

I made the _movie test only run on linux so far, with the
test/_movie_tags.py file.

Just a note if you're testing on non-linux platforms and the tests
don't appear to run anymore.


cheers,


On Mon, Aug 17, 2009 at 11:54 PM, Tyler Laingmailto:trinio...@gmail.com>> wrote:
> strange, I put in if checks around those... I'll fix that
tomorrow. Thanks
> for the report Lenard.
>
> -Tyler
>
> On Mon, Aug 17, 2009 at 12:57 PM, Lenard Lindstrom
mailto:le...@telus.net>> wrote:
>>
>> Never mind. The stable ffmpeg libraries for Debian are too outdated
>> anyway:
>>
>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>> -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
>> -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
>> build/temp.linux-i686-2.5/src/_gmovie.o
>> src/_gmovie.c: In function ‘video_image_display’:
>> src/_gmovie.c:530: error: ‘AVStream’ has no member named
>> ‘sample_aspect_ratio’
>> 
>> src/_gmovie.c: In function ‘initialize_codec’:
>> src/_gmovie.c:1685: error: ‘AVCodecContext’ has no member named
>> ‘error_recognition’
>> src/_gmovie.c: In function ‘decoder’:
>> src/_gmovie.c:2213: error: ‘AVERROR_EOF’ undeclared (first use
in this
>> function)
>> 
>> src/_gmovie.c: In function ‘video_render’:
>> src/_gmovie.c:2440: error: ‘AVCodecContext’ has no member named
>> ‘reordered_opaque’
>> 
>> error: command 'gcc' failed with exit status 1
>>
>> Lenard
>>
>> Lenard Lindstrom wrote:
>>>
>>> Hi Tyler,
>>>
>>> Sorry for the bad news but _movie.so fails to build under Debian
>>> lenny:building 'pygame._movie' extension
>>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>> -I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c
>>> src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
>>> In file included from src/_gsound.c:35:
>>> src/_gsound.h:36:34: error: libavformat/avformat.h: No such
file or
>>> directory
>>> src/_gsound.c: In function ‘seekBuffer’:
>>> src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first
use in this
>>> function)
>>> src/_gsound.c:403: error: (Each undeclared identifier is
reported only
>>> once
>>> src/_gsound.c:403: error: for each function it appears in.)
>>> error: command 'gcc' failed with exit status 1
>>>
>>> I am using the Debian ffmpeg dev packages in the build.
Unfortunately the
>>> dev packages install all the ffmpeg library headers under
lib/ffmpeg. There
>>> is no lib/libavformat and such. And there is no ffmpeg-config or
>>> avformat-config to discover were the headers are. I don't know
how best to
>>> handle this. I suppose -I/usr/lib/ffmpeg
-I/usr/lib/libavformat flags can be
>>> added to Setup. Whatever is done all absolute includes like:
>>>
>>> #include 
>>>
>>> need to be replace with locale includes:
>>>
>>> #include 
>>>
>>> Lenard
>>>
>>> Tyler Laing wrote:

 What I forgot to say is, let me know, I will be beginning a
merge at 2
 pm.

 -Tyler

 On Sun, Aug 16, 2009 at 12:53 PM, Tyler Laing
mailto:trinio...@gmail.com>
 >> wrote:

I will be beginning the process of merging the movie
module branch
into the main branch.

As it stands, the ffmpeg movie backend compiles. The vlc
backend
isn't quite feature complete, and doesn't work with older
vlc's
unfortunately.

I would say that the nmovie module is only at a alpha
stage, and
needs a lot more widespread testing.

If you have any questions, send me an email :)

-Tyler

Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Tyler Laing
Running at the same time? No. Unless there is a way to have multiple
separate SDL screens. Even then, it will be an issue as there is a global
struct used to record info in the sound module. Otherwise, everything else
can be instantiated per movie.

-Tyler

On Tue, Aug 18, 2009 at 7:55 AM, René Dudfield  wrote:

> On Tue, Aug 18, 2009 at 3:41 PM, Tyler Laing wrote:
> > Thanks Rene, Lenard. I've committed a fix for the compile issues you sent
> me
> > lenard, it should work now, but let me know if it doesn't.
> >
> > Rene, is the movie test set to interactive?
> >
> > -Tyler
>
> Hi,
>
> I moved __movie_test.py into examples/ since it wasn't setup like a
> unittest, and caused run_test.py to fail.
>
> Restructuring it into a unittest with an interactive tag would probably be
> best.
>
> btw, will the movie module work with multiple movies?
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread René Dudfield
On Tue, Aug 18, 2009 at 3:41 PM, Tyler Laing wrote:
> Thanks Rene, Lenard. I've committed a fix for the compile issues you sent me
> lenard, it should work now, but let me know if it doesn't.
>
> Rene, is the movie test set to interactive?
>
> -Tyler

Hi,

I moved __movie_test.py into examples/ since it wasn't setup like a
unittest, and caused run_test.py to fail.

Restructuring it into a unittest with an interactive tag would probably be best.

btw, will the movie module work with multiple movies?


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread Tyler Laing
Thanks Rene, Lenard. I've committed a fix for the compile issues you sent me
lenard, it should work now, but let me know if it doesn't.

Rene, is the movie test set to interactive?

-Tyler

On Tue, Aug 18, 2009 at 3:59 AM, René Dudfield  wrote:

> hi,
>
> I made the _movie test only run on linux so far, with the
> test/_movie_tags.py file.
>
> Just a note if you're testing on non-linux platforms and the tests
> don't appear to run anymore.
>
>
> cheers,
>
>
> On Mon, Aug 17, 2009 at 11:54 PM, Tyler Laing wrote:
> > strange, I put in if checks around those... I'll fix that tomorrow.
> Thanks
> > for the report Lenard.
> >
> > -Tyler
> >
> > On Mon, Aug 17, 2009 at 12:57 PM, Lenard Lindstrom 
> wrote:
> >>
> >> Never mind. The stable ffmpeg libraries for Debian are too outdated
> >> anyway:
> >>
> >> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> >> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
> >> -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
> >> -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
> >> build/temp.linux-i686-2.5/src/_gmovie.o
> >> src/_gmovie.c: In function ‘video_image_display’:
> >> src/_gmovie.c:530: error: ‘AVStream’ has no member named
> >> ‘sample_aspect_ratio’
> >> 
> >> src/_gmovie.c: In function ‘initialize_codec’:
> >> src/_gmovie.c:1685: error: ‘AVCodecContext’ has no member named
> >> ‘error_recognition’
> >> src/_gmovie.c: In function ‘decoder’:
> >> src/_gmovie.c:2213: error: ‘AVERROR_EOF’ undeclared (first use in this
> >> function)
> >> 
> >> src/_gmovie.c: In function ‘video_render’:
> >> src/_gmovie.c:2440: error: ‘AVCodecContext’ has no member named
> >> ‘reordered_opaque’
> >> 
> >> error: command 'gcc' failed with exit status 1
> >>
> >> Lenard
> >>
> >> Lenard Lindstrom wrote:
> >>>
> >>> Hi Tyler,
> >>>
> >>> Sorry for the bad news but _movie.so fails to build under Debian
> >>> lenny:building 'pygame._movie' extension
> >>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> >>> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
> >>> -I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c
> >>> src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
> >>> In file included from src/_gsound.c:35:
> >>> src/_gsound.h:36:34: error: libavformat/avformat.h: No such file or
> >>> directory
> >>> src/_gsound.c: In function ‘seekBuffer’:
> >>> src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use in
> this
> >>> function)
> >>> src/_gsound.c:403: error: (Each undeclared identifier is reported only
> >>> once
> >>> src/_gsound.c:403: error: for each function it appears in.)
> >>> error: command 'gcc' failed with exit status 1
> >>>
> >>> I am using the Debian ffmpeg dev packages in the build. Unfortunately
> the
> >>> dev packages install all the ffmpeg library headers under lib/ffmpeg.
> There
> >>> is no lib/libavformat and such. And there is no ffmpeg-config or
> >>> avformat-config to discover were the headers are. I don't know how best
> to
> >>> handle this. I suppose -I/usr/lib/ffmpeg -I/usr/lib/libavformat flags
> can be
> >>> added to Setup. Whatever is done all absolute includes like:
> >>>
> >>> #include 
> >>>
> >>> need to be replace with locale includes:
> >>>
> >>> #include 
> >>>
> >>> Lenard
> >>>
> >>> Tyler Laing wrote:
> 
>  What I forgot to say is, let me know, I will be beginning a merge at 2
>  pm.
> 
>  -Tyler
> 
>  On Sun, Aug 16, 2009 at 12:53 PM, Tyler Laing   > wrote:
> 
> I will be beginning the process of merging the movie module branch
> into the main branch.
> 
> As it stands, the ffmpeg movie backend compiles. The vlc backend
> isn't quite feature complete, and doesn't work with older vlc's
> unfortunately.
> 
> I would say that the nmovie module is only at a alpha stage, and
> needs a lot more widespread testing.
> 
> If you have any questions, send me an email :)
> 
> -Tyler
> -- Visit my blog at http://oddco.ca/zeroth/zblog
> 
> 
> 
> 
>  --
>  Visit my blog at http://oddco.ca/zeroth/zblog
> >>>
> >>
> >
> >
> >
> > --
> > Visit my blog at http://oddco.ca/zeroth/zblog
> >
>



-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-18 Thread René Dudfield
hi,

I made the _movie test only run on linux so far, with the
test/_movie_tags.py file.

Just a note if you're testing on non-linux platforms and the tests
don't appear to run anymore.


cheers,


On Mon, Aug 17, 2009 at 11:54 PM, Tyler Laing wrote:
> strange, I put in if checks around those... I'll fix that tomorrow. Thanks
> for the report Lenard.
>
> -Tyler
>
> On Mon, Aug 17, 2009 at 12:57 PM, Lenard Lindstrom  wrote:
>>
>> Never mind. The stable ffmpeg libraries for Debian are too outdated
>> anyway:
>>
>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>> -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
>> -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
>> build/temp.linux-i686-2.5/src/_gmovie.o
>> src/_gmovie.c: In function ‘video_image_display’:
>> src/_gmovie.c:530: error: ‘AVStream’ has no member named
>> ‘sample_aspect_ratio’
>> 
>> src/_gmovie.c: In function ‘initialize_codec’:
>> src/_gmovie.c:1685: error: ‘AVCodecContext’ has no member named
>> ‘error_recognition’
>> src/_gmovie.c: In function ‘decoder’:
>> src/_gmovie.c:2213: error: ‘AVERROR_EOF’ undeclared (first use in this
>> function)
>> 
>> src/_gmovie.c: In function ‘video_render’:
>> src/_gmovie.c:2440: error: ‘AVCodecContext’ has no member named
>> ‘reordered_opaque’
>> 
>> error: command 'gcc' failed with exit status 1
>>
>> Lenard
>>
>> Lenard Lindstrom wrote:
>>>
>>> Hi Tyler,
>>>
>>> Sorry for the bad news but _movie.so fails to build under Debian
>>> lenny:building 'pygame._movie' extension
>>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>>> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>>> -I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c
>>> src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
>>> In file included from src/_gsound.c:35:
>>> src/_gsound.h:36:34: error: libavformat/avformat.h: No such file or
>>> directory
>>> src/_gsound.c: In function ‘seekBuffer’:
>>> src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use in this
>>> function)
>>> src/_gsound.c:403: error: (Each undeclared identifier is reported only
>>> once
>>> src/_gsound.c:403: error: for each function it appears in.)
>>> error: command 'gcc' failed with exit status 1
>>>
>>> I am using the Debian ffmpeg dev packages in the build. Unfortunately the
>>> dev packages install all the ffmpeg library headers under lib/ffmpeg. There
>>> is no lib/libavformat and such. And there is no ffmpeg-config or
>>> avformat-config to discover were the headers are. I don't know how best to
>>> handle this. I suppose -I/usr/lib/ffmpeg -I/usr/lib/libavformat flags can be
>>> added to Setup. Whatever is done all absolute includes like:
>>>
>>> #include 
>>>
>>> need to be replace with locale includes:
>>>
>>> #include 
>>>
>>> Lenard
>>>
>>> Tyler Laing wrote:

 What I forgot to say is, let me know, I will be beginning a merge at 2
 pm.

 -Tyler

 On Sun, Aug 16, 2009 at 12:53 PM, Tyler Laing >>> > wrote:

    I will be beginning the process of merging the movie module branch
    into the main branch.

    As it stands, the ffmpeg movie backend compiles. The vlc backend
    isn't quite feature complete, and doesn't work with older vlc's
    unfortunately.

    I would say that the nmovie module is only at a alpha stage, and
    needs a lot more widespread testing.

    If you have any questions, send me an email :)

    -Tyler
    --     Visit my blog at http://oddco.ca/zeroth/zblog




 --
 Visit my blog at http://oddco.ca/zeroth/zblog
>>>
>>
>
>
>
> --
> Visit my blog at http://oddco.ca/zeroth/zblog
>


Re: [pygame] Re: Movie module being merged

2009-08-17 Thread Tyler Laing
strange, I put in if checks around those... I'll fix that tomorrow. Thanks
for the report Lenard.

-Tyler

On Mon, Aug 17, 2009 at 12:57 PM, Lenard Lindstrom  wrote:

> Never mind. The stable ffmpeg libraries for Debian are too outdated anyway:
>
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
> -I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg
> -I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o
> build/temp.linux-i686-2.5/src/_gmovie.o
> src/_gmovie.c: In function ‘video_image_display’:
> src/_gmovie.c:530: error: ‘AVStream’ has no member named
> ‘sample_aspect_ratio’
> 
> src/_gmovie.c: In function ‘initialize_codec’:
> src/_gmovie.c:1685: error: ‘AVCodecContext’ has no member named
> ‘error_recognition’
> src/_gmovie.c: In function ‘decoder’:
> src/_gmovie.c:2213: error: ‘AVERROR_EOF’ undeclared (first use in this
> function)
> 
> src/_gmovie.c: In function ‘video_render’:
> src/_gmovie.c:2440: error: ‘AVCodecContext’ has no member named
> ‘reordered_opaque’
> 
> error: command 'gcc' failed with exit status 1
>
> Lenard
>
>
> Lenard Lindstrom wrote:
>
>> Hi Tyler,
>>
>> Sorry for the bad news but _movie.so fails to build under Debian
>> lenny:building 'pygame._movie' extension
>> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
>> -Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include
>> -I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c
>> src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o
>> In file included from src/_gsound.c:35:
>> src/_gsound.h:36:34: error: libavformat/avformat.h: No such file or
>> directory
>> src/_gsound.c: In function ‘seekBuffer’:
>> src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use in this
>> function)
>> src/_gsound.c:403: error: (Each undeclared identifier is reported only
>> once
>> src/_gsound.c:403: error: for each function it appears in.)
>> error: command 'gcc' failed with exit status 1
>>
>> I am using the Debian ffmpeg dev packages in the build. Unfortunately the
>> dev packages install all the ffmpeg library headers under lib/ffmpeg. There
>> is no lib/libavformat and such. And there is no ffmpeg-config or
>> avformat-config to discover were the headers are. I don't know how best to
>> handle this. I suppose -I/usr/lib/ffmpeg -I/usr/lib/libavformat flags can be
>> added to Setup. Whatever is done all absolute includes like:
>>
>> #include 
>>
>> need to be replace with locale includes:
>>
>> #include 
>>
>> Lenard
>>
>> Tyler Laing wrote:
>>
>>> What I forgot to say is, let me know, I will be beginning a merge at 2
>>> pm.
>>>
>>> -Tyler
>>>
>>> On Sun, Aug 16, 2009 at 12:53 PM, Tyler Laing >> trinio...@gmail.com>> wrote:
>>>
>>>I will be beginning the process of merging the movie module branch
>>>into the main branch.
>>>
>>>As it stands, the ffmpeg movie backend compiles. The vlc backend
>>>isn't quite feature complete, and doesn't work with older vlc's
>>>unfortunately.
>>>
>>>I would say that the nmovie module is only at a alpha stage, and
>>>needs a lot more widespread testing.
>>>
>>>If you have any questions, send me an email :)
>>>
>>>-Tyler
>>>-- Visit my blog at http://oddco.ca/zeroth/zblog
>>>
>>>
>>>
>>>
>>> --
>>> Visit my blog at http://oddco.ca/zeroth/zblog
>>>
>>
>>
>


-- 
Visit my blog at http://oddco.ca/zeroth/zblog


Re: [pygame] Re: Movie module being merged

2009-08-17 Thread Lenard Lindstrom

Never mind. The stable ffmpeg libraries for Debian are too outdated anyway:

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include 
-I/usr/include/SDL -I/usr/include/ffmpeg -I/usr/include/ffmpeg 
-I/usr/include/SDL -I/usr/include/python2.5 -c src/_gmovie.c -o 
build/temp.linux-i686-2.5/src/_gmovie.o

src/_gmovie.c: In function ‘video_image_display’:
src/_gmovie.c:530: error: ‘AVStream’ has no member named 
‘sample_aspect_ratio’


src/_gmovie.c: In function ‘initialize_codec’:
src/_gmovie.c:1685: error: ‘AVCodecContext’ has no member named 
‘error_recognition’

src/_gmovie.c: In function ‘decoder’:
src/_gmovie.c:2213: error: ‘AVERROR_EOF’ undeclared (first use in this 
function)


src/_gmovie.c: In function ‘video_render’:
src/_gmovie.c:2440: error: ‘AVCodecContext’ has no member named 
‘reordered_opaque’


error: command 'gcc' failed with exit status 1

Lenard

Lenard Lindstrom wrote:

Hi Tyler,

Sorry for the bad news but _movie.so fails to build under Debian 
lenny:building 'pygame._movie' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include 
-I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c 
src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o

In file included from src/_gsound.c:35:
src/_gsound.h:36:34: error: libavformat/avformat.h: No such file or 
directory

src/_gsound.c: In function ‘seekBuffer’:
src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use in 
this function)
src/_gsound.c:403: error: (Each undeclared identifier is reported only 
once

src/_gsound.c:403: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1

I am using the Debian ffmpeg dev packages in the build. Unfortunately 
the dev packages install all the ffmpeg library headers under 
lib/ffmpeg. There is no lib/libavformat and such. And there is no 
ffmpeg-config or avformat-config to discover were the headers are. I 
don't know how best to handle this. I suppose -I/usr/lib/ffmpeg 
-I/usr/lib/libavformat flags can be added to Setup. Whatever is done 
all absolute includes like:


#include 

need to be replace with locale includes:

#include 

Lenard

Tyler Laing wrote:
What I forgot to say is, let me know, I will be beginning a merge at 
2 pm.


-Tyler

On Sun, Aug 16, 2009 at 12:53 PM, Tyler Laing > wrote:


I will be beginning the process of merging the movie module branch
into the main branch.

As it stands, the ffmpeg movie backend compiles. The vlc backend
isn't quite feature complete, and doesn't work with older vlc's
unfortunately.

I would say that the nmovie module is only at a alpha stage, and
needs a lot more widespread testing.

If you have any questions, send me an email :)

-Tyler
-- Visit my blog at http://oddco.ca/zeroth/zblog




--
Visit my blog at http://oddco.ca/zeroth/zblog






Re: [pygame] Re: Movie module being merged

2009-08-17 Thread Lenard Lindstrom

Hi Tyler,

Sorry for the bad news but _movie.so fails to build under Debian 
lenny:building 'pygame._movie' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall 
-Wstrict-prototypes -fPIC -D_REENTRANT -I/usr/X11R6/include 
-I/usr/include/SDL -I/usr/include/SDL -I/usr/include/python2.5 -c 
src/_gsound.c -o build/temp.linux-i686-2.5/src/_gsound.o

In file included from src/_gsound.c:35:
src/_gsound.h:36:34: error: libavformat/avformat.h: No such file or 
directory

src/_gsound.c: In function ‘seekBuffer’:
src/_gsound.c:403: error: ‘AV_NOPTS_VALUE’ undeclared (first use in this 
function)

src/_gsound.c:403: error: (Each undeclared identifier is reported only once
src/_gsound.c:403: error: for each function it appears in.)
error: command 'gcc' failed with exit status 1

I am using the Debian ffmpeg dev packages in the build. Unfortunately 
the dev packages install all the ffmpeg library headers under 
lib/ffmpeg. There is no lib/libavformat and such. And there is no 
ffmpeg-config or avformat-config to discover were the headers are. I 
don't know how best to handle this. I suppose -I/usr/lib/ffmpeg 
-I/usr/lib/libavformat flags can be added to Setup. Whatever is done all 
absolute includes like:


#include 

need to be replace with locale includes:

#include 

Lenard

Tyler Laing wrote:

What I forgot to say is, let me know, I will be beginning a merge at 2 pm.

-Tyler

On Sun, Aug 16, 2009 at 12:53 PM, Tyler Laing > wrote:


I will be beginning the process of merging the movie module branch
into the main branch.

As it stands, the ffmpeg movie backend compiles. The vlc backend
isn't quite feature complete, and doesn't work with older vlc's
unfortunately.

I would say that the nmovie module is only at a alpha stage, and
needs a lot more widespread testing.

If you have any questions, send me an email :)

-Tyler
-- 
Visit my blog at http://oddco.ca/zeroth/zblog





--
Visit my blog at http://oddco.ca/zeroth/zblog




Re: [pygame] Re: Movie module being merged

2009-08-17 Thread René Dudfield
cool bananas :)