Download modules/gapi/src/streaming/onevpl/file_data_provider.hpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.83 kB
-
https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/streaming/onevpl/file_data_provider.hpp
- Command line
-
hf download hf://tgollogly/test/modules/gapi/src/streaming/onevpl/file_data_provider.hpp
-
curl -L -o file_data_provider.hpp https://huggingface.co/tgollogly/test/resolve/main/modules/gapi/src/streaming/onevpl/file_data_provider.hpp
1.83 kB
| // This file is part of OpenCV project. | |
| // It is subject to the license terms in the LICENSE file found in the top-level directory | |
| // of this distribution and at http://opencv.org/license.html. | |
| // | |
| // Copyright (C) 2021 Intel Corporation | |
| namespace cv { | |
| namespace gapi { | |
| namespace wip { | |
| namespace onevpl { | |
| // With gcc13, std::unique_ptr(FILE, decltype(&fclose)> causes ignored-attributes warning. | |
| // See https://stackoverflow.com/questions/76849365/can-we-add-attributes-to-standard-function-declarations-without-breaking-standar | |
| struct GAPI_EXPORTS FileDataProvider : public IDataProvider { | |
| using file_ptr = std::unique_ptr<FILE, decltype(&fclose)>; | |
| FileDataProvider(const std::string& file_path, | |
| const std::vector<CfgParam> &codec_params = {}, | |
| uint32_t bitstream_data_size_value = 2000000); | |
| ~FileDataProvider(); | |
| mfx_codec_id_type get_mfx_codec_id() const override; | |
| bool fetch_bitstream_data(std::shared_ptr<mfx_bitstream> &out_bitsream) override; | |
| bool empty() const override; | |
| private: | |
| file_ptr source_handle; | |
| mfx_codec_id_type codec; | |
| const uint32_t bitstream_data_size; | |
| }; | |
| } // namespace onevpl | |
| } // namespace wip | |
| } // namespace gapi | |
| } // namespace cv | |