From b041c63bf60e5e607c6bb04403431f6ae23b29d8 Mon Sep 17 00:00:00 2001 From: brianjjones Date: Mon, 3 Dec 2012 16:14:29 -0800 Subject: [PATCH] Making changes to make gstreamer calls work correctly on IVI --- src/cam_app.c | 77 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 39 insertions(+), 38 deletions(-) diff --git a/src/cam_app.c b/src/cam_app.c index 276afe9..8a054d9 100755 --- a/src/cam_app.c +++ b/src/cam_app.c @@ -1359,7 +1359,7 @@ gboolean cam_layout_init(void *data) return FALSE; } -#ifndef CAMERA_MACHINE_I686 +//#ifndef CAMERA_MACHINE_I686 evas_object_smart_callback_del(_EDJ(ad->layout_main), "mouse.click", _main_layout_click_cb); @@ -1370,7 +1370,7 @@ gboolean cam_layout_init(void *data) define_mouse_callback(_EDJ(ad->layout_main), _EDJ(ad->layout_main)); -#endif +//#endif } CAM_TA_ACUM_ITEM_END(" layout_main load", 0); @@ -5403,9 +5403,9 @@ Eina_Bool cam_app_focus_guide_create(void *data) evas_object_show(ad->focus_edje); DEBUG_TRACE("#######################################\n"); -#ifdef CAMERA_MACHINE_I686 - evas_object_hide(ad->focus_edje); -#endif +//#ifdef CAMERA_MACHINE_I686 + //evas_object_hide(ad->focus_edje); +//#endif return EINA_TRUE; } @@ -6319,10 +6319,10 @@ gboolean cam_app_reset_resolution(void *data, int width, int height) /* assume that last mode is zero system lag capture mode */ int temp_width = camapp->default_preview_width; int temp_height = camapp->default_preview_height; -#ifdef CAMERA_MACHINE_I686 - temp_width = 320; - temp_height = 240; -#endif +//#ifdef CAMERA_MACHINE_I686 + //temp_width = 320; + //temp_height = 240; +//#endif if (cam_utils_check_wide_resolution(width, height)) temp_width = PREVIEW_WIDE_W; @@ -6628,10 +6628,10 @@ gboolean cam_app_set_recording_mode(void *data, int mode) format = AUDIO_FORMAT_PCM_S16_LE; channel = 2; } -#ifdef CAMERA_MACHINE_I686 - video_codec = VIDEO_CODEC_THEORA; - audio_codec = AUDIO_CODEC_VORBIS; -#endif +//#ifdef CAMERA_MACHINE_I686 + //video_codec = VIDEO_CODEC_THEORA; + //audio_codec = AUDIO_CODEC_VORBIS; +//#endif if (!cam_mm_set_codec(audio_codec, video_codec)) return FALSE; @@ -6718,39 +6718,39 @@ gboolean cam_app_init_attribute(void *data, CamMode mode) width = CAM_RESOLUTION_W(camapp->resolution); height = CAM_RESOLUTION_H(camapp->resolution); -#ifdef CAMERA_MACHINE_I686 - width = 320; - height = 240; -#endif +//#ifdef CAMERA_MACHINE_I686 + //width = 320; + //height = 240; +//#endif if (CAM_CAMERA_MODE == mode) { ret &= cam_mm_set_image_size(width, height); ret &= cam_mm_set_image_count(camapp->image_count); -#ifdef CAMERA_MACHINE_I686 - ret &= cam_mm_set_fps(CAMERA_ATTR_FPS_15); - ret &= cam_mm_set_video_source_format(CAMERA_PIXEL_FORMAT_I420); -#else +//#ifdef CAMERA_MACHINE_I686 +// ret &= cam_mm_set_fps(CAMERA_ATTR_FPS_15); + // ret &= cam_mm_set_video_source_format(CAMERA_PIXEL_FORMAT_I420); //BJONES FAILS HERE! +//#else ret &= cam_mm_set_fps(CAMERA_ATTR_FPS_AUTO); ret &= cam_mm_get_video_source_format (NULL, &capture_video_format); ret &= cam_mm_set_video_source_format(capture_video_format); -#endif +//#endif ret &= cam_app_set_capture_format_shooting_mode (camapp->shooting_mode); } else if (CAM_CAMCORDER_MODE == mode) { ret &= cam_mm_set_video_profile(); -#ifdef CAMERA_MACHINE_I686 - ret &= cam_mm_set_fps(CAMERA_ATTR_FPS_15); - ret &= cam_mm_set_video_source_format(CAMERA_PIXEL_FORMAT_I420); -#else +//#ifdef CAMERA_MACHINE_I686 +// ret &= cam_mm_set_fps(CAMERA_ATTR_FPS_15); + // ret &= cam_mm_set_video_source_format(CAMERA_PIXEL_FORMAT_I420); +//#else ret &= cam_mm_set_fps(camapp->fps); ret &= cam_mm_get_video_source_format(NULL, &recording_video_format); ret &= cam_mm_set_video_source_format(recording_video_format); -#endif +//#endif ret &= cam_mm_set_audio_recording(camapp->audio_recording); ret &= cam_app_set_recording_mode(ad, camapp->recording_mode); DEBUG_TRACE("camapp->size_limit = %d" , camapp->size_limit); @@ -6899,13 +6899,14 @@ Evas_Object *cam_app_create_win(const char *name) { Evas_Object *eo = NULL; int w, h; -#ifdef CAMERA_MACHINE_I686 + +/*#ifdef CAMERA_MACHINE_I686 ecore_evas_app_comp_sync_set(EINA_FALSE); eo = elm_win_add(NULL, name, ELM_WIN_BASIC); ecore_evas_app_comp_sync_set(1); -#else +#else */ eo = elm_win_add(NULL, name, ELM_WIN_BASIC); -#endif +//#endif if (eo) { elm_win_title_set(eo, name); elm_win_borderless_set(eo, EINA_TRUE); @@ -7057,9 +7058,9 @@ Eina_Bool __cam_app_update_thumbnail_idler(void *data) /* update thumbnail to quickview after first launching or return from image viewer */ void cam_app_update_quickview_icon(void *data) { -#ifdef CAMERA_MACHINE_I686 - return; -#else +//#ifdef CAMERA_MACHINE_I686 +// return; +//#else struct appdata *ad = (struct appdata *)data; cam_ret_if(ad == NULL); cam_ret_if(ad->camapp_handle == NULL); @@ -7091,14 +7092,14 @@ void cam_app_update_quickview_icon(void *data) } return; -#endif +//#endif } void cam_app_update_thumbnail() { -#ifdef CAMERA_MACHINE_I686 - return; -#else +//#ifdef CAMERA_MACHINE_I686 +// return; +//#else struct appdata *ad = (struct appdata *)cam_appdata_get(); cam_ret_if(ad == NULL); CamAppData *camapp = ad->camapp_handle; @@ -7113,7 +7114,7 @@ void cam_app_update_thumbnail() ad->update_thumbnail_idler = ecore_idler_add(__cam_app_update_thumbnail_idler, ad); } return; -#endif +//#endif } gboolean cam_app_parse_args(CamExeArgs *args, service_h service) -- 2.7.4