[CpmlSegment] Updated cpml_segment_offset() with the new APIs