oneVPL++
C++ API Prototype for oneVPL
oneapi::vpl::decode_session< Reader > Class Template Reference

Manages decoder's sessions. More...

#include <session.hpp>

Inheritance diagram for oneapi::vpl::decode_session< Reader >:
[legend]
Collaboration diagram for oneapi::vpl::decode_session< Reader >:
[legend]

Public Member Functions

 decode_session (const implemetation_selector &sel, codec_format_fourcc codecID, Reader *rdr)
 Constructs decoder session. More...
 
 decode_session (const implemetation_selector &sel, const decoder_video_param &params, Reader *rdr)
 Constructs decoder session. More...
 
 decode_session (const implemetation_selector &sel, codec_format_fourcc codecID, Reader *rdr, const decoder_process_list &list)
 Constructs decoder session. More...
 
 decode_session (const implemetation_selector &sel, const decoder_video_param &params, Reader *rdr, const decoder_process_list &list)
 Constructs decoder session. More...
 
 ~decode_session ()
 Dtor.
 
status init_by_header (decoder_init_header_list decHeaderList={}, decoder_init_reset_list initList={})
 Initialize the session by using bitream portion. This step can be omitted if the codec ID is known or we don't need to get SSP or PPS data from the bitstream. More...
 
status decode_frame (std::shared_ptr< frame_surface > out_surface, decoder_process_list list={})
 Decodes frame. More...
 
std::shared_ptr< future< std::shared_ptr< frame_surface > > > process (decoder_process_list list={})
 Decodes frame. More...
 
std::shared_ptr< decode_statgetStat ()
 Retrieve decoder statistic. More...
 
decoder_video_param getParams ()
 Get video params. More...
 
- Public Member Functions inherited from oneapi::vpl::session< decoder_video_param, decoder_init_reset_list, decoder_init_reset_list >
virtual ~session ()
 Dtor. Additionaly it closes loader.
 
std::shared_ptr< decoder_video_paramCaps ()
 Returns implementation capabilities. More...
 
std::shared_ptr< decoder_video_paramVerify (decoder_video_param *param)
 Verifyes that implementation supports such capabilities. On output, corrected capabilities are returned. More...
 
status Init (decoder_video_param *par, decoder_init_reset_list list={})
 Initializes the session by using provided parameters. More...
 
status Reset (decoder_video_param *par, decoder_init_reset_list list)
 Resets the session by using provided parameters. More...
 
std::shared_ptr< decoder_video_paramworking_params ()
 Retrieves current session parameters. More...
 
component get_component_domain () const
 Returns session's domain. More...
 
mfxIMPL get_implementation ()
 Returns implementation. More...
 
mfxVersion get_version ()
 Returns version. More...
 

Protected Attributes

bitstream_as_src bits_
 Bitstream keeper.
 
Reader * rdr_
 Bitstream reader.
 
decoder_video_param params_
 Video params.
 
decoder_process_list list_
 Process list.
 
- Protected Attributes inherited from oneapi::vpl::session< decoder_video_param, decoder_init_reset_list, decoder_init_reset_list >
mfxSession session_
 Session handle.
 
detail::sdk_c_api c_api_callable_
 Functions table.
 
state state_
 Processing state of the session.
 
component component_
 Session's type identifier. Domain in other words.
 
mfxIMPL selected_impl_
 Selected actual implementation.
 
mfxVersion version_
 Version of implementation.
 
void * accelerator_handle
 Accelerator handle.
 

Additional Inherited Members

- Protected Types inherited from oneapi::vpl::session< decoder_video_param, decoder_init_reset_list, decoder_init_reset_list >
enum  state
 Session's data processing state.
 
- Protected Member Functions inherited from oneapi::vpl::session< decoder_video_param, decoder_init_reset_list, decoder_init_reset_list >
 session (const implemetation_selector &sel, detail::sdk_c_api callable)
 Protected ctor. Creates session by using supplyed implementation selector. More...
 
void init_accelerator_handle ()
 
void free_accelerator_handle ()
 

Detailed Description

template<typename Reader>
class oneapi::vpl::decode_session< Reader >

Manages decoder's sessions.

Template Parameters
ReaderBitstream reader class

Constructor & Destructor Documentation

◆ decode_session() [1/4]

template<typename Reader >
oneapi::vpl::decode_session< Reader >::decode_session ( const implemetation_selector sel,
codec_format_fourcc  codecID,
Reader *  rdr 
)
inline

Constructs decoder session.

Parameters
[in]selImplementation selector
[in]codecIDCodec ID
[in]rdrBitstream reader

◆ decode_session() [2/4]

template<typename Reader >
oneapi::vpl::decode_session< Reader >::decode_session ( const implemetation_selector sel,
const decoder_video_param params,
Reader *  rdr 
)
inline

Constructs decoder session.

Parameters
[in]selImplementation selector
[in]paramsVideo params
[in]rdrBitstream reader

◆ decode_session() [3/4]

template<typename Reader >
oneapi::vpl::decode_session< Reader >::decode_session ( const implemetation_selector sel,
codec_format_fourcc  codecID,
Reader *  rdr,
const decoder_process_list list 
)
inline

Constructs decoder session.

Parameters
[in]selImplementation selector
[in]codecIDCodec ID
[in]rdrBitstream reader
[in]listProcess list

◆ decode_session() [4/4]

template<typename Reader >
oneapi::vpl::decode_session< Reader >::decode_session ( const implemetation_selector sel,
const decoder_video_param params,
Reader *  rdr,
const decoder_process_list list 
)
inline

Constructs decoder session.

Parameters
[in]selImplementation selector
[in]paramsVideo params
[in]rdrBitstream reader
[in]listProcess list

Member Function Documentation

◆ decode_frame()

template<typename Reader >
status oneapi::vpl::decode_session< Reader >::decode_frame ( std::shared_ptr< frame_surface out_surface,
decoder_process_list  list = {} 
)
inline

Decodes frame.

Parameters
[out]out_surfaceFuture object with decoded data.
[in]listList of extension buffers to attach to bitstream.
Returns
Ok or warning

◆ getParams()

template<typename Reader >
decoder_video_param oneapi::vpl::decode_session< Reader >::getParams ( )
inline

Get video params.

Returns
params

◆ getStat()

template<typename Reader >
std::shared_ptr<decode_stat> oneapi::vpl::decode_session< Reader >::getStat ( )
inline

Retrieve decoder statistic.

Returns
Decoder statistic

◆ init_by_header()

template<typename Reader >
status oneapi::vpl::decode_session< Reader >::init_by_header ( decoder_init_header_list  decHeaderList = {},
decoder_init_reset_list  initList = {} 
)
inline

Initialize the session by using bitream portion. This step can be omitted if the codec ID is known or we don't need to get SSP or PPS data from the bitstream.

Parameters
[in]decHeaderListList of extension buffers for InitHeader stage. Can be NULL.
[in]initListList of extension buffers for Init stage. Can be NULL.
Returns
Ok or warnings

◆ process()

template<typename Reader >
std::shared_ptr<future<std::shared_ptr<frame_surface> > > oneapi::vpl::decode_session< Reader >::process ( decoder_process_list  list = {})
inline

Decodes frame.

Parameters
[in]listList of extension buffers to attach to bitstream
Returns
Future object with decoded data
Here is the call graph for this function:

The documentation for this class was generated from the following file: