123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- #ifndef GAPI_STREAMING_ONEVPL_ONEVPL_DATA_PROVIDER_INTERFACE_HPP
- #define GAPI_STREAMING_ONEVPL_ONEVPL_DATA_PROVIDER_INTERFACE_HPP
- #include <exception>
- #include <memory>
- #include <string>
- #include <opencv2/gapi/own/exports.hpp> // GAPI_EXPORTS
- namespace cv {
- namespace gapi {
- namespace wip {
- namespace onevpl {
- struct GAPI_EXPORTS DataProviderException : public std::exception {
- DataProviderException(const std::string& descr);
- DataProviderException(std::string&& descr);
- virtual ~DataProviderException() = default;
- virtual const char* what() const noexcept override;
- private:
- std::string reason;
- };
- struct GAPI_EXPORTS DataProviderSystemErrorException final : public DataProviderException {
- DataProviderSystemErrorException(int error_code, const std::string& description = std::string());
- ~DataProviderSystemErrorException() = default;
- };
- struct GAPI_EXPORTS DataProviderUnsupportedException final : public DataProviderException {
- DataProviderUnsupportedException(const std::string& description);
- ~DataProviderUnsupportedException() = default;
- };
- struct GAPI_EXPORTS DataProviderImplementationException : public DataProviderException {
- DataProviderImplementationException(const std::string& description);
- ~DataProviderImplementationException() = default;
- };
- struct GAPI_EXPORTS IDataProvider {
- using Ptr = std::shared_ptr<IDataProvider>;
- using mfx_codec_id_type = uint32_t;
-
- struct mfx_bitstream;
- virtual ~IDataProvider() = default;
-
- virtual mfx_codec_id_type get_mfx_codec_id() const = 0;
-
- virtual bool fetch_bitstream_data(std::shared_ptr<mfx_bitstream> &in_out_bitsream) = 0;
-
- virtual bool empty() const = 0;
- };
- }
- }
- }
- }
- #endif
|