comparison mplayer.c @ 22284:83366c8e1928

Fix menu to work with mpctx
author uau
date Wed, 21 Feb 2007 18:28:48 +0000
parents f00e6b43e79f
children 5d12a6e96930
comparison
equal deleted inserted replaced
22283:bc9e95184521 22284:83366c8e1928
378 #include "command.h" 378 #include "command.h"
379 379
380 #include "metadata.h" 380 #include "metadata.h"
381 381
382 #define mp_basename2(s) (strrchr(s,'/')==NULL?(char*)s:(strrchr(s,'/')+1)) 382 #define mp_basename2(s) (strrchr(s,'/')==NULL?(char*)s:(strrchr(s,'/')+1))
383
384 void *mpctx_get_video_out(MPContext *mpctx)
385 {
386 return mpctx->video_out;
387 }
388
389 void *mpctx_get_playtree_iter(MPContext *mpctx)
390 {
391 return mpctx->playtree_iter;
392 }
383 393
384 static int is_valid_metadata_type (metadata_t type) { 394 static int is_valid_metadata_type (metadata_t type) {
385 switch (type) 395 switch (type)
386 { 396 {
387 /* check for valid video stream */ 397 /* check for valid video stream */
2483 inited_flags|=INITED_INPUT; 2493 inited_flags|=INITED_INPUT;
2484 current_module = NULL; 2494 current_module = NULL;
2485 2495
2486 #ifdef HAVE_MENU 2496 #ifdef HAVE_MENU
2487 if(use_menu) { 2497 if(use_menu) {
2488 if(menu_cfg && menu_init(menu_cfg)) 2498 if(menu_cfg && menu_init(mpctx, menu_cfg))
2489 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, menu_cfg); 2499 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, menu_cfg);
2490 else { 2500 else {
2491 menu_cfg = get_path("menu.conf"); 2501 menu_cfg = get_path("menu.conf");
2492 if(menu_init(menu_cfg)) 2502 if(menu_init(mpctx, menu_cfg))
2493 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, menu_cfg); 2503 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, menu_cfg);
2494 else { 2504 else {
2495 if(menu_init(MPLAYER_CONFDIR "/menu.conf")) 2505 if(menu_init(mpctx, MPLAYER_CONFDIR "/menu.conf"))
2496 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, MPLAYER_CONFDIR"/menu.conf"); 2506 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitialized, MPLAYER_CONFDIR"/menu.conf");
2497 else { 2507 else {
2498 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitFailed); 2508 mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_MenuInitFailed);
2499 use_menu = 0; 2509 use_menu = 0;
2500 } 2510 }