[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: pgmpeg/src pgmpeg.cpp,1.1.1.1,1.2 pgmpeg.h,1.1.1.1,1.
From: |
Eric Ross <address@hidden> |
Subject: |
[paragui-cvs] CVS: pgmpeg/src pgmpeg.cpp,1.1.1.1,1.2 pgmpeg.h,1.1.1.1,1.2 |
Date: |
Fri, 19 Apr 2002 21:23:16 -0400 |
Update of /cvsroot/paragui/pgmpeg/src
In directory subversions:/tmp/cvs-serv15451
Modified Files:
pgmpeg.cpp pgmpeg.h
Log Message:
Changed the PG_MPEGPlayer to make it a derived class from MPEG. All the MPEG
methods can be used directly now (stop, loop, seek, etc).
Index: pgmpeg.cpp
===================================================================
RCS file: /cvsroot/paragui/pgmpeg/src/pgmpeg.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** pgmpeg.cpp 15 Apr 2002 13:47:29 -0000 1.1.1.1
--- pgmpeg.cpp 20 Apr 2002 01:23:13 -0000 1.2
***************
*** 25,32 ****
std::map<SDL_Surface*, PG_MPEGPlayer *> PG_MPEGPlayer::hash;
! PG_MPEGPlayer::PG_MPEGPlayer(char *file, PG_Widget* parent, const PG_Rect&
rect) : PG_Widget(parent, rect, true) {
SetDirtyUpdate(true);
! mpeg = new MPEG(file, true);
! mpeg->SetDisplay(my_srfObject, NULL, cb);
hash[my_srfObject] = this;
bFastMode = false;
--- 25,33 ----
std::map<SDL_Surface*, PG_MPEGPlayer *> PG_MPEGPlayer::hash;
! PG_MPEGPlayer::PG_MPEGPlayer(char *file, PG_Widget* parent, const PG_Rect&
rect)
! : PG_Widget(parent, rect, true), MPEG(file, true) {
SetDirtyUpdate(true);
!
! SetDisplay(my_srfObject, NULL, cb);
hash[my_srfObject] = this;
bFastMode = false;
***************
*** 36,40 ****
Stop();
hash.erase(my_srfObject);
- delete mpeg;
}
--- 37,40 ----
***************
*** 62,72 ****
void PG_MPEGPlayer::SetFastMode(bool fast) {
bFastMode = fast;
- }
-
- void PG_MPEGPlayer::Play() {
- mpeg->Play();
- }
-
- void PG_MPEGPlayer::Stop() {
- mpeg->Stop();
}
--- 62,64 ----
Index: pgmpeg.h
===================================================================
RCS file: /cvsroot/paragui/pgmpeg/src/pgmpeg.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** pgmpeg.h 15 Apr 2002 13:47:29 -0000 1.1.1.1
--- pgmpeg.h 20 Apr 2002 01:23:13 -0000 1.2
***************
*** 43,47 ****
*/
! class PG_MPEGPlayer : public PG_Widget {
public:
/**
--- 43,47 ----
*/
! class PG_MPEGPlayer : public PG_Widget, public MPEG {
public:
/**
***************
*** 74,92 ****
void SetFastMode(bool fast);
- /**
- Start playback
- */
- void Play();
-
- /**
- Stop playback
- */
- void Stop();
-
static void cb(SDL_Surface* dst, int x, int y, unsigned int w, unsigned
int h);
private:
static std::map<SDL_Surface*, PG_MPEGPlayer *> hash;
! MPEG* mpeg;
bool bFastMode;
};
--- 74,82 ----
void SetFastMode(bool fast);
static void cb(SDL_Surface* dst, int x, int y, unsigned int w, unsigned
int h);
private:
static std::map<SDL_Surface*, PG_MPEGPlayer *> hash;
!
bool bFastMode;
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: pgmpeg/src pgmpeg.cpp,1.1.1.1,1.2 pgmpeg.h,1.1.1.1,1.2,
Eric Ross <address@hidden> <=