rebased on upstream

- make MAD codec optional and remove support in dvdplayer
- generate json header