Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GNASH_VAAPIGLOBALCONTEXT_H
00021 #define GNASH_VAAPIGLOBALCONTEXT_H
00022
00023 #include <vector>
00024
00025 #include "log.h"
00026 #include "vaapi_common.h"
00027 #include "VaapiDisplay.h"
00028 #include "VaapiImageFormat.h"
00029
00030 namespace gnash {
00031
00033 class DSOEXPORT VaapiGlobalContext {
00034 std::auto_ptr<VaapiDisplay> _display;
00035 std::vector<VAProfile> _profiles;
00036 std::vector<VAImageFormat> _image_formats;
00037 std::vector<VAImageFormat> _subpicture_formats;
00038
00039 bool init();
00040
00041 public:
00042 VaapiGlobalContext(std::auto_ptr<VaapiDisplay> display);
00043 ~VaapiGlobalContext();
00044
00046
00048 static VaapiGlobalContext *get();
00049
00051 bool hasProfile(VAProfile profile) const;
00052
00054
00056 const VAImageFormat *getImageFormat(VaapiImageFormat format) const;
00057
00059
00061 std::vector<VaapiImageFormat> getImageFormats() const;
00062
00064
00066 std::vector<VaapiImageFormat> getSubpictureFormats() const;
00067
00069
00071 VADisplay display() const { return _display->get(); }
00072 };
00073
00074 }
00075
00076 #endif // GNASH_VAAPIGLOBALCONTEXT_H
00077
00078
00079
00080
00081
00082