Resource aware real-time stream adaptation for MPEG-2 transport streams in constrained bandwidth networks