* Get Option */
| 582 | * Get Option |
| 583 | */ |
| 584 | long CWelsDecoder::GetOption (DECODER_OPTION eOptID, void* pOption) { |
| 585 | int iVal = 0; |
| 586 | if (DECODER_OPTION_NUM_OF_THREADS == eOptID) { |
| 587 | * ((int*)pOption) = m_iThreadCount; |
| 588 | return cmResultSuccess; |
| 589 | } |
| 590 | PWelsDecoderContext pDecContext = m_pDecThrCtx[0].pCtx; |
| 591 | if (pDecContext == NULL) |
| 592 | return cmInitExpected; |
| 593 | |
| 594 | if (pOption == NULL) |
| 595 | return cmInitParaError; |
| 596 | |
| 597 | if (DECODER_OPTION_END_OF_STREAM == eOptID) { |
| 598 | iVal = pDecContext->bEndOfStreamFlag; |
| 599 | * ((int*)pOption) = iVal; |
| 600 | return cmResultSuccess; |
| 601 | } |
| 602 | #ifdef LONG_TERM_REF |
| 603 | else if (DECODER_OPTION_IDR_PIC_ID == eOptID) { |
| 604 | iVal = pDecContext->uiCurIdrPicId; |
| 605 | * ((int*)pOption) = iVal; |
| 606 | return cmResultSuccess; |
| 607 | } else if (DECODER_OPTION_FRAME_NUM == eOptID) { |
| 608 | iVal = pDecContext->iFrameNum; |
| 609 | * ((int*)pOption) = iVal; |
| 610 | return cmResultSuccess; |
| 611 | } else if (DECODER_OPTION_LTR_MARKING_FLAG == eOptID) { |
| 612 | iVal = pDecContext->bCurAuContainLtrMarkSeFlag; |
| 613 | * ((int*)pOption) = iVal; |
| 614 | return cmResultSuccess; |
| 615 | } else if (DECODER_OPTION_LTR_MARKED_FRAME_NUM == eOptID) { |
| 616 | iVal = pDecContext->iFrameNumOfAuMarkedLtr; |
| 617 | * ((int*)pOption) = iVal; |
| 618 | return cmResultSuccess; |
| 619 | } |
| 620 | #endif |
| 621 | else if (DECODER_OPTION_VCL_NAL == eOptID) { //feedback whether or not have VCL NAL in current AU |
| 622 | iVal = pDecContext->iFeedbackVclNalInAu; |
| 623 | * ((int*)pOption) = iVal; |
| 624 | return cmResultSuccess; |
| 625 | } else if (DECODER_OPTION_TEMPORAL_ID == eOptID) { //if have VCL NAL in current AU, then feedback the temporal ID |
| 626 | iVal = pDecContext->iFeedbackTidInAu; |
| 627 | * ((int*)pOption) = iVal; |
| 628 | return cmResultSuccess; |
| 629 | } else if (DECODER_OPTION_IS_REF_PIC == eOptID) { |
| 630 | iVal = pDecContext->iFeedbackNalRefIdc; |
| 631 | if (iVal > 0) |
| 632 | iVal = 1; |
| 633 | * ((int*)pOption) = iVal; |
| 634 | return cmResultSuccess; |
| 635 | } else if (DECODER_OPTION_ERROR_CON_IDC == eOptID) { |
| 636 | iVal = (int)pDecContext->pParam->eEcActiveIdc; |
| 637 | * ((int*)pOption) = iVal; |
| 638 | return cmResultSuccess; |
| 639 | } else if (DECODER_OPTION_GET_STATISTICS == eOptID) { // get decoder statistics info for real time debugging |
| 640 | SDecoderStatistics* pDecoderStatistics = (static_cast<SDecoderStatistics*> (pOption)); |
| 641 |
nothing calls this directly
no outgoing calls
no test coverage detected