基于qt,msvc2017-64bits,ffmpeg.opengl的播放器
zhangmeng
2021-03-03 4a6d9312cc1c9d62d66c4def71246d9faae29edb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/**
 * 叶海辉
 * 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