From 630b7731b167c28809c98e9496b713f2538a169a Mon Sep 17 00:00:00 2001 From: Francisco Alecrim Date: Tue, 2 Feb 2010 16:08:19 -0400 Subject: [PATCH 086/118] mplayer-maemo-svn: adding mamona modifications Signed-off-by: Francisco Alecrim Signed-off-by: Ricardo Salveti de Araujo --- .../mplayer/files/adding_support_wid_vo-sdl.patch | 144 +++++ .../adapt_maemo_stuff_to_mamona.patch | 210 +++++++ recipes/mplayer/mplayer-maemo/debug.patch | 196 ++++++ .../declaring_function_previously.patch | 12 + .../fix_asm_compile_problem_n770.patch | 11 + .../updating-ao-alsa-compile-latest-alsa.patch | 648 ++++++++++++++++++++ recipes/mplayer/mplayer-maemo_svn.bb | 16 +- 7 files changed, 1232 insertions(+), 5 deletions(-) create mode 100644 recipes/mplayer/files/adding_support_wid_vo-sdl.patch create mode 100644 recipes/mplayer/mplayer-maemo/adapt_maemo_stuff_to_mamona.patch create mode 100644 recipes/mplayer/mplayer-maemo/debug.patch create mode 100644 recipes/mplayer/mplayer-maemo/declaring_function_previously.patch create mode 100644 recipes/mplayer/mplayer-maemo/fix_asm_compile_problem_n770.patch create mode 100644 recipes/mplayer/mplayer-maemo/updating-ao-alsa-compile-latest-alsa.patch diff --git a/recipes/mplayer/files/adding_support_wid_vo-sdl.patch b/recipes/mplayer/files/adding_support_wid_vo-sdl.patch new file mode 100644 index 0000000..fad7710 --- /dev/null +++ b/recipes/mplayer/files/adding_support_wid_vo-sdl.patch @@ -0,0 +1,144 @@ +From 053a3db1e26b133ba659f2db146ccee9515d0b52 Mon Sep 17 00:00:00 2001 +From: Ricardo Salveti +Date: Mon, 16 Jun 2008 09:33:33 -0300 +Subject: [PATCH] Adding support to display inside another window (-wid) with vo=sdl. + +--- + libvo/vo_sdl.c | 84 ++++++++++++++++++++++++++++++++++++++++++++----------- + 1 files changed, 67 insertions(+), 17 deletions(-) + +diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c +index a5bf64a..5cd4f8e 100644 +--- a/libvo/vo_sdl.c ++++ b/libvo/vo_sdl.c +@@ -793,17 +793,32 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin + return -1; + + /* Set output window title */ +- SDL_WM_SetCaption (".: MPlayer : F = Fullscreen/Windowed : C = Cycle Fullscreen Resolutions :.", title); ++ if (WinID < 0) ++ SDL_WM_SetCaption (".: MPlayer : F = Fullscreen/Windowed : C = Cycle Fullscreen Resolutions :.", title); + //SDL_WM_SetCaption (title, title); + + if(priv->X) { +- aspect_save_screenres(priv->XWidth,priv->XHeight); +- aspect(&priv->dstwidth,&priv->dstheight,A_NOZOOM); ++ aspect_save_screenres(priv->XWidth,priv->XHeight); ++ if (WinID > 0) { ++ priv->dstwidth = vo_dwidth; ++ priv->dstheight = vo_dheight; ++ } ++ else { ++ aspect(&priv->dstwidth,&priv->dstheight,A_NOZOOM); ++ } + } + + priv->windowsize.w = priv->dstwidth; + priv->windowsize.h = priv->dstheight; +- ++ ++ /* Ignore the flags when showing inside another window (-wid) */ ++ if (WinID > 0) { ++ set_video_mode(priv->dstwidth, priv->dstheight, priv->bpp, priv->sdlflags); ++ /* For now we don't want the cursor when using with winid */ ++ SDL_ShowCursor(0); ++ if( mp_msg_test(MSGT_VO,MSGL_V) ) { ++ mp_msg(MSGT_VO,MSGL_V, "SDL: setting windowed mode with -wid\n"); } ++ } else { + /* bit 0 (0x01) means fullscreen (-fs) + * bit 1 (0x02) means mode switching (-vm) + * bit 2 (0x04) enables software scaling (-zoom) +@@ -858,6 +873,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin + set_fullmode(priv->fullmode); + } + } ++ } + + if(!priv->surface) { // cannot SetVideoMode + mp_msg(MSGT_VO,MSGL_WARN, MSGTR_LIBVO_SDL_FailedToSetVideoMode, SDL_GetError()); +@@ -1121,7 +1137,20 @@ static void check_events (void) + struct sdl_priv_s *priv = &sdl_priv; + SDL_Event event; + SDLKey keypressed = 0; +- ++ ++ if (WinID > 0) { ++ int ret = 0; ++ ret = vo_x11_check_events(mDisplay); ++ ++ if (ret & VO_EVENT_RESIZE) { ++ priv->windowsize.w = priv->surface->w; ++ priv->windowsize.h = priv->surface->h; ++ set_video_mode(vo_dwidth, vo_dheight, priv->bpp, priv->sdlflags); ++ if( mp_msg_test(MSGT_VO,MSGL_DBG3) ) { ++ mp_msg(MSGT_VO,MSGL_DBG3, "SDL: Window resize\n"); } ++ } ++ } ++ + /* Poll the waiting SDL Events */ + while ( SDL_PollEvent(&event) ) { + switch (event.type) { +@@ -1586,18 +1615,6 @@ static int preinit(const char *arg) + priv->fullmodes = NULL; + priv->bpp = 0; + +- /* initialize the SDL Video system */ +- if (!SDL_WasInit(SDL_INIT_VIDEO)) { +- if (SDL_Init (SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE)) { +- mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SDL_InitializationFailed, SDL_GetError()); +- +- return -1; +- } +- } +- +- SDL_VideoDriverName(priv->driver, 8); +- mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_UsingDriver, priv->driver); +- + priv->X = 0; + #ifdef HAVE_X11 + if(vo_init()) { +@@ -1609,8 +1626,41 @@ static int preinit(const char *arg) + if( mp_msg_test(MSGT_VO,MSGL_V) ) { + mp_msg(MSGT_VO,MSGL_V, "SDL: X11 Resolution %ix%i\n", priv->XWidth, priv->XHeight); } + } ++ ++ /* if user want to display at another window, set sdl windowid */ ++ if (WinID > 0) { ++ char winid[16]; ++ int border, depth; ++ ++ vo_window = WinID ? ((Window) WinID) : mRootWin; ++ XUnmapWindow(mDisplay, vo_window); ++ vo_x11_selectinput_witherr(mDisplay, vo_window, ++ StructureNotifyMask | ++ ExposureMask | ++ VisibilityChangeMask | ++ FocusChangeMask); ++ XMapWindow(mDisplay, vo_window); ++ XGetGeometry(mDisplay, vo_window, &mRootWin, &vo_dx, &vo_dy, ++ &vo_dwidth, &vo_dheight, &border, &depth); ++ ++ /* set sdl windowid env */ ++ sprintf(winid, "%d", WinID); ++ setenv("SDL_WINDOWID", winid, 1); ++ } + #endif + ++ /* initialize the SDL Video system */ ++ if (!SDL_WasInit(SDL_INIT_VIDEO)) { ++ if (SDL_Init (SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE)) { ++ mp_msg(MSGT_VO,MSGL_ERR, MSGTR_LIBVO_SDL_InitializationFailed, SDL_GetError()); ++ ++ return -1; ++ } ++ } ++ ++ SDL_VideoDriverName(priv->driver, 8); ++ mp_msg(MSGT_VO,MSGL_INFO, MSGTR_LIBVO_SDL_UsingDriver, priv->driver); ++ + return 0; + } + +-- +1.5.5.4 + diff --git a/recipes/mplayer/mplayer-maemo/adapt_maemo_stuff_to_mamona.patch b/recipes/mplayer/mplayer-maemo/adapt_maemo_stuff_to_mamona.patch new file mode 100644 index 0000000..328d271 --- /dev/null +++ b/recipes/mplayer/mplayer-maemo/adapt_maemo_stuff_to_mamona.patch @@ -0,0 +1,210 @@ +Index: trunk/configure +=================================================================== +--- trunk.orig/configure 2008-06-04 14:33:44.000000000 -0300 ++++ trunk/configure 2008-06-04 14:33:46.000000000 -0300 +@@ -7483,8 +7483,7 @@ + fi + if test "$_maemo" = yes ; then + _def_maemo='#define HAVE_MAEMO 1' +- _inc_extra="$_inc_extra `pkg-config --cflags libosso`" +- _ld_extra="$_ld_extra `pkg-config --libs libosso` -lXsp" ++ _ld_extra="$_ld_extra -lXsp" + _vosrc="$_vosrc vo_nokia770.c ../libswscale_nokia770/arm_jit_swscale.c ../libswscale_nokia770/arm_colorconv.S" + else + _def_maemo='#undef HAVE_MAEMO' +Index: trunk/libao2/ao_gst.c +=================================================================== +--- trunk.orig/libao2/ao_gst.c 2008-06-04 14:33:44.000000000 -0300 ++++ trunk/libao2/ao_gst.c 2008-06-04 14:33:45.000000000 -0300 +@@ -29,7 +29,7 @@ + + static ao_info_t info = + { +- "Gstreamer audio output for Nokia 770", ++ "Gstreamer audio output for Nokia Internet Tablet", + "gst", + "Siarhei Siamashka ", + "" +@@ -222,10 +222,6 @@ + g_signal_connect(fakesrc, "handoff", G_CALLBACK (cb_handoff), NULL); + } + +-#ifdef HAVE_MAEMO +-extern char *maemo_os_version_string; +-#endif +- + /* + * open & setup audio device + * return: 1=success 0=fail +@@ -238,14 +234,6 @@ + {NULL} + }; + +-#ifdef HAVE_MAEMO +- /* Only OS2006 and OS2007 are supported */ +- if (!strstr(maemo_os_version_string, "2006SE") && !strstr(maemo_os_version_string, "2007SE")) return 0; +- +- /* OS2007 has problems with non MP3 data */ +- if ((format != AF_FORMAT_PADDED_MPEG2) && strstr(maemo_os_version_string, "2007SE")) return 0; +-#endif +- + if (subopt_parse(ao_subdevice, subopts) == 0 && cmdline_volume >= 0) { + if (cmdline_volume > 100) cmdline_volume = 100; + volume = cmdline_volume * MAX_VOLUME / 100; +Index: trunk/libmpcodecs/ad_dspmp3.c +=================================================================== +--- trunk.orig/libmpcodecs/ad_dspmp3.c 2008-06-04 14:33:44.000000000 -0300 ++++ trunk/libmpcodecs/ad_dspmp3.c 2008-06-04 14:33:45.000000000 -0300 +@@ -26,7 +26,7 @@ + + static ad_info_t info = + { +- "MP3 audio pass-through for Nokia 770/N800 (fake decoder)", ++ "MP3 audio pass-through for Nokia Internet Tablet (fake decoder)", + "dspmp3", + "Siarhei Siamashka", + "", +@@ -80,17 +80,8 @@ + return count; + } + +-#ifdef HAVE_MAEMO +-extern char *maemo_os_version_string; +-#endif +- + static int preinit(sh_audio_t *sh) + { +-#ifdef HAVE_MAEMO +- /* Only OS2006 and OS2007 are supported */ +- if (!strstr(maemo_os_version_string, "2006SE") && !strstr(maemo_os_version_string, "2007SE")) return 0; +-#endif +- + sh->audio_out_minsize = 2 * 4608; + sh->audio_in_minsize = 4096; + sh->sample_format = AF_FORMAT_PADDED_MPEG2; +Index: trunk/libvo/vo_nokia770.c +=================================================================== +--- trunk.orig/libvo/vo_nokia770.c 2008-06-04 14:33:45.000000000 -0300 ++++ trunk/libvo/vo_nokia770.c 2008-06-04 15:01:15.000000000 -0300 +@@ -65,7 +65,7 @@ + #include "wskeys.h" + + static vo_info_t info = { +- "Nokia 770 video driver", ++ "Nokia Internet Tablet video driver", + "omapfb", + "", + "" +@@ -571,8 +571,6 @@ + return nokia_found; + } + +-extern char *maemo_os_version_string; +- + /** + * Initialize framebuffer + */ +@@ -592,12 +590,6 @@ + {NULL} + }; + +- /* Initial revision of OS2007 firmware is not supported (different framebuffer driver) */ +- if (strstr(maemo_os_version_string, "2007SE") && strstr(maemo_os_version_string, "2.2006.51-6")) { +- mp_msg(MSGT_VO, MSGL_FATAL, "[omapfb] unsupported firmware revision: %s\n", maemo_os_version_string); +- return -1; +- } +- + if (subopt_parse(arg, subopts) != 0) { + mp_msg(MSGT_VO, MSGL_FATAL, "[omapfb] unknown suboptions: %s\n", arg); + return -1; +Index: trunk/mplayer.c +=================================================================== +--- trunk.orig/mplayer.c 2008-06-04 14:33:44.000000000 -0300 ++++ trunk/mplayer.c 2008-06-04 14:33:45.000000000 -0300 +@@ -168,40 +168,6 @@ + void xscreensaver_heartbeat(void); + #endif + +-#ifdef HAVE_MAEMO +-#include +- +-extern int vo_null_active; +- +-// display blanking prevention for Nokia 770/N800 +-void *maemo_screensaver_heartbeat() +-{ +- static unsigned int time_last; +- static osso_context_t *ossocontext = NULL; +- +- if (vo_null_active) return; +- +- unsigned int time = GetTimerMS(); +- +- if (!ossocontext) { +- ossocontext = osso_initialize("mplayer-cli", VERSION, 0, NULL); +- time_last = time; +- osso_display_state_on(ossocontext); +- osso_display_blanking_pause(ossocontext); +- } +- +- if ((time - time_last) > 55000) +- { +- time_last = time; +- osso_display_state_on(ossocontext); +- osso_display_blanking_pause(ossocontext); +- } else if ((time - time_last) > 50000) { +- time_last = time; +- osso_display_blanking_pause(ossocontext); +- } +-} +-#endif +- + //**************************************************************************// + //**************************************************************************// + // Input media streaming & demultiplexer: +@@ -413,18 +379,6 @@ + // Hack to get video resolution to x11 output module preinit code + int video_x_resolution = -1; + int video_y_resolution = -1; +- +-// Internet Tablet os version identifier +-static char maemo_os_version_buffer[512]; +-char *maemo_os_version_string = maemo_os_version_buffer; +- +-static void detect_maemo_os_version() +-{ +- FILE *f = fopen("/etc/osso_software_version", "r"); +- if (!f || !fgets(maemo_os_version_buffer, sizeof(maemo_os_version_buffer), f)) strcpy(maemo_os_version_buffer, "unknown"); +- if (f) fclose(f); +-} +- + #endif + + /* Saving current filename and current position of videostream */ +@@ -3064,11 +3018,6 @@ + tv_param_immediate = 1; + #endif + +-#ifdef HAVE_MAEMO +- detect_maemo_os_version(); +- mp_msg(MSGT_CPLAYER,MSGL_INFO, "Internet Tablet OS version: %s\n", maemo_os_version_string); +-#endif +- + if (argc > 1 && argv[1] && + (!strcmp(argv[1], "-gui") || !strcmp(argv[1], "-nogui"))) { + use_gui = !strcmp(argv[1], "-gui"); +@@ -5639,14 +5588,6 @@ + } + #endif + +-#ifdef HAVE_MAEMO +-if (sh_video) { +- current_module="stop_maemo_screensaver"; +- maemo_screensaver_heartbeat(); +- current_module=NULL; +-} +-#endif +- + // DVD sub: + if(vo_config_count && vo_spudec) { + unsigned char* packet=NULL; diff --git a/recipes/mplayer/mplayer-maemo/debug.patch b/recipes/mplayer/mplayer-maemo/debug.patch new file mode 100644 index 0000000..cd10047 --- /dev/null +++ b/recipes/mplayer/mplayer-maemo/debug.patch @@ -0,0 +1,196 @@ +Index: trunk/libvo/vo_nokia770.c +=================================================================== +--- trunk.orig/libvo/vo_nokia770.c 2008-06-06 14:35:48.000000000 -0300 ++++ trunk/libvo/vo_nokia770.c 2008-06-06 15:26:53.000000000 -0300 +@@ -135,9 +135,9 @@ + if (((in_width != out_width) || (in_height != out_height) || out_omapfb_format == OMAPFB_COLOR_YUV420) && jit_scaler_level > 0) { + if (jit_scaler_level > 2) jit_scaler_level = 2; + if (out_omapfb_format == OMAPFB_COLOR_YUV420) { +- if (n800_flag) +- sws_jit = sws_arm_jit_create_omapfb_yuv420_scaler_armv6(in_width, in_height, out_width, out_height, jit_scaler_level); +- else ++ //if (n800_flag) ++ // sws_jit = sws_arm_jit_create_omapfb_yuv420_scaler_armv6(in_width, in_height, out_width, out_height, jit_scaler_level); ++ //else + sws_jit = sws_arm_jit_create_omapfb_yuv420_scaler(in_width, in_height, out_width, out_height, jit_scaler_level); + if (sws_jit) { + mp_msg(MSGT_VO, MSGL_INFO, "[omapfb] ARM JIT scaler (quality=%d): %dx%d YV12 => %dx%d YUV420\n", +@@ -214,6 +214,8 @@ + if (ww) *ww = attribs.width; + if (wh) *wh = attribs.height; + ++ fprintf(stderr, "[omapfb] (wx, wy, ww, wh) (%d, %d, %d, %d)\n", *wx, *wy, ((ww)?*ww:-1), ((wh)?*wh:-1)); ++ + /* Query window tree information */ + XQueryTree(display, window, &root, &parent, &child, &n_children); + if (parent) +@@ -223,6 +225,7 @@ + n770_x11_get_window_abs_position(display, parent, &x, &y, NULL, NULL); + *wx += x; + *wy += y; ++ fprintf(stderr, "[omapfb] Entrei no if(parent): (x, y)\n", x, y); + } + + /* If we had children, free it */ +@@ -272,6 +275,7 @@ + */ + static void n770_x11_init() + { ++ mp_msg(MSGT_VO, MSGL_ERR, "%s - %d\n", __FUNCTION__, __LINE__); + display = XOpenDisplay(getenv("DISPLAY")); + if (display == NULL) { + mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] failure in n770_x11_init, can't open display\n"); +@@ -286,6 +290,7 @@ + Window *child; + unsigned int n_children; + ++ mp_msg(MSGT_VO, MSGL_ERR, "%s - %d\n", __FUNCTION__, __LINE__); + win = WinID; + + /* Query window tree information */ +@@ -301,15 +306,19 @@ + wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False); + XSetWMProtocols(display, win, &wm_delete_window, 1); + } else { ++ mp_msg(MSGT_VO, MSGL_ERR, "%s - %d\n", __FUNCTION__, __LINE__); + win = XCreateSimpleWindow(display, RootWindow(display, screen_num), + 0, 0, 720, 420, 0, + WhitePixel(display, screen_num), + BlackPixel(display, screen_num)); + +- if (n800_flag) ++ if (n800_flag){ ++ mp_msg(MSGT_VO, MSGL_ERR, "%s - %d\n", __FUNCTION__, __LINE__); + XSetClassHint(display, win, &classhint_800); +- else ++ }else{ ++ mp_msg(MSGT_VO, MSGL_ERR, "%s - %d\n", __FUNCTION__, __LINE__); + XSetClassHint(display, win, &classhint_770); ++ } + + XStoreName(display, win, "MPlayer"); + XMapWindow(display, win); +@@ -342,6 +351,7 @@ + XNextEvent(display, &Event); + if (Event.type == ConfigureNotify) { + if (Event.xconfigure.window == win) { ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + n770_x11_get_window_abs_position(display, win, &windowed_out_x, &windowed_out_y, &windowed_out_w, &windowed_out_h); + set_fb_overlay_region(windowed_out_x, windowed_out_y, windowed_out_w, windowed_out_h); + } +@@ -409,11 +419,21 @@ + update.out_height = out_h; + update.format = format; + ++// { ++// int j,k; ++// int pix = 0xFF; ++// int size = 80; ++// for(j = 0, k = 0; j < fb_vinfo.yres; j++, k = k + fb_finfo.line_length) ++// memset(frame_buffer + k, pix, size); ++// } ++ + if (tearsync_flag) update.format |= OMAPFB_FORMAT_FLAG_TEARSYNC; ++ //mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] (format) (%x) (x, y, w, h) (%d, %d, %d, %d) out(w, h) (%d, %d)\n", update.format, update.x, update.y, update.width, update.height, update.out_width, update.out_height); + ioctl(fb_dev_fd, OMAPFB_UPDATE_WINDOW, &update); + } else { + // Pixel doubling supported + struct omapfb_update_window_old update; ++ mp_msg(MSGT_VO, MSGL_ERR, "%s - %d\n", __FUNCTION__, __LINE__); + update.x = x; + update.y = y; + update.width = w; +@@ -445,15 +465,18 @@ + ioctl(fb_dev_fd, OMAPFB_SYNC_GFX); + + // Calculate output video size for software scaling (and pixel doubling for Nokia 770) ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] (in_width, prescaled_width, in_height, prescaled_height, w, h) (%d, %d, %d, %d, %d, %d)\n", in_width, prescaled_width, in_height, prescaled_height, w, h); + if ((in_width == prescaled_width) && (in_height == prescaled_height) && + (((in_width == w) && (in_height <= h)) || + ((in_width <= w) && (in_height == h)))) { + // Special case, for nonscaled video that can be used without pixel doubling or scaling ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + out_sws_width = in_width; + out_sws_height = in_height; + out_hws_width = in_width; + out_hws_height = in_height; + } else { ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + aspect_save_orig(in_width, in_height); + aspect_save_prescale(prescaled_width, prescaled_height); + if (!pixeldoubling_flag || n800_flag || in_width > w || in_height > h +@@ -475,13 +498,17 @@ + } + } + ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] (n800_flag, out_sws_width, in_width, out_sws_height, in_height) (%d, %d, %d, %d, %d)\n", n800_flag, out_sws_width, in_width, out_sws_height, in_height); + if (n800_flag && out_sws_width >= in_width && out_sws_height >= in_height) { ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + // N800 does not need software upscaling (hardware scaling does the job better) + out_sws_width = in_width; + out_sws_height = in_height; + } ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + + if (!frame_buffer) { ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + if (ioctl(fb_dev_fd, FBIOGET_VSCREENINFO, &fb_vinfo)) { + mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] Panic! Can't get VSCREENINFO: %s\n", strerror(errno)); + exit(1); +@@ -504,6 +531,7 @@ + exit(1); + } + } ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + + out_x = (x + (w - out_hws_width) / 2) & ~1; + out_y = (y + (h - out_hws_height) / 2) & ~1; +@@ -641,6 +669,7 @@ + if (yuv420_flag < 0) yuv420_flag = (caps.ctrl & OMAPFB_CAPS_TEARSYNC) != 0; + + mp_msg(MSGT_VO, MSGL_INFO, "[omapfb] tearsync is %s\n", (tearsync_flag ? "enabled" : "disabled")); ++ mp_msg(MSGT_VO, MSGL_INFO, "[omapfb] yuv420_flag = %d\n", yuv420_flag); + + fb_preinit_success = 1; + +@@ -683,15 +712,18 @@ + + if (WinID > 0) { + video_enabled_flag = 0; ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + n770_x11_get_window_abs_position(display, win, &windowed_out_x, &windowed_out_y, &windowed_out_w, &windowed_out_h); + set_fb_overlay_region(windowed_out_x, windowed_out_y, windowed_out_w, windowed_out_h); + } else { + video_enabled_flag = 1; + if (fullscreen_flag) { + if (!fb_overlay_only) n770_x11_set_fullscreen_state(display, win, 1); ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + set_fb_overlay_region(0, 0, SCREEN_MAX_WIDTH, SCREEN_MAX_HEIGHT); + } else { + if (!fb_overlay_only) n770_x11_set_fullscreen_state(display, win, 0); ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + set_fb_overlay_region(windowed_out_x, windowed_out_y, windowed_out_w, windowed_out_h); + } + } +@@ -789,11 +821,13 @@ + if (fullscreen_flag) { + if (!fb_overlay_only) n770_x11_set_fullscreen_state(display, win, 0); + fullscreen_flag = 0; ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + set_fb_overlay_region(windowed_out_x, windowed_out_y, windowed_out_w, windowed_out_h); + } else { + if (!fb_overlay_only) n770_x11_set_fullscreen_state(display, win, 1); + fullscreen_flag = 1; + video_enabled_flag = 1; ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + set_fb_overlay_region(0, 0, SCREEN_MAX_WIDTH, SCREEN_MAX_HEIGHT); + } + return VO_TRUE; +@@ -808,6 +842,7 @@ + va_end(ap); + if (fullscreen_flag && !fb_overlay_only) n770_x11_set_fullscreen_state(display, win, 0); + fullscreen_flag = 0; ++ mp_msg(MSGT_VO, MSGL_ERR, "[omapfb] %s - %d\n", __FUNCTION__, __LINE__); + set_fb_overlay_region(windowed_out_x, windowed_out_y, windowed_out_w, windowed_out_h); + return VO_TRUE; + } diff --git a/recipes/mplayer/mplayer-maemo/declaring_function_previously.patch b/recipes/mplayer/mplayer-maemo/declaring_function_previously.patch new file mode 100644 index 0000000..64b5124 --- /dev/null +++ b/recipes/mplayer/mplayer-maemo/declaring_function_previously.patch @@ -0,0 +1,12 @@ +Index: trunk/libvo/vo_nokia770.c +=================================================================== +--- trunk.orig/libvo/vo_nokia770.c 2008-06-03 10:56:12.000000000 -0300 ++++ trunk/libvo/vo_nokia770.c 2008-06-03 10:57:11.000000000 -0300 +@@ -119,6 +119,7 @@ + static int fb_preinit_success = 0; // framebuffer was successfully initialized and can be used + + static void omapfb_screen_update(int x, int y, int w, int h, int out_w, int out_h, int format); ++static int set_fb_overlay_region(int x, int y, int w, int h); + + /******************************************************************************/ + /* Scaler related functions are here */ diff --git a/recipes/mplayer/mplayer-maemo/fix_asm_compile_problem_n770.patch b/recipes/mplayer/mplayer-maemo/fix_asm_compile_problem_n770.patch new file mode 100644 index 0000000..9a3ebb8 --- /dev/null +++ b/recipes/mplayer/mplayer-maemo/fix_asm_compile_problem_n770.patch @@ -0,0 +1,11 @@ +diff -Naur trunk/libswscale_nokia770/arm_colorconv.S trunk-new/libswscale_nokia770/arm_colorconv.S +--- trunk/libswscale_nokia770/arm_colorconv.S 2008-04-22 20:30:18.000000000 -0300 ++++ trunk-new/libswscale_nokia770/arm_colorconv.S 2008-04-22 20:29:01.000000000 -0300 +@@ -143,6 +143,7 @@ + .endm + + .if \USE_ARMV6 ++.arch armv6 + + .macro CONVERT_8_PIXELS_MACROBLOCK_1 DST_REG1, DST_REG2, FLAG1, FLAG2, PLD_FLAG + .if \FLAG1 == 0 diff --git a/recipes/mplayer/mplayer-maemo/updating-ao-alsa-compile-latest-alsa.patch b/recipes/mplayer/mplayer-maemo/updating-ao-alsa-compile-latest-alsa.patch new file mode 100644 index 0000000..4ad7c30 --- /dev/null +++ b/recipes/mplayer/mplayer-maemo/updating-ao-alsa-compile-latest-alsa.patch @@ -0,0 +1,648 @@ +From 8b52679d9d83ed92d977d456a290cef2f752ae35 Mon Sep 17 00:00:00 2001 +From: Ricardo Salveti +Date: Thu, 8 Jan 2009 16:35:38 -0300 +Subject: [PATCH] Updating ao_alsa to let it compile with latest alsa-lib. + +This patch is based on the following revs from mplayer-trunk: + * 20759 + * 20780 + * 22184 + +Signed-off-by: Ricardo Salveti +--- + ChangeLog | 4 + + help/help_mp-en.h | 54 ++++++++++++++ + libao2/ao_alsa.c | 208 ++++++++++++++++++++++++----------------------------- + 3 files changed, 153 insertions(+), 113 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 012fcc8..a3585e0 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -77,6 +77,10 @@ MPlayer (1.0) + * OpenGL can now create windows > screen size under Windows + * allow filenames starting with \\ for remote paths on Windows + ++ Drivers: ++ * ALSA audio output now sets the non-audio bit for AC3 passthrough even ++ if the user-specified default device name tries to clear it ++ + Others: + * SSA/ASS subtitle renderer + * -endpos option for MPlayer +diff --git a/help/help_mp-en.h b/help/help_mp-en.h +index c5da044..8b3f90c 100644 +--- a/help/help_mp-en.h ++++ b/help/help_mp-en.h +@@ -1156,6 +1156,60 @@ static char help_text[]= + #define MSGTR_AO_ALSA5_WriteErrorAfterReset "[AO ALSA5] alsa-play: write error after reset: %s - giving up.\n" + #define MSGTR_AO_ALSA5_OutPutError "[AO ALSA5] alsa-play: output error: %s\n" + ++// ao_alsa.c ++#define MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero "[AO_ALSA] Invalid mixer index. Defaulting to 0.\n" ++#define MSGTR_AO_ALSA_MixerOpenError "[AO_ALSA] Mixer open error: %s\n" ++#define MSGTR_AO_ALSA_MixerAttachError "[AO_ALSA] Mixer attach %s error: %s\n" ++#define MSGTR_AO_ALSA_MixerRegisterError "[AO_ALSA] Mixer register error: %s\n" ++#define MSGTR_AO_ALSA_MixerLoadError "[AO_ALSA] Mixer load error: %s\n" ++#define MSGTR_AO_ALSA_UnableToFindSimpleControl "[AO_ALSA] Unable to find simple control '%s',%i.\n" ++#define MSGTR_AO_ALSA_ErrorSettingLeftChannel "[AO_ALSA] Error setting left channel, %s\n" ++#define MSGTR_AO_ALSA_ErrorSettingRightChannel "[AO_ALSA] Error setting right channel, %s\n" ++#define MSGTR_AO_ALSA_CommandlineHelp "\n[AO_ALSA] -ao alsa commandline help:\n"\ ++"[AO_ALSA] Example: mplayer -ao alsa:device=hw=0.3\n"\ ++"[AO_ALSA] Sets first card fourth hardware device.\n\n"\ ++"[AO_ALSA] Options:\n"\ ++"[AO_ALSA] noblock\n"\ ++"[AO_ALSA] Opens device in non-blocking mode.\n"\ ++"[AO_ALSA] device=\n"\ ++"[AO_ALSA] Sets device (change , to . and : to =)\n" ++#define MSGTR_AO_ALSA_ChannelsNotSupported "[AO_ALSA] %d channels are not supported.\n" ++#define MSGTR_AO_ALSA_OpenInNonblockModeFailed "[AO_ALSA] Open in nonblock-mode failed, trying to open in block-mode.\n" ++#define MSGTR_AO_ALSA_PlaybackOpenError "[AO_ALSA] Playback open error: %s\n" ++#define MSGTR_AO_ALSA_ErrorSetBlockMode "[AL_ALSA] Error setting block-mode %s.\n" ++#define MSGTR_AO_ALSA_UnableToGetInitialParameters "[AO_ALSA] Unable to get initial parameters: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetAccessType "[AO_ALSA] Unable to set access type: %s\n" ++#define MSGTR_AO_ALSA_FormatNotSupportedByHardware "[AO_ALSA] Format %s is not supported by hardware, trying default.\n" ++#define MSGTR_AO_ALSA_UnableToSetFormat "[AO_ALSA] Unable to set format: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetChannels "[AO_ALSA] Unable to set channels: %s\n" ++#define MSGTR_AO_ALSA_UnableToDisableResampling "[AO_ALSA] Unable to disable resampling: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetSamplerate2 "[AO_ALSA] Unable to set samplerate-2: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetBufferTimeNear "[AO_ALSA] Unable to set buffer time near: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetPeriodTime "[AO_ALSA] Unable to set period time: %s\n" ++#define MSGTR_AO_ALSA_BufferTimePeriodTime "[AO_ALSA] buffer_time: %d, period_time :%d\n" ++#define MSGTR_AO_ALSA_UnableToGetPeriodSize "[AO ALSA] Unable to get period size: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetPeriodSize "[AO ALSA] Unable to set period size(%ld): %s\n" ++#define MSGTR_AO_ALSA_UnableToSetPeriods "[AO_ALSA] Unable to set periods: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetHwParameters "[AO_ALSA] Unable to set hw-parameters: %s\n" ++#define MSGTR_AO_ALSA_UnableToGetBufferSize "[AO_ALSA] Unable to get buffersize: %s\n" ++#define MSGTR_AO_ALSA_UnableToGetSwParameters "[AO_ALSA] Unable to get sw-parameters: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetSwParameters "[AO_ALSA] Unable to set sw-parameters: %s\n" ++#define MSGTR_AO_ALSA_UnableToGetBoundary "[AO_ALSA] Unable to get boundary: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetStartThreshold "[AO_ALSA] Unable to set start threshold: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetStopThreshold "[AO_ALSA] Unable to set stop threshold: %s\n" ++#define MSGTR_AO_ALSA_UnableToSetSilenceSize "[AO_ALSA] Unable to set silence size: %s\n" ++#define MSGTR_AO_ALSA_PcmCloseError "[AO_ALSA] pcm close error: %s\n" ++#define MSGTR_AO_ALSA_NoHandlerDefined "[AO_ALSA] No handler defined!\n" ++#define MSGTR_AO_ALSA_PcmPrepareError "[AO_ALSA] pcm prepare error: %s\n" ++#define MSGTR_AO_ALSA_PcmPauseError "[AO_ALSA] pcm pause error: %s\n" ++#define MSGTR_AO_ALSA_PcmDropError "[AO_ALSA] pcm drop error: %s\n" ++#define MSGTR_AO_ALSA_PcmResumeError "[AO_ALSA] pcm resume error: %s\n" ++#define MSGTR_AO_ALSA_DeviceConfigurationError "[AO_ALSA] Device configuration error." ++#define MSGTR_AO_ALSA_PcmInSuspendModeTryingResume "[AO_ALSA] Pcm in suspend mode, trying to resume.\n" ++#define MSGTR_AO_ALSA_WriteError "[AO_ALSA] Write error: %s\n" ++#define MSGTR_AO_ALSA_TryingToResetSoundcard "[AO_ALSA] Trying to reset soundcard.\n" ++#define MSGTR_AO_ALSA_CannotGetPcmStatus "[AO_ALSA] Cannot get pcm status: %s\n" ++ + // ao_plugin.c + + #define MSGTR_AO_PLUGIN_InvalidPlugin "[AO PLUGIN] invalid plugin: %s\n" +diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c +index 34f4b32..070b6be 100644 +--- a/libao2/ao_alsa.c ++++ b/libao2/ao_alsa.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -23,6 +24,7 @@ + #include "subopt-helper.h" + #include "mixer.h" + #include "mp_msg.h" ++#include "help_mp.h" + + #define ALSA_PCM_NEW_HW_PARAMS_API + #define ALSA_PCM_NEW_SW_PARAMS_API +@@ -85,10 +87,10 @@ static void alsa_error_handler(const char *file, int line, const char *function, + tmp[sizeof tmp - 1] = '\0'; + + if (err) +- mp_msg(MSGT_AO, MSGL_ERR, "alsa-lib: %s:%i:(%s) %s: %s\n", ++ mp_msg(MSGT_AO, MSGL_ERR, "[AO_ALSA] alsa-lib: %s:%i:(%s) %s: %s\n", + file, line, function, tmp, snd_strerror(err)); + else +- mp_msg(MSGT_AO, MSGL_ERR, "alsa-lib: %s:%i:(%s) %s\n", ++ mp_msg(MSGT_AO, MSGL_ERR, "[AO_ALSA] alsa-lib: %s:%i:(%s) %s\n", + file, line, function, tmp); + } + +@@ -127,7 +129,7 @@ static int control(int cmd, void *arg) + + if (*test_mix_index){ + mp_msg(MSGT_AO,MSGL_ERR, +- "alsa-control: invalid mixer index. Defaulting to 0\n"); ++ MSGTR_AO_ALSA_InvalidMixerIndexDefaultingToZero); + mix_index = 0 ; + } + } +@@ -150,32 +152,32 @@ static int control(int cmd, void *arg) + } + + if ((err = snd_mixer_open(&handle, 0)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-control: mixer open error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerOpenError, snd_strerror(err)); + return CONTROL_ERROR; + } + + if ((err = snd_mixer_attach(handle, card)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-control: mixer attach %s error: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerAttachError, + card, snd_strerror(err)); + snd_mixer_close(handle); + return CONTROL_ERROR; + } + + if ((err = snd_mixer_selem_register(handle, NULL, NULL)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-control: mixer register error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerRegisterError, snd_strerror(err)); + snd_mixer_close(handle); + return CONTROL_ERROR; + } + err = snd_mixer_load(handle); + if (err < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-control: mixer load error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_MixerLoadError, snd_strerror(err)); + snd_mixer_close(handle); + return CONTROL_ERROR; + } + + elem = snd_mixer_find_selem(handle, sid); + if (!elem) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-control: unable to find simple control '%s',%i\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToFindSimpleControl, + snd_mixer_selem_id_get_name(sid), snd_mixer_selem_id_get_index(sid)); + snd_mixer_close(handle); + return CONTROL_ERROR; +@@ -190,7 +192,7 @@ static int control(int cmd, void *arg) + + //setting channels + if ((err = snd_mixer_selem_set_playback_volume(elem, 0, set_vol)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-control: error setting left channel, %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingLeftChannel, + snd_strerror(err)); + return CONTROL_ERROR; + } +@@ -199,7 +201,7 @@ static int control(int cmd, void *arg) + set_vol = vol->right / f_multi + pmin + 0.5; + + if ((err = snd_mixer_selem_set_playback_volume(elem, 1, set_vol)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-control: error setting right channel, %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingRightChannel, + snd_strerror(err)); + return CONTROL_ERROR; + } +@@ -247,14 +249,7 @@ static void parse_device (char *dest, const char *src, int len) + static void print_help (void) + { + mp_msg (MSGT_AO, MSGL_FATAL, +- "\n-ao alsa commandline help:\n" +- "Example: mplayer -ao alsa:device=hw=0.3\n" +- " sets first card fourth hardware device\n" +- "\nOptions:\n" +- " noblock\n" +- " Opens device in non-blocking mode\n" +- " device=\n" +- " Sets device (change , to . and : to =)\n"); ++ MSGTR_AO_ALSA_CommandlineHelp); + } + + static int str_maxlen(strarg_t *str) { +@@ -263,48 +258,49 @@ static int str_maxlen(strarg_t *str) { + return 1; + } + +-/* change a PCM definition for correct AC-3 playback */ +-static void set_non_audio(snd_config_t *root, const char *name_with_args) ++static int try_open_device(const char *device, int open_mode, int try_ac3) + { +- char *name, *colon, *old_value_str; +- snd_config_t *config, *args, *aes0, *old_def, *def; +- int value, err; +- +- /* strip the parameters from the PCM name */ +- if ((name = strdup(name_with_args)) != NULL) { +- if ((colon = strchr(name, ':')) != NULL) +- *colon = '\0'; +- /* search the PCM definition that we'll later use */ +- if (snd_config_search_alias_hooks(root, strchr(name, '.') ? NULL : "pcm", +- name, &config) >= 0) { +- /* does this definition have an "AES0" parameter? */ +- if (snd_config_search(config, "@args", &args) >= 0 && +- snd_config_search(args, "AES0", &aes0) >= 0) { +- /* read the old default value */ +- value = IEC958_AES0_CON_NOT_COPYRIGHT | +- IEC958_AES0_CON_EMPHASIS_NONE; +- if (snd_config_search(aes0, "default", &old_def) >= 0) { +- /* don't use snd_config_get_integer() because alsa-lib <= 1.0.12 +- * parses hex numbers as strings */ +- if (snd_config_get_ascii(old_def, &old_value_str) >= 0) { +- sscanf(old_value_str, "%i", &value); +- free(old_value_str); +- } +- } else +- old_def = NULL; +- /* set the non-audio bit */ +- value |= IEC958_AES0_NONAUDIO; +- /* set the new default value */ +- if (snd_config_imake_integer(&def, "default", value) >= 0) { +- if (old_def) +- snd_config_substitute(old_def, def); +- else +- snd_config_add(aes0, def); +- } ++ int err, len; ++ char *ac3_device, *args; ++ ++ if (try_ac3) { ++ /* to set the non-audio bit, use AES0=6 */ ++ len = strlen(device); ++ ac3_device = malloc(len + 7 + 1); ++ if (!ac3_device) ++ return -ENOMEM; ++ strcpy(ac3_device, device); ++ args = strchr(ac3_device, ':'); ++ if (!args) { ++ /* no existing parameters: add it behind device name */ ++ strcat(ac3_device, ":AES0=6"); ++ } else { ++ do ++ ++args; ++ while (isspace(*args)); ++ if (*args == '\0') { ++ /* ":" but no parameters */ ++ strcat(ac3_device, "AES0=6"); ++ } else if (*args != '{') { ++ /* a simple list of parameters: add it at the end of the list */ ++ strcat(ac3_device, ",AES0=6"); ++ } else { ++ /* parameters in config syntax: add it inside the { } block */ ++ do ++ --len; ++ while (len > 0 && isspace(ac3_device[len])); ++ if (ac3_device[len] == '}') ++ strcpy(ac3_device + len, " AES0=6}"); + } + } +- free(name); ++ err = snd_pcm_open(&alsa_handler, ac3_device, SND_PCM_STREAM_PLAYBACK, ++ open_mode); ++ free(ac3_device); + } ++ if (!try_ac3 || err < 0) ++ err = snd_pcm_open(&alsa_handler, device, SND_PCM_STREAM_PLAYBACK, ++ open_mode); ++ return err; + } + + /* +@@ -316,7 +312,6 @@ static int init(int rate_hz, int channels, int format, int flags) + int err; + int block; + strarg_t device; +- snd_config_t *my_config; + snd_pcm_uframes_t bufsize; + snd_pcm_uframes_t boundary; + opt_t subopts[] = { +@@ -440,7 +435,7 @@ static int init(int rate_hz, int channels, int format, int flags) + break; + default: + device.str = "default"; +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: %d channels are not supported\n",channels); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ChannelsNotSupported,channels); + } + device.len = strlen(device.str); + if (subopt_parse(ao_subdevice, subopts) != 0) { +@@ -496,38 +491,25 @@ static int init(int rate_hz, int channels, int format, int flags) + } + + if (!alsa_handler) { +- if ((err = snd_config_update()) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: cannot read ALSA configuration: %s\n", snd_strerror(err)); +- return 0; +- } +- if ((err = snd_config_copy(&my_config, snd_config)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: cannot copy configuration: %s\n", snd_strerror(err)); +- return 0; +- } +- if (format == AF_FORMAT_AC3) +- set_non_audio(my_config, alsa_device); + //modes = 0, SND_PCM_NONBLOCK, SND_PCM_ASYNC +- if ((err = snd_pcm_open_lconf(&alsa_handler, alsa_device, +- SND_PCM_STREAM_PLAYBACK, open_mode, my_config)) < 0) ++ if ((err = try_open_device(alsa_device, open_mode, format == AF_FORMAT_AC3)) < 0) + { + if (err != -EBUSY && ao_noblock) { +- mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: open in nonblock-mode failed, trying to open in block-mode\n"); +- if ((err = snd_pcm_open_lconf(&alsa_handler, alsa_device, +- SND_PCM_STREAM_PLAYBACK, 0, my_config)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: playback open error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_OpenInNonblockModeFailed); ++ if ((err = try_open_device(alsa_device, 0, format == AF_FORMAT_AC3)) < 0) { ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PlaybackOpenError, snd_strerror(err)); + return(0); + } + } else { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: playback open error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PlaybackOpenError, snd_strerror(err)); + return(0); + } + } +- snd_config_delete(my_config); + + if ((err = snd_pcm_nonblock(alsa_handler, 0)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: error set block-mode %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSetBlockMode, snd_strerror(err)); + } else { +- mp_msg(MSGT_AO,MSGL_V,"alsa-init: pcm opend in blocking mode\n"); ++ mp_msg(MSGT_AO,MSGL_V,"alsa-init: pcm opened in blocking mode\n"); + } + + snd_pcm_hw_params_alloca(&alsa_hwparams); +@@ -536,7 +518,7 @@ static int init(int rate_hz, int channels, int format, int flags) + // setting hw-parameters + if ((err = snd_pcm_hw_params_any(alsa_handler, alsa_hwparams)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to get initial parameters: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetInitialParameters, + snd_strerror(err)); + return(0); + } +@@ -544,7 +526,7 @@ static int init(int rate_hz, int channels, int format, int flags) + err = snd_pcm_hw_params_set_access(alsa_handler, alsa_hwparams, + SND_PCM_ACCESS_RW_INTERLEAVED); + if (err < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set access type: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetAccessType, + snd_strerror(err)); + return (0); + } +@@ -555,7 +537,7 @@ static int init(int rate_hz, int channels, int format, int flags) + alsa_format)) < 0) + { + mp_msg(MSGT_AO,MSGL_INFO, +- "alsa-init: format %s are not supported by hardware, trying default\n", af_fmt2str_short(format)); ++ MSGTR_AO_ALSA_FormatNotSupportedByHardware, af_fmt2str_short(format)); + alsa_format = SND_PCM_FORMAT_S16_LE; + ao_data.format = AF_FORMAT_S16_LE; + } +@@ -563,7 +545,7 @@ static int init(int rate_hz, int channels, int format, int flags) + if ((err = snd_pcm_hw_params_set_format(alsa_handler, alsa_hwparams, + alsa_format)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set format: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetFormat, + snd_strerror(err)); + return(0); + } +@@ -571,7 +553,7 @@ static int init(int rate_hz, int channels, int format, int flags) + if ((err = snd_pcm_hw_params_set_channels_near(alsa_handler, alsa_hwparams, + &ao_data.channels)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set channels: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetChannels, + snd_strerror(err)); + return(0); + } +@@ -582,7 +564,7 @@ static int init(int rate_hz, int channels, int format, int flags) + if ((err = snd_pcm_hw_params_set_rate_resample(alsa_handler, alsa_hwparams, + 0)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to disable resampling: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToDisableResampling, + snd_strerror(err)); + return(0); + } +@@ -591,7 +573,7 @@ static int init(int rate_hz, int channels, int format, int flags) + if ((err = snd_pcm_hw_params_set_rate_near(alsa_handler, alsa_hwparams, + &ao_data.samplerate, NULL)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set samplerate-2: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetSamplerate2, + snd_strerror(err)); + return(0); + } +@@ -608,7 +590,7 @@ static int init(int rate_hz, int channels, int format, int flags) + if ((err = snd_pcm_hw_params_set_buffer_time_near(alsa_handler, alsa_hwparams, + &alsa_buffer_time, NULL)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set buffer time near: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetBufferTimeNear, + snd_strerror(err)); + return(0); + } else +@@ -618,11 +600,11 @@ static int init(int rate_hz, int channels, int format, int flags) + &alsa_period_time, NULL)) < 0) + /* original: alsa_buffer_time/ao_data.bps */ + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set period time: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetPeriodTime, + snd_strerror(err)); + return 0; + } +- mp_msg(MSGT_AO,MSGL_INFO,"alsa-init: buffer_time: %d, period_time :%d\n", ++ mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_BufferTimePeriodTime, + alsa_buffer_time, err); + } + #endif//end SET_BUFFERTIME +@@ -633,7 +615,7 @@ static int init(int rate_hz, int channels, int format, int flags) + if ((err = snd_pcm_hw_params_set_period_size_near(alsa_handler, alsa_hwparams, + &chunk_size, NULL)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set periodsize(%ld): %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetPeriodSize, + chunk_size, snd_strerror(err)); + return 0; + } +@@ -642,7 +624,7 @@ static int init(int rate_hz, int channels, int format, int flags) + } + if ((err = snd_pcm_hw_params_set_periods_near(alsa_handler, alsa_hwparams, + &alsa_fragcount, NULL)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set periods: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetPeriods, + snd_strerror(err)); + return 0; + } +@@ -655,7 +637,7 @@ static int init(int rate_hz, int channels, int format, int flags) + /* finally install hardware parameters */ + if ((err = snd_pcm_hw_params(alsa_handler, alsa_hwparams)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set hw-parameters: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetHwParameters, + snd_strerror(err)); + return 0; + } +@@ -665,7 +647,7 @@ static int init(int rate_hz, int channels, int format, int flags) + // gets buffersize for control + if ((err = snd_pcm_hw_params_get_buffer_size(alsa_hwparams, &bufsize)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to get buffersize: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetBufferSize, snd_strerror(err)); + return 0; + } + else { +@@ -674,7 +656,7 @@ static int init(int rate_hz, int channels, int format, int flags) + } + + if ((err = snd_pcm_hw_params_get_period_size(alsa_hwparams, &chunk_size, NULL)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to get period size: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetPeriodSize, snd_strerror(err)); + return 0; + } else { + mp_msg(MSGT_AO,MSGL_V,"alsa-init: got period size %li\n", chunk_size); +@@ -683,13 +665,13 @@ static int init(int rate_hz, int channels, int format, int flags) + + /* setting software parameters */ + if ((err = snd_pcm_sw_params_current(alsa_handler, alsa_swparams)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to get sw-parameters: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetSwParameters, + snd_strerror(err)); + return 0; + } + #if SND_LIB_VERSION >= 0x000901 + if ((err = snd_pcm_sw_params_get_boundary(alsa_swparams, &boundary)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to get boundary: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetBoundary, + snd_strerror(err)); + return 0; + } +@@ -698,26 +680,26 @@ static int init(int rate_hz, int channels, int format, int flags) + #endif + /* start playing when one period has been written */ + if ((err = snd_pcm_sw_params_set_start_threshold(alsa_handler, alsa_swparams, chunk_size)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set start threshold: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetStartThreshold, + snd_strerror(err)); + return 0; + } + /* disable underrun reporting */ + if ((err = snd_pcm_sw_params_set_stop_threshold(alsa_handler, alsa_swparams, boundary)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set stop threshold: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetStopThreshold, + snd_strerror(err)); + return 0; + } + #if SND_LIB_VERSION >= 0x000901 + /* play silence when there is an underrun */ + if ((err = snd_pcm_sw_params_set_silence_size(alsa_handler, alsa_swparams, boundary)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set silence size: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToSetSilenceSize, + snd_strerror(err)); + return 0; + } + #endif + if ((err = snd_pcm_sw_params(alsa_handler, alsa_swparams)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-init: unable to set sw-parameters: %s\n", ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_UnableToGetSwParameters, + snd_strerror(err)); + return 0; + } +@@ -745,7 +727,7 @@ static void uninit(int immed) + + if ((err = snd_pcm_close(alsa_handler)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-uninit: pcm close error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmCloseError, snd_strerror(err)); + return; + } + else { +@@ -754,7 +736,7 @@ static void uninit(int immed) + } + } + else { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-uninit: no handler defined!\n"); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_NoHandlerDefined); + } + } + +@@ -765,14 +747,14 @@ static void audio_pause(void) + if (alsa_can_pause) { + if ((err = snd_pcm_pause(alsa_handler, 1)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-pause: pcm pause error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPauseError, snd_strerror(err)); + return; + } + mp_msg(MSGT_AO,MSGL_V,"alsa-pause: pause supported by hardware\n"); + } else { + if ((err = snd_pcm_drop(alsa_handler)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-pause: pcm drop error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmDropError, snd_strerror(err)); + return; + } + } +@@ -785,14 +767,14 @@ static void audio_resume(void) + if (alsa_can_pause) { + if ((err = snd_pcm_pause(alsa_handler, 0)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-resume: pcm resume error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmResumeError, snd_strerror(err)); + return; + } + mp_msg(MSGT_AO,MSGL_V,"alsa-resume: resume supported by hardware\n"); + } else { + if ((err = snd_pcm_prepare(alsa_handler)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-resume: pcm prepare error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); + return; + } + } +@@ -805,12 +787,12 @@ static void reset(void) + + if ((err = snd_pcm_drop(alsa_handler)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-reset: pcm drop error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); + return; + } + if ((err = snd_pcm_prepare(alsa_handler)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-reset: pcm prepare error: %s\n", snd_strerror(err)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(err)); + return; + } + return; +@@ -831,7 +813,7 @@ static int play(void* data, int len, int flags) + //mp_msg(MSGT_AO,MSGL_ERR,"alsa-play: frames=%i, len=%i\n",num_frames,len); + + if (!alsa_handler) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-play: device configuration error"); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_DeviceConfigurationError); + return 0; + } + +@@ -846,15 +828,15 @@ static int play(void* data, int len, int flags) + res = 0; + } + else if (res == -ESTRPIPE) { /* suspend */ +- mp_msg(MSGT_AO,MSGL_INFO,"alsa-play: pcm in suspend mode. trying to resume\n"); ++ mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_PcmInSuspendModeTryingResume); + while ((res = snd_pcm_resume(alsa_handler)) == -EAGAIN) + sleep(1); + } + if (res < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-play: write error: %s\n", snd_strerror(res)); +- mp_msg(MSGT_AO,MSGL_INFO,"alsa-play: trying to reset soundcard\n"); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_WriteError, snd_strerror(res)); ++ mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_TryingToResetSoundcard); + if ((res = snd_pcm_prepare(alsa_handler)) < 0) { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-play: pcm prepare error: %s\n", snd_strerror(res)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(res)); + return(0); + break; + } +@@ -874,7 +856,7 @@ static int get_space(void) + + if ((ret = snd_pcm_status(alsa_handler, status)) < 0) + { +- mp_msg(MSGT_AO,MSGL_ERR,"alsa-space: cannot get pcm status: %s\n", snd_strerror(ret)); ++ mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_CannotGetPcmStatus, snd_strerror(ret)); + return(0); + } + +-- +1.6.0.4 + diff --git a/recipes/mplayer/mplayer-maemo_svn.bb b/recipes/mplayer/mplayer-maemo_svn.bb index af0e7a5..abd595f 100644 --- a/recipes/mplayer/mplayer-maemo_svn.bb +++ b/recipes/mplayer/mplayer-maemo_svn.bb @@ -7,7 +7,7 @@ DEPENDS = "virtual/libsdl xsp libmad zlib libpng jpeg liba52 freetype fontconfig DEFAULT_PREFERENCE_avr32 = "-1" PV = "0.0+1.0rc1+svnr${SRCPV}" -PE = "1" +PR = "r1" RCONFLICTS_${PN} = "mplayer" @@ -18,7 +18,12 @@ SRC_URI = "svn://garage.maemo.org/svn/mplayer/;module=trunk;proto=https \ file://pld-onlyarm5.patch;patch=1 \ file://makefile-nostrip.patch;patch=1 \ file://motion-comp-pld.patch;patch=1 \ - file://cfg-common-position.patch;patch=1 " + file://cfg-common-position.patch;patch=1 \ + file://declaring_function_previously.patch;patch=1 \ + file://adapt_maemo_stuff_to_mamona.patch;patch=1 \ + file://adding_support_wid_vo-sdl.patch;patch=1 \ + file://fix_asm_compile_problem_n770.patch;patch=1 \ + file://updating-ao-alsa-compile-latest-alsa.patch;patch=1" # This is required for the collie machine only as all stacks in that # machine seem to be set to executable by the toolchain. If someone @@ -43,6 +48,7 @@ EXTRA_OECONF = " \ --prefix=/usr \ --mandir=${mandir} \ --target=${TARGET_SYS} \ + --confdir=${sysconfdir}/mplayer \ \ --enable-mencoder \ --disable-gui \ @@ -55,8 +61,8 @@ EXTRA_OECONF = " \ --disable-xf86keysym \ --disable-tv \ --disable-tv-v4l2 \ - --enable-v4l2 \ --disable-tv-bsdbt848 \ + --disable-ivtv \ --enable-rtc \ --enable-network \ --disable-winsock2 \ @@ -153,12 +159,14 @@ EXTRA_OECONF = " \ --disable-sunaudio \ --disable-win32waveout \ --enable-select \ + --enable-maemo \ \ --disable-ass \ " EXTRA_OECONF_append_armv6 = " --enable-armv6 --enable-arm-vfp" EXTRA_OECONF_append_armv7a = "--enable-armv6 --enable-arm-vfp" +EXTRA_OECONF_append_nokia770 = "--disable-arm-vfp" #build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up) #not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt @@ -179,8 +187,6 @@ BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" do_configure() { sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure - sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure - sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure ./configure ${EXTRA_OECONF} } -- 1.6.3.3