you can use omxplayer or vlc (on raspbian you have to compile it from source to enable the vdpau/vaapi feature).
maybe you wanna take a look at a simple python omxplayer wrapper to get an idea for a wrapper: https://github.com/jbaiter/pyomxplayer/blob/master/pyomxplayer.py.
Good luck!
Paul