Scheduling algorithm for packet-oriented MAC protocols in wireless multimedia systems