| 143 | } |
| 144 | |
| 145 | int32_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 | |
| 166 | void BaseThreadDecoderTest::TearDown() { |
| 167 | if (decoder_ != NULL) { |
nothing calls this directly
no test coverage detected