comparison mplayer.c @ 20973:c0bcec5150a3

Add deinterlace property, patch by Carl Eugen Hoyos (cehoyos [at] rainbow studorg tuwien ac at) with small modifications by me.
author reimar
date Fri, 17 Nov 2006 18:16:21 +0000
parents fdc42ef57a58
children 123cdf4a0f73
comparison
equal deleted inserted replaced
20972:ef8ac967b43f 20973:c0bcec5150a3
1924 default: 1924 default:
1925 return m_property_flag(prop,action,arg,&vo_fs); 1925 return m_property_flag(prop,action,arg,&vo_fs);
1926 } 1926 }
1927 } 1927 }
1928 1928
1929 static int mp_property_deinterlace(m_option_t* prop,int action,void* arg) {
1930 int toggle = -1;
1931 vf_instance_t *vf;
1932 if (!sh_video || !sh_video->vfilter) return M_PROPERTY_UNAVAILABLE;
1933 vf = sh_video->vfilter;
1934 switch(action) {
1935 case M_PROPERTY_GET:
1936 if(!arg) return M_PROPERTY_ERROR;
1937 vf->control(sh_video->vfilter, VFCTRL_GET_DEINTERLACE, arg);
1938 return M_PROPERTY_OK;
1939 case M_PROPERTY_SET:
1940 if(!arg) return M_PROPERTY_ERROR;
1941 M_PROPERTY_CLAMP(prop,*(int*)arg);
1942 vf->control(sh_video->vfilter, VFCTRL_SET_DEINTERLACE, arg);
1943 return M_PROPERTY_OK;
1944 case M_PROPERTY_STEP_UP:
1945 case M_PROPERTY_STEP_DOWN:
1946 vf->control(sh_video->vfilter, VFCTRL_SET_DEINTERLACE, &toggle);
1947 return M_PROPERTY_OK;
1948 }
1949 return M_PROPERTY_NOT_IMPLEMENTED;
1950 }
1951
1929 /// Panscan (RW) 1952 /// Panscan (RW)
1930 static int mp_property_panscan(m_option_t* prop,int action,void* arg) { 1953 static int mp_property_panscan(m_option_t* prop,int action,void* arg) {
1931 1954
1932 if(!video_out || video_out->control(VOCTRL_GET_PANSCAN,NULL ) != VO_TRUE) 1955 if(!video_out || video_out->control(VOCTRL_GET_PANSCAN,NULL ) != VO_TRUE)
1933 return M_PROPERTY_UNAVAILABLE; 1956 return M_PROPERTY_UNAVAILABLE;
2467 { "switch_audio", mp_property_audio, CONF_TYPE_INT, 2490 { "switch_audio", mp_property_audio, CONF_TYPE_INT,
2468 -1, -1, 0, NULL }, 2491 -1, -1, 0, NULL },
2469 2492
2470 // Video 2493 // Video
2471 { "fullscreen", mp_property_fullscreen, CONF_TYPE_FLAG, 2494 { "fullscreen", mp_property_fullscreen, CONF_TYPE_FLAG,
2495 M_OPT_RANGE, 0, 1, NULL },
2496 { "deinterlace", mp_property_deinterlace, CONF_TYPE_FLAG,
2472 M_OPT_RANGE, 0, 1, NULL }, 2497 M_OPT_RANGE, 0, 1, NULL },
2473 { "ontop", mp_property_ontop, CONF_TYPE_FLAG, 2498 { "ontop", mp_property_ontop, CONF_TYPE_FLAG,
2474 M_OPT_RANGE, 0, 1, NULL }, 2499 M_OPT_RANGE, 0, 1, NULL },
2475 { "rootwin", mp_property_rootwin, CONF_TYPE_FLAG, 2500 { "rootwin", mp_property_rootwin, CONF_TYPE_FLAG,
2476 M_OPT_RANGE, 0, 1, NULL }, 2501 M_OPT_RANGE, 0, 1, NULL },