Merged media changes from openmodelica branch