Edit:
After some searching, coding and testing now I can do this using sharpamp wrapper, all things while I'm opening my media file with winamp is ok but with kmplayer the filename is always empty.My plugin code for getting filename is looks like this:
KGlobal::locale(): Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not workmplayer -wid 73400503 -slave -vo xv,sdl,x11 -ao alsa,oss,sdl,arts -framedrop -contrast 0 -brightness 0 -hue 0 -saturation 0 /home/steve/f1.avi -identify