/**
|
* 叶海辉
|
* QQ群121376426
|
* http://blog.yundiantech.com/
|
*/
|
|
#ifndef VIDEOPLAYERFACTORY_H
|
#define VIDEOPLAYERFACTORY_H
|
|
#include "VideoPlayer.h"
|
#include "VideoPlayerNormal.h"
|
#include "VideoPlayerCSRW.h"
|
#include "VideoPlayerCDYD.h"
|
#include "VideoPlayerCSHH.h"
|
#include "VideoPlayerZZCX.h"
|
#include "VideoPlayerHK.h"
|
|
class PlayerFactory
|
{
|
public:
|
virtual ~PlayerFactory(){}
|
|
virtual VideoPlayer* CreatePlayer() = 0;
|
};
|
|
class PlayerNormalProducer : public PlayerFactory {
|
public:
|
VideoPlayer * CreatePlayer(){
|
return new VideoPlayerNormal;
|
}
|
};
|
|
class PlayerRunweiProducer : public PlayerFactory {
|
public:
|
VideoPlayer * CreatePlayer(){
|
return new VideoPlayerCSRW;
|
}
|
};
|
|
class PlayerCDYDProducer : public PlayerFactory {
|
public:
|
VideoPlayer * CreatePlayer(){
|
return new VideoPlayerCDYD;
|
}
|
};
|
|
class PlayerCSHHProducer : public PlayerFactory {
|
public:
|
VideoPlayer * CreatePlayer(){
|
return new VideoPlayerCSHH;
|
}
|
};
|
|
class PlayerZZCXProducer : public PlayerFactory {
|
public:
|
VideoPlayer * CreatePlayer(){
|
return new VideoPlayerZZCX;
|
}
|
};
|
|
class PlayerHKProducer : public PlayerFactory {
|
public:
|
VideoPlayer * CreatePlayer(){
|
return new VideoPlayerHK;
|
}
|
};
|
|
#endif // VIDEOPLAYERFACTORY_H
|