| 201 | } |
| 202 | |
| 203 | long IsKeyFrameLost (ISVCDecoder* pDecoder, SLTRRecoverRequest* p_LTR_Recover_Request, long hr) { |
| 204 | long bLost = NO_RECOVERY_REQUSET; |
| 205 | int tempInt = -1; |
| 206 | int temple_id = -1; |
| 207 | bool m_P2PmodeFlag = true; |
| 208 | pDecoder->GetOption (DECODER_OPTION_TEMPORAL_ID, &temple_id); |
| 209 | if (hr == dsErrorFree) { |
| 210 | if (m_P2PmodeFlag && temple_id == 0) { |
| 211 | pDecoder->GetOption (DECODER_OPTION_IDR_PIC_ID, &tempInt); |
| 212 | // idr_pic_id change ,reset last correct position |
| 213 | if (p_LTR_Recover_Request->uiIDRPicId != (unsigned int) tempInt) { |
| 214 | p_LTR_Recover_Request->uiIDRPicId = tempInt; |
| 215 | p_LTR_Recover_Request->iLastCorrectFrameNum = -1; |
| 216 | } |
| 217 | pDecoder->GetOption (DECODER_OPTION_FRAME_NUM, &tempInt); |
| 218 | if (tempInt >= 0) { |
| 219 | p_LTR_Recover_Request->iLastCorrectFrameNum = tempInt; |
| 220 | } |
| 221 | } |
| 222 | bLost = NO_RECOVERY_REQUSET; |
| 223 | } else if (hr & dsNoParamSets) { |
| 224 | bLost = IDR_RECOVERY_REQUEST; |
| 225 | } else if (((hr & dsRefLost) && (1 == temple_id)) || ((dsErrorFree != hr) && (0 == temple_id))) { |
| 226 | bLost = LTR_RECOVERY_REQUEST; |
| 227 | } else { |
| 228 | bLost = NO_RECOVERY_REQUSET; |
| 229 | } |
| 230 | return bLost; |
| 231 | } |
| 232 | |
| 233 | bool IsLTRMarking (ISVCDecoder* pDecoder) { |
| 234 | int bLTR_marking_flag = 0; |
no test coverage detected