Repository: ossrs/srs
File: trunk/src/protocol/srs_protocol_rtmp_stack.hpp (C++)

Code before:
    // Auto response the ping message.
    virtual srs_error_t response_ping_message(int32_t timestamp);
private:
    virtual void print_debug_info();
};

// incoming chunk stream maybe interlaced,
// Use the chunk stream to cache the input RTMP chunk streams.
class SrsChunkStream
{
public:
    // Represents the basic header fmt,
    // which used to identify the variant message header type.
    char fmt;
    // Represents the basic header cid,
    // which is the chunk stream id.
    int cid;
    // Cached message header
    SrsMessageHeader header;
    // Whether the chunk message header has extended timestamp.
    bool has_extended_timestamp;
    // The partially read message.
    SrsCommonMessage* msg;
    // Decoded msg count, to identify whether the chunk stream is fresh.
    int64_t msg_count;
    // extended timestamp value
    int32_t extended_timestamp;
public:
    SrsChunkStream(int _cid);
    virtual ~SrsChunkStream();
};

// The original request from client.
class SrsRequest
{
public:
    // The client ip.
    std::string ip;
public:
    // Support pass vhost in RTMP URL, such as:
    //    rtmp://VHOST:port/app/stream
    //    rtmp://ip:port/app/stream?vhost=VHOST
    //    rtmp://ip:port/app?vhost=VHOST/stream
    //    rtmp://ip:port/app...vhost...VHOST/stream
    // While tcUrl is url without stream.
    std::string tcUrl;
public:
    std::string pageUrl;
    std::string swfUrl;
    double objectEncoding;
// The data discovery from request.

Review comment (suggestion):
Should be rephrased with more context, like this:
```
// Because the extended timestamp may be a delta timestamp, it can differ 
// from the timestamp in the header, so it should be stored as a distinct field 
// for comparison with the extended timestamp of subsequent chunks.
// See https://github.com/ossrs/srs/pull/4356 for details.
```

Code after:
    // Auto response the ping message.
    virtual srs_error_t response_ping_message(int32_t timestamp);
private:
    virtual void print_debug_info();
};

// incoming chunk stream maybe interlaced,
// Use the chunk stream to cache the input RTMP chunk streams.
class SrsChunkStream
{
public:
    // Represents the basic header fmt,
    // which used to identify the variant message header type.
    char fmt;
    // Represents the basic header cid,
    // which is the chunk stream id.
    int cid;
    // Cached message header
    SrsMessageHeader header;
    // Whether the chunk message header has extended timestamp.
    bool has_extended_timestamp;
    // The partially read message.
    SrsCommonMessage* msg;
    // Decoded msg count, to identify whether the chunk stream is fresh.
    int64_t msg_count;
    // Because the extended timestamp may be a delta timestamp, it can differ
    // from the timestamp in the header, so it should be stored as a distinct field
    // for comparison with the extended timestamp of subsequent chunks.
    // See https://github.com/ossrs/srs/pull/4356 for details.
    int32_t extended_timestamp;
public:
    SrsChunkStream(int _cid);
    virtual ~SrsChunkStream();
};

// The original request from client.
class SrsRequest
{
public:
    // The client ip.
    std::string ip;
public:
    // Support pass vhost in RTMP URL, such as:
    //    rtmp://VHOST:port/app/stream
    //    rtmp://ip:port/app/stream?vhost=VHOST
    //    rtmp://ip:port/app?vhost=VHOST/stream
    //    rtmp://ip:port/app...vhost...VHOST/stream
    // While tcUrl is url without stream.
    std::string tcUrl;
public:
    std::string pageUrl;