MCPcopy Create free account
hub / github.com/cisco/openh264 / EncodeOneFrame

Method EncodeOneFrame

test/api/decode_api_test.cpp:849–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

847 }
848
849 void EncodeOneFrame (bool bMock) {
850 int iFrameSize = iWidth_ * iHeight_ * 3 / 2;
851 int iSize = (int) fread (buf_.data(), sizeof (char), iFrameSize, fYuv_);
852 if (feof (fYuv_) || iSize != iFrameSize) {
853 rewind (fYuv_);
854 iSize = (int) fread (buf_.data(), sizeof (char), iFrameSize, fYuv_);
855 ASSERT_TRUE (iSize == iFrameSize);
856 }
857 if (bMock) {
858 MockInputData (buf_.data(), iWidth_ * iHeight_);
859 }
860 int rv = encoder_->EncodeFrame (&EncPic, &info);
861 ASSERT_TRUE (rv == cmResultSuccess || rv == cmUnknownReason);
862 }
863
864 void prepareParam (int iLayerNum, int iSliceNum, int width, int height, float framerate, SEncParamExt* pParam) {
865 memset (pParam, 0, sizeof (SEncParamExt));

Callers

nothing calls this directly

Calls 2

dataMethod · 0.80
EncodeFrameMethod · 0.45

Tested by

no test coverage detected