Mercurial > mplayer.hg
comparison gui/interface.c @ 33766:515a3b5f291e
Rename the mplayer() symbolic constants.
Use prefix MPLAYER for these constants, rename them and use upper case
characters.
Additionally, don't unnecessarily 'float' parameter fparam in mplayer()
calls.
author | ib |
---|---|
date | Fri, 08 Jul 2011 21:41:34 +0000 |
parents | c29fc64a28c4 |
children | cee9987bc81d |
comparison
equal
deleted
inserted
replaced
33765:c29fc64a28c4 | 33766:515a3b5f291e |
---|---|
727 for (i = 0; i < FF_ARRAY_ELEMS(gtkEquChannels); i++) { | 727 for (i = 0; i < FF_ARRAY_ELEMS(gtkEquChannels); i++) { |
728 for (j = 0; j < FF_ARRAY_ELEMS(*gtkEquChannels); j++) { | 728 for (j = 0; j < FF_ARRAY_ELEMS(*gtkEquChannels); j++) { |
729 eq.channel = i; | 729 eq.channel = i; |
730 eq.band = j; | 730 eq.band = j; |
731 eq.gain = gtkEquChannels[i][j]; | 731 eq.gain = gtkEquChannels[i][j]; |
732 mplayer(gtkSetEqualizer, 0, &eq); | 732 mplayer(MPLAYER_SET_EQUALIZER, 0, &eq); |
733 } | 733 } |
734 } | 734 } |
735 } | 735 } |
736 | 736 |
737 wsVisibleWindow(&guiApp.subWindow, (guiInfo.MovieWindow ? wsShowWindow : wsHideWindow)); | 737 wsVisibleWindow(&guiApp.subWindow, (guiInfo.MovieWindow ? wsShowWindow : wsHideWindow)); |
939 | 939 |
940 switch (what) { | 940 switch (what) { |
941 // subtitle | 941 // subtitle |
942 | 942 |
943 #ifndef CONFIG_FREETYPE | 943 #ifndef CONFIG_FREETYPE |
944 case gtkSetFontFactor: | 944 case MPLAYER_SET_FONT_FACTOR: |
945 font_factor = fparam; | 945 font_factor = fparam; |
946 mplayerLoadFont(); | 946 mplayerLoadFont(); |
947 break; | 947 break; |
948 #else | 948 #else |
949 case gtkSetFontOutLine: | 949 case MPLAYER_SET_FONT_OUTLINE: |
950 subtitle_font_thickness = (8.0f / 100.0f) * fparam; | 950 subtitle_font_thickness = (8.0f / 100.0f) * fparam; |
951 mplayerLoadFont(); | 951 mplayerLoadFont(); |
952 break; | 952 break; |
953 | 953 |
954 case gtkSetFontBlur: | 954 case MPLAYER_SET_FONT_BLUR: |
955 subtitle_font_radius = (8.0f / 100.0f) * fparam; | 955 subtitle_font_radius = (8.0f / 100.0f) * fparam; |
956 mplayerLoadFont(); | 956 mplayerLoadFont(); |
957 break; | 957 break; |
958 | 958 |
959 case gtkSetFontTextScale: | 959 case MPLAYER_SET_FONT_TEXTSCALE: |
960 text_font_scale_factor = fparam; | 960 text_font_scale_factor = fparam; |
961 mplayerLoadFont(); | 961 mplayerLoadFont(); |
962 break; | 962 break; |
963 | 963 |
964 case gtkSetFontOSDScale: | 964 case MPLAYER_SET_FONT_OSDSCALE: |
965 osd_font_scale_factor = fparam; | 965 osd_font_scale_factor = fparam; |
966 mplayerLoadFont(); | 966 mplayerLoadFont(); |
967 break; | 967 break; |
968 | 968 |
969 case gtkSetFontEncoding: | 969 case MPLAYER_SET_FONT_ENCODING: |
970 nfree(subtitle_font_encoding); | 970 nfree(subtitle_font_encoding); |
971 subtitle_font_encoding = gstrdup((char *)vparam); | 971 subtitle_font_encoding = gstrdup((char *)vparam); |
972 mplayerLoadFont(); | 972 mplayerLoadFont(); |
973 break; | 973 break; |
974 | 974 |
975 case gtkSetFontAutoScale: | 975 case MPLAYER_SET_FONT_AUTOSCALE: |
976 subtitle_autoscale = (int)fparam; | 976 subtitle_autoscale = (int)fparam; |
977 mplayerLoadFont(); | 977 mplayerLoadFont(); |
978 break; | 978 break; |
979 #endif | 979 #endif |
980 | 980 |
981 #ifdef CONFIG_ICONV | 981 #ifdef CONFIG_ICONV |
982 case gtkSetSubEncoding: | 982 case MPLAYER_SET_SUB_ENCODING: |
983 nfree(sub_cp); | 983 nfree(sub_cp); |
984 sub_cp = gstrdup((char *)vparam); | 984 sub_cp = gstrdup((char *)vparam); |
985 break; | 985 break; |
986 #endif | 986 #endif |
987 | 987 |
1006 guiInfo.VCDTracks = 0; | 1006 guiInfo.VCDTracks = 0; |
1007 #endif | 1007 #endif |
1008 | 1008 |
1009 break; | 1009 break; |
1010 | 1010 |
1011 case gtkSetExtraStereo: | 1011 case MPLAYER_SET_EXTRA_STEREO: |
1012 gtkAOExtraStereoMul = fparam; | 1012 gtkAOExtraStereoMul = fparam; |
1013 if (guiInfo.afilter) | 1013 if (guiInfo.afilter) |
1014 af_control_any_rev(guiInfo.afilter, AF_CONTROL_ES_MUL | AF_CONTROL_SET, >kAOExtraStereoMul); | 1014 af_control_any_rev(guiInfo.afilter, AF_CONTROL_ES_MUL | AF_CONTROL_SET, >kAOExtraStereoMul); |
1015 break; | 1015 break; |
1016 | 1016 |
1017 case gtkSetPanscan: | 1017 case MPLAYER_SET_PANSCAN: |
1018 { | 1018 { |
1019 mp_cmd_t *mp_cmd; | 1019 mp_cmd_t *mp_cmd; |
1020 | 1020 |
1021 mp_cmd = calloc(1, sizeof(*mp_cmd)); | 1021 mp_cmd = calloc(1, sizeof(*mp_cmd)); |
1022 mp_cmd->id = MP_CMD_PANSCAN; | 1022 mp_cmd->id = MP_CMD_PANSCAN; |
1025 mp_cmd->args[1].v.i = 1; | 1025 mp_cmd->args[1].v.i = 1; |
1026 mp_input_queue_cmd(mp_cmd); | 1026 mp_input_queue_cmd(mp_cmd); |
1027 } | 1027 } |
1028 break; | 1028 break; |
1029 | 1029 |
1030 case gtkSetAutoq: | 1030 case MPLAYER_SET_AUTO_QUALITY: |
1031 auto_quality = (int)fparam; | 1031 auto_quality = (int)fparam; |
1032 break; | 1032 break; |
1033 | 1033 |
1034 // set equalizers | 1034 // set equalizers |
1035 | 1035 |
1036 case gtkSetContrast: | 1036 case MPLAYER_SET_CONTRAST: |
1037 if (guiInfo.sh_video) | 1037 if (guiInfo.sh_video) |
1038 set_video_colors(guiInfo.sh_video, "contrast", (int)fparam); | 1038 set_video_colors(guiInfo.sh_video, "contrast", (int)fparam); |
1039 break; | 1039 break; |
1040 | 1040 |
1041 case gtkSetBrightness: | 1041 case MPLAYER_SET_BRIGHTNESS: |
1042 if (guiInfo.sh_video) | 1042 if (guiInfo.sh_video) |
1043 set_video_colors(guiInfo.sh_video, "brightness", (int)fparam); | 1043 set_video_colors(guiInfo.sh_video, "brightness", (int)fparam); |
1044 break; | 1044 break; |
1045 | 1045 |
1046 case gtkSetHue: | 1046 case MPLAYER_SET_HUE: |
1047 if (guiInfo.sh_video) | 1047 if (guiInfo.sh_video) |
1048 set_video_colors(guiInfo.sh_video, "hue", (int)fparam); | 1048 set_video_colors(guiInfo.sh_video, "hue", (int)fparam); |
1049 break; | 1049 break; |
1050 | 1050 |
1051 case gtkSetSaturation: | 1051 case MPLAYER_SET_SATURATION: |
1052 if (guiInfo.sh_video) | 1052 if (guiInfo.sh_video) |
1053 set_video_colors(guiInfo.sh_video, "saturation", (int)fparam); | 1053 set_video_colors(guiInfo.sh_video, "saturation", (int)fparam); |
1054 break; | 1054 break; |
1055 | 1055 |
1056 case gtkSetEqualizer: | 1056 case MPLAYER_SET_EQUALIZER: |
1057 { | 1057 { |
1058 af_control_ext_t tmp; | 1058 af_control_ext_t tmp; |
1059 | 1059 |
1060 if (eq) { | 1060 if (eq) { |
1061 gtkEquChannels[eq->channel][eq->band] = eq->gain; | 1061 gtkEquChannels[eq->channel][eq->band] = eq->gain; |