Changeset 4863


Ignore:
Timestamp:
Jun 23, 2014 6:21:21 AM (10 years ago)
Author:
bennylp
Message:

Re #1758: Updated with the latest OpenH264 to fix compilation error and codec initialization error for packing mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/openh264.cpp

    r4827 r4863  
    480480    eprm.bPrefixNalAddingCtrl           = false; 
    481481    eprm.iSpatialLayerNum               = 1; 
     482    if (!oh264_data->whole) { 
     483        eprm.uiMaxNalSize                       = param->enc_mtu; 
     484    } 
    482485 
    483486    pj_bzero(&elayer_ctx, sizeof (SLayerPEncCtx)); 
     
    660663        /* Find which layer with biggest payload */ 
    661664        oh264_data->ilayer = 0; 
    662         payload_size = oh264_data->bsi.sLayerInfo[0].iNalLengthInByte[0]; 
     665        payload_size = oh264_data->bsi.sLayerInfo[0].pNalLengthInByte[0]; 
    663666        for (i=0; i < (unsigned)oh264_data->bsi.iLayerNum; ++i) { 
    664667            unsigned j; 
    665668            pLayerBsInfo = &oh264_data->bsi.sLayerInfo[i]; 
    666669            for (j=0; j < (unsigned)pLayerBsInfo->iNalCount; ++j) { 
    667                 if (pLayerBsInfo->iNalLengthInByte[j] > (int)payload_size) { 
    668                     payload_size = pLayerBsInfo->iNalLengthInByte[j]; 
     670                if (pLayerBsInfo->pNalLengthInByte[j] > (int)payload_size) { 
     671                    payload_size = pLayerBsInfo->pNalLengthInByte[j]; 
    669672                    oh264_data->ilayer = i; 
    670673                } 
     
    682685        payload_size = 0; 
    683686        for (int inal = pLayerBsInfo->iNalCount - 1; inal >= 0; --inal) { 
    684             payload_size += pLayerBsInfo->iNalLengthInByte[inal]; 
     687            payload_size += pLayerBsInfo->pNalLengthInByte[inal]; 
    685688        } 
    686689 
     
    761764    oh264_data->enc_frame_size = 0; 
    762765    for (int inal = pLayerBsInfo->iNalCount - 1; inal >= 0; --inal) { 
    763         oh264_data->enc_frame_size += pLayerBsInfo->iNalLengthInByte[inal]; 
     766        oh264_data->enc_frame_size += pLayerBsInfo->pNalLengthInByte[inal]; 
    764767    } 
    765768 
     
    859862static pj_status_t oh264_got_decoded_frame(pjmedia_vid_codec *codec, 
    860863                                           struct oh264_codec_data *oh264_data, 
    861                                            void *pData[3], 
     864                                           unsigned char *pData[3], 
    862865                                           SBufferInfo *sDstBufInfo, 
    863866                                           pj_timestamp *timestamp, 
     
    932935{ 
    933936    struct oh264_codec_data *oh264_data; 
    934     void* pData[3] = {NULL}; 
     937    unsigned char* pData[3] = {NULL}; 
    935938    const pj_uint8_t nal_start[] = { 0, 0, 1 }; 
    936939    SBufferInfo sDstBufInfo; 
Note: See TracChangeset for help on using the changeset viewer.