Ejemplo n.º 1
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_pause
 * DESCRIPTION
 *  Pause webcam
 * PARAMETERS
 *  void
 * RETURNS
 *  MDI_RES_WEBCAM_SUCCEED      Success
 *  MDI_RES_WEBCAM_ERR_FAILED   Failure
 *****************************************************************************/
MDI_RESULT mdi_webcam_pause(void)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_webcam_pause_req_struct data;
    //S32 i;
    S32 ret;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
#if 0//JiaShuo Delete for webcam
    MMI_TRACE(MMI_MEDIA_TRC_G4_MDI, MDI_TRC_WEBCAM_PAUSE);  

    data.no_of_jpeg_files = 0;
    for (i = 0; i < MDI_WEBCAM_JPG_COUNT; i++)
    {
        if (g_mdi_webcam_cntx.jpg_file_info[i].start_addr != NULL)
        {
            data.no_of_jpeg_files++;
        }
    }

    data.file_info = (webcam_default_jpeg_file_info*) g_mdi_webcam_cntx.jpg_file_info;
#endif

    ret = media_webcam_pause(MOD_MMI, (void*)&data);
    if (ret != MED_RES_OK)
    {
        return MDI_RES_WEBCAM_ERR_FAILED;
    }
    else
    {
        return MDI_RES_WEBCAM_SUCCEED;
    }
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

    return MDI_RES_WEBCAM_SUCCEED;
}
Ejemplo n.º 2
0
/*****************************************************************************
 * FUNCTION
 *  mdi_webcam_pause
 * DESCRIPTION
 *  pause webcam
 * PARAMETERS
 *  void
 * RETURNS
 *  MDI_RESULT
 *****************************************************************************/
MDI_RESULT mdi_webcam_pause(void)
{
#ifdef MDI_WEBCAM_DRIVER_AVAIALBE
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    media_webcam_pause_req_struct data;
    S32 i;
    S32 ret;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    PRINT_INFORMATION("[MDI_WEBCAM] mdi_webcam_pause()");

    data.no_of_jpeg_files = 0;
    for (i = 0; i < MDI_WEBCAM_JPG_COUNT; i++)
    {
        if (g_mdi_webcam_cntx.jpg_file_info[i].start_addr != NULL)
        {
            data.no_of_jpeg_files++;
        }
    }

    data.file_info = (webcam_default_jpeg_file_info*) g_mdi_webcam_cntx.jpg_file_info;

    ret = media_webcam_pause(MOD_MMI, (void*)&data);
    if (ret != MED_RES_OK)
    {
        return MDI_RES_WEBCAM_ERR_FAILED;
    }
    else
    {
        return MDI_RES_WEBCAM_SUCCEED;
    }
#endif /* MDI_WEBCAM_DRIVER_AVAIALBE */ 

    return MDI_RES_WEBCAM_SUCCEED;
}