Measurement of D-meson branching ratios