camera/QCamera2/HAL/QCameraPostProc.cpp
/*===========================================================================
* FUNCTION   : syncStreamParams
*
* DESCRIPTION: Query the runtime parameters of all streams included
*              in the main and reprocessed frames
*
* PARAMETERS :
*   @frame : Main image super buffer
*
* RETURN     : int32_t type of status
*              NO_ERROR  -- success
*              none-zero failure code
*==========================================================================*/
FUNCTION   : syncStreamParams
DESCRIPTION: Query the runtime parameters of all streams included
in the main and reprocessed frames

PARAMETERS :
@frame : Main image super buffer

RETURN     : int32_t type of status
NO_ERROR  -- success
none-zero failure code
FUNCTION : syncStreamParams DESCRIPTION : Query the runtime parameters of all streams included in the main and reprocessed frames PARAMETERS : @frame : Main image super buffer RETURN : int32_t type of status NO_ERROR -- success none - zero failure code
int32_t QCameraPostProcessor::syncStreamParams(mm_camera_super_buf_t *frame)
{
    QCameraStream *main_stream = NULL;
    QCameraStream *thumb_stream = NULL;
    mm_camera_buf_def_t *main_frame = NULL;
    mm_camera_buf_def_t *thumb_frame = NULL;
    int32_t ret = NO_ERROR;
    ret = queryStreams(&main_stream,
            &thumb_stream,
            &main_frame,
            &thumb_frame,
            frame,
            NULL);
    if (NO_ERROR != ret) {
        ALOGE("%s : Camera streams query from input frames failed %d",
                __func__,
                ret);
        return ret;
    }
    if (NULL != main_stream) {
        ret = main_stream->syncRuntimeParams();
        if (NO_ERROR != ret) {
            ALOGE("%s : Syncing of main stream runtime parameters failed %d",
                    __func__,
                    ret);
            return ret;
        }
    }
    if (NULL != thumb_stream) {
        ret = thumb_stream->syncRuntimeParams();
        if (NO_ERROR != ret) {
            ALOGE("%s : Syncing of thumb stream runtime parameters failed %d",
                    __func__,
                    ret);
            return ret;
        }
    }
    return ret;
}
int32_t QCameraPostProcessor :: syncStreamParams ( mm_camera_super_buf_t * frame ) { QCameraStream * main_stream = NULL ; QCameraStream * thumb_stream = NULL ; mm_camera_buf_def_t * main_frame = NULL ; mm_camera_buf_def_t * thumb_frame = NULL ; int32_t ret = NO_ERROR ; ret = queryStreams ( & main_stream , & thumb_stream , & main_frame , & thumb_frame , frame , NULL ) ; if ( NO_ERROR != ret ) { ALOGE ( " " , __func__ , ret ) ; return ret ; } if ( NULL != main_stream ) { ret = main_stream -> syncRuntimeParams ( ) ; if ( NO_ERROR != ret ) { ALOGE ( " " , __func__ , ret ) ; return ret ; } } if ( NULL != thumb_stream ) { ret = thumb_stream -> syncRuntimeParams ( ) ; if ( NO_ERROR != ret ) { ALOGE ( " " , __func__ , ret ) ; return ret ; } } return ret ; }
FUNCTION   : syncStreamParams
DESCRIPTION: Query the runtime parameters of all streams included
in the main and reprocessed frames
FUNCTION : syncStreamParams DESCRIPTION : Query the runtime parameters of all streams included in the main and reprocessed frames