Adaptive streaming of multimedia content: dealing with both terminal and network heterogeneity