The first param is obviously the PTS start time. If the second param specify DTS then its value must be less than PTS start. If the second param specify PTS end then its value must be greater than PTS start.
What does the second param in mediaData->SetTime(time1, time2) specify? Is it DTS or PTS_end?
Actually the 2nd parameter is used in a few components only. It is important for MPEG2 multiplexing of video elementary streams and is used as DTS to reflect reordering. MPEG2 multiplexer aligns video frames by DTSes before writing the output stream. As far as I remember it can also be used as PTS_end for some audio codecs to calculate duration of the sample but usually PTS of the next sample is used for it. Many components don't use it at all.