Structural and electronic properties of binary and ternary platinum oxides