API changed! Method 'next' not more returns media segment. Changed logic of media playlist generation: now it moves segments 'head' only once per Encode call.