message: video_replay: add --start-timestamp and --stop-timestamp
  to allow filtering of the frames that are being decoded.
  Timestamp wraparound is not supported.
  Cr-Commit-Position: refs/heads/master@{#33812}
diff: @@ -119,6 +119,18 @@ ABSL_FLAG(std::string, decoder_ivf_filename, "", "Decoder ivf output file");
  // Flag for video codec.
  ABSL_FLAG(std::string, codec, "VP8", "Video codec");
  +// Flags for rtp start and stop timestamp.
  +ABSL_FLAG(uint32_t,
  + start_timestamp,
  + 0,
  + "RTP start timestamp, packets with smaller timestamp will be ignored "
  + "(no wraparound)");
  +ABSL_FLAG(uint32_t,
  + stop_timestamp,
  + 4294967295,
  + "RTP stop timestamp, packets with larger timestamp will be ignored "
  + "(no wraparound)");
  +
  namespace {
  static bool ValidatePayloadType(int32_t payload_type) {
  @@ -520,6 +532,8 @@ class RtpReplayer final {
  int num_packets = 0;
  std::map<uint32_t, int> unknown_packets;
  rtc::Event event(/*manual_reset=*/false, /*initially_signalled=*/false);
  + uint32_t start_timestamp = absl::GetFlag(FLAGS_start_timestamp);
  + uint32_t stop_timestamp = absl::GetFlag(FLAGS_stop_timestamp);
  while (true) {
  int64_t now_ms = rtc::TimeMillis();
  if (replay_start_ms == -1) {
  @@ -530,6 +544,13 @@ class RtpReplayer final {
  if (!rtp_reader->NextPacket(&packet)) {
  break;
  }
  + RTPHeader header;
  + std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::CreateForTest());
  + parser->Parse(packet.data, packet.length, &header);
  + if (header.timestamp < start_timestamp ||
  + header.timestamp > stop_timestamp) {
  + continue;
  + }
  int64_t deliver_in_ms = replay_start_ms + packet.time_ms - now_ms;
  if (deliver_in_ms > 0) {
  @@ -550,10 +571,6 @@ class RtpReplayer final {
  case PacketReceiver::DELIVERY_OK:
  break;
  case PacketReceiver::DELIVERY_UNKNOWN_SSRC: {
  - RTPHeader header;
  - std::unique_ptr<RtpHeaderParser> parser(
  - RtpHeaderParser::CreateForTest());
  - parser->Parse(packet.data, packet.length, &header);
  if (unknown_packets[header.ssrc] == 0)
  fprintf(stderr, "Unknown SSRC: %u!\n", header.ssrc);
  ++unknown_packets[header.ssrc];
  