| 151 | | { "clone", N_("Image clone"), N_("Creates several clones of the image") }, |
|---|
| 152 | | { "distort", N_("Distortion"), N_("Adds distortion effects") }, |
|---|
| 153 | | { "invert", N_("Image inversion") , N_("Inverts the colors of the image") }, |
|---|
| 154 | | { "motionblur", N_("Blurring"), N_("Adds motion blurring to the image") }, |
|---|
| 155 | | { "transform", N_("Transformation"), N_("Rotates or flips the image") }, |
|---|
| 156 | | { "magnify", N_("Magnify"), N_("Magnifies part of the image") }, |
|---|
| 157 | | { "puzzle", N_("Puzzle"), N_("Turns the image into a puzzle") }, |
|---|
| | 152 | { "clone", N_("Image clone"), N_("Creates several clones of the image"), false }, |
|---|
| | 153 | { "gradient", N_("Cartoon effect"), N_("Gradient effects (cartoon) on the image"), true }, |
|---|
| | 154 | { "invert", N_("Image inversion") , N_("Inverts the colors of the image"), true }, |
|---|
| | 155 | { "motionblur", N_("Blurring"), N_("Adds motion blurring to the image"), true }, |
|---|
| | 156 | { "ripple", N_("Water effect"), N_("Adds water effect to the image"), true }, |
|---|
| | 157 | { "wave", N_("Wave effect"), N_("Adds wave effect to the image"), true }, |
|---|
| | 158 | { "transform", N_("Transformation"), N_("Rotates or flips the image"), false }, |
|---|
| | 159 | { "magnify", N_("Magnify"), N_("Magnifies part of the image"), false }, |
|---|
| | 160 | { "puzzle", N_("Puzzle"), N_("Turns the image into a puzzle"), false }, |
|---|
| 996 | | ChangeVFiltersString( p_intf, vfilters[i_filter].psz_filter , |
|---|
| 997 | | event.IsChecked() ? true : false ); |
|---|
| | 999 | if( vfilters[i_filter].b_vfilter2 ) |
|---|
| | 1000 | ChangeVFilters2String( p_intf, vfilters[i_filter].psz_filter , |
|---|
| | 1001 | event.IsChecked() ? true : false ); |
|---|
| | 1002 | else |
|---|
| | 1003 | ChangeVFiltersString( p_intf, vfilters[i_filter].psz_filter , |
|---|
| | 1004 | event.IsChecked() ? true : false ); |
|---|
| | 1166 | /* Vout is not kept, so put that in the config */ |
|---|
| | 1167 | config_PutPsz( p_intf, "video-filter", psz_string ); |
|---|
| | 1168 | |
|---|
| | 1169 | /* Try to set on the fly */ |
|---|
| | 1170 | p_vout = (vout_thread_t *)vlc_object_find( p_intf, VLC_OBJECT_VOUT, |
|---|
| | 1171 | FIND_ANYWHERE ); |
|---|
| | 1172 | if( p_vout ) |
|---|
| | 1173 | { |
|---|
| | 1174 | var_SetString( p_vout, "video-filter", psz_string ); |
|---|
| | 1175 | vlc_object_release( p_vout ); |
|---|
| | 1176 | } |
|---|
| | 1177 | free( psz_string ); |
|---|
| | 1178 | } |
|---|
| | 1179 | |
|---|
| | 1180 | |
|---|
| | 1181 | static void ChangeFiltersString( intf_thread_t *p_intf, |
|---|
| | 1182 | aout_instance_t * p_aout, |
|---|
| | 1183 | char *psz_name, bool b_add ) |
|---|
| | 1184 | { |
|---|
| | 1185 | char *psz_parser, *psz_string; |
|---|
| | 1186 | |
|---|
| | 1187 | if( p_aout ) |
|---|
| | 1188 | { |
|---|
| | 1189 | psz_string = var_GetNonEmptyString( p_aout, "audio-filter" ); |
|---|
| | 1190 | } |
|---|
| | 1191 | else |
|---|
| | 1192 | { |
|---|
| | 1193 | psz_string = config_GetPsz( p_intf, "audio-filter" ); |
|---|
| | 1194 | } |
|---|
| | 1195 | |
|---|
| | 1196 | if( !psz_string ) psz_string = strdup(""); |
|---|
| | 1197 | |
|---|
| | 1198 | psz_parser = strstr( psz_string, psz_name ); |
|---|
| | 1199 | |
|---|
| | 1200 | if( b_add ) |
|---|
| | 1201 | { |
|---|
| | 1202 | if( !psz_parser ) |
|---|
| | 1203 | { |
|---|
| | 1204 | psz_parser = psz_string; |
|---|
| | 1205 | asprintf( &psz_string, (*psz_string) ? "%s:%s" : "%s%s", |
|---|
| | 1206 | psz_string, psz_name ); |
|---|
| | 1207 | free( psz_parser ); |
|---|
| | 1208 | } |
|---|
| | 1209 | else |
|---|
| | 1210 | { |
|---|
| | 1211 | return; |
|---|
| | 1212 | } |
|---|
| | 1213 | } |
|---|
| | 1214 | else |
|---|
| | 1215 | { |
|---|
| | 1216 | if( psz_parser ) |
|---|
| | 1217 | { |
|---|
| | 1218 | memmove( psz_parser, psz_parser + strlen(psz_name) + |
|---|
| | 1219 | (*(psz_parser + strlen(psz_name)) == ':' ? 1 : 0 ), |
|---|
| | 1220 | strlen(psz_parser + strlen(psz_name)) + 1 ); |
|---|
| | 1221 | |
|---|
| | 1222 | if( *(psz_string+strlen(psz_string ) -1 ) == ':' ) |
|---|
| | 1223 | { |
|---|
| | 1224 | *(psz_string+strlen(psz_string ) -1 ) = '\0'; |
|---|
| | 1225 | } |
|---|
| | 1226 | } |
|---|
| | 1227 | else |
|---|
| | 1228 | { |
|---|
| | 1229 | free( psz_string ); |
|---|
| | 1230 | return; |
|---|
| | 1231 | } |
|---|
| | 1232 | } |
|---|