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

Method SetUp

test/api/BaseThreadDecoderTest.cpp:145–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145int32_t BaseThreadDecoderTest::SetUp() {
146 long rv = WelsCreateDecoder (&decoder_);
147 EXPECT_EQ (0, rv);
148 EXPECT_TRUE (decoder_ != NULL);
149 if (decoder_ == NULL) {
150 return rv;
151 }
152
153 SDecodingParam decParam;
154 memset (&decParam, 0, sizeof (SDecodingParam));
155 decParam.uiTargetDqLayer = UCHAR_MAX;
156 decParam.eEcActiveIdc = ERROR_CON_SLICE_COPY;
157 decParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_DEFAULT;
158 int iThreadCount = (rand() % 2) + 2;
159 decoder_->SetOption (DECODER_OPTION_NUM_OF_THREADS, &iThreadCount);
160
161 rv = decoder_->Initialize (&decParam);
162 EXPECT_EQ (0, rv);
163 return (int32_t)rv;
164}
165
166void BaseThreadDecoderTest::TearDown() {
167 if (decoder_ != NULL) {

Callers

nothing calls this directly

Calls 3

WelsCreateDecoderFunction · 0.85
SetOptionMethod · 0.45
InitializeMethod · 0.45

Tested by

no test coverage detected