Improve PsmfPlayer, and implement video loop for PsmfPlayer.

It may fix #2489 as well.