mirror of
https://github.com/opencv/opencv.git
synced 2025-01-09 21:27:59 +08:00
02f08879a4
G-API: oneVPL Implement asynchronous MFP demux data provider * Add dummy dmux * Initial commit for draft versionn * Demux for low res file works * Add media source resolver to work over incorrect MIME * Add MFP Demux logger * stash changes * Extend IDataProvider with CodecId, Add troubleshooting info * Add IDapaProvider dispatcher * Add ComPtrGuard wrappers * Add new unit test scope for MFP demux & Add minor changes * Enhance UTs * Remove ATL header * Remove ATL another one * Fix build * Add static for some methods * Initial commit * Add async demuxing * Apply tdd idea * Intro IDataProvider changes: +fetch_bitstream, -fetch_data * Fix UTs * Remove IDataProvider::CodecId & Fix EOF hang * Remove sync demux * Remove mfp async dependencies * Remove VPL dependencies from IDataProvider declaration * Apply comments * Fix compilation * Suppress unused warning * Apply some comments * Apply some comments * Apply comments
34 lines
911 B
C++
34 lines
911 B
C++
// 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
|
|
#ifdef HAVE_ONEVPL
|
|
|
|
#include "streaming/onevpl/engine/engine_session.hpp"
|
|
#include "streaming/onevpl/utils.hpp"
|
|
#include "logger.hpp"
|
|
|
|
namespace cv {
|
|
namespace gapi {
|
|
namespace wip {
|
|
namespace onevpl {
|
|
|
|
EngineSession::EngineSession(mfxSession sess, std::shared_ptr<IDataProvider::mfx_bitstream>&& str) :
|
|
session(sess), stream(std::move(str)) {}
|
|
EngineSession::~EngineSession()
|
|
{
|
|
GAPI_LOG_INFO(nullptr, "Close session: " << session);
|
|
MFXClose(session);
|
|
}
|
|
|
|
std::string EngineSession::error_code_to_str() const
|
|
{
|
|
return mfxstatus_to_string(last_status);
|
|
}
|
|
} // namespace onevpl
|
|
} // namespace wip
|
|
} // namespace gapi
|
|
} // namespace cv
|
|
#endif // HAVE_ONEVPL
|