// part 1: read from the chunk stream, returning true if enough data is here. you must take the value // returned at `chunkStreamId`, find the chunk stream snapshot associated with that chunk stream and // pass it to the second stage (part2) along with the opaque value. public static bool ReadFrom1(AmfReader reader, out int chunkStreamId, out MessageHeader.Type opaque) { if (BasicHeader.ReadFrom(reader, out var format, out var streamId)) { opaque = (MessageHeader.Type)format; chunkStreamId = streamId; return(true); }