ConnectStreamEncodeUtil¶
-
class
kanzi::connect::ConnectStreamEncodeUtil: public StreamEncodeUtil, public enable_shared_from_this<ConnectStreamEncodeUtil>¶ Connect video utility, read pixels using glReadPixels and post them through connect framework.
Subclassed by StreamEncodeUtil_openh264
Public Functions
-
ConnectStreamEncodeUtil()¶ Constructor.
-
~ConnectStreamEncodeUtil() override¶ Destructor.
-
bool
doEncode(const PixelFrame &in, vector<char> &out, int &flags)¶ Request to encode a frame.
- Return
True on success, data is to be sent over network.
- Parameters
in: A buffer containing frame data, assumption is that it will be 24bit BGR dataout: A buffer containing encoded data. Presentation is plugin specific.flags: Additional information about this frame, sent to along the frame data to stream consumers.
Encode new pixel frame and send data.
- Parameters
frame: PixelFrame which is to be encoded and sent.
-
bool
initialize(Domain &domain, StreamEncodeParameters ¶ms) override¶ Prepare encoding target.
- See
StreamEncodeUtil::initialize
-
void
startEncoderThread()¶
-
void
stopEncoderThread()¶
-
void
uninitialize(bool softUninitialize = false) override¶ Release encoder infra and write ending to video file or stream.
- See
StreamEncodeUtil::initialize
-
void
updateRuntimedata()¶
-