The simplest way would be to use the stdin interface to mplayer and feed to appropriate commands to it using a pipe, then you would need only worry about whether or not you are sending the correct commands to it, you could do this using something like php or perl using cgi, which would be simpler to implement than a C program.
Only limitation is this my code will be in C.......
So if u can provide in C-style....
Or if u can provide how I can read click event from GUI and will perform accordingly...
eg If I will get pause command from GUI....my c-code should send M-player stop reading from the buffer....and again if I will press play...it should start again reading from the buffer....