Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Media SDK : Want to stop EncodeFrameAsync early

Chinh_T_C_
Beginner
345 Views

Hi,

I want to stop EncodeFrameAsync function early if it takes more than A (ms). How do I do it? What function I need to call so that it would not break on the next time that I submit another frame to media sdk for encoding.

Thanks.

0 Kudos
1 Reply
Petter_L_Intel
Employee
345 Views
Hi, EncodeFrameAsync() is not a blocking call, it returns immediately. To obtain the encoded frame, the user must call SyncOperation() using the generated syncpoint handle. The SyncOperation() call has a "wait" parameter which can be used specify desired timeout interval. There is no feature to stop ongoing "single" frame encode operation. But if you need to abort or restart the encoder (affecting all frames in flight) then use the Close() or Reset() operations. Note that Reset() can be used for limited dynamic control of the encoder such as instantaneous control of bit rate without having to close and reinitialize the encoder. Regards, Petter
0 Kudos
Reply