In this paper, we consider the source-channel rate allocation for different transmission schemes. We propose a new trellis structure and a new algorithm that are able to deal with both variable length packet and fixed length packet problems. The trellis description allows to handle any kind of transmission schemes and can therefore be applied to Bit Interleaved Coded Modulations (BICM), parallel channels or Hybrid-Automatic Repeat reQuest (HARQ).