Volume-preserving nonhomogeneous mean curvature flow of convex hypersurfaces