@@ -65,11 +65,11 @@ for {timestamp_type, module_suffix} <- [pts: PTS, dts: DTS, dts_or_pts: DTSOrPTS
6565 when last_consumed_timestamp - first_consumed_timestamp >= demand_timestamp <-
6666 get_timestamp ( last_consumed_buffer ) do
6767 Membrane.Logger . warning ( """
68- Demanded #{ inspected_timestamp_type ( ) } should be greater than the elapsed #{ inspected_timestamp_type ( ) } \
68+ Demanded #{ timestamp_name ( ) } should be greater than the elapsed #{ timestamp_name ( ) } \
6969 since the first consumed buffer. Got :demand of #{ demand_timestamp } , while the elapsed \
70- #{ inspected_timestamp_type ( ) } equals #{ last_consumed_timestamp - first_consumed_timestamp } . \
71- Demanding a #{ inspected_timestamp_type ( ) } that is not greater than the elapsed one \
72- won't result in handling any further buffers, until the element demands a #{ inspected_timestamp_type ( ) } \
70+ #{ timestamp_name ( ) } equals #{ last_consumed_timestamp - first_consumed_timestamp } . \
71+ Demanding a #{ timestamp_name ( ) } that is not greater than the elapsed one \
72+ won't result in handling any further buffers, until the element demands a #{ timestamp_name ( ) } \
7373 greater than the elapsed one. \
7474 """ )
7575
@@ -101,9 +101,9 @@ for {timestamp_type, module_suffix} <- [pts: PTS, dts: DTS, dts_or_pts: DTSOrPTS
101101 { :ok , prev_timestamp } when curr_timestamp < prev_timestamp <-
102102 get_timestamp ( prev_buffer ) do
103103 Membrane.Logger . warning ( """
104- Received buffers with non-monotonic #{ inspected_timestamp_type ( ) } s. \
105- Current buffer's #{ inspected_timestamp_type ( ) } is #{ curr_timestamp } , \
106- while the previous buffer's #{ inspected_timestamp_type ( ) } is #{ prev_timestamp } . \
104+ Received buffers with non-monotonic #{ timestamp_name ( ) } s. \
105+ Current buffer's #{ timestamp_name ( ) } is #{ curr_timestamp } , \
106+ while the previous buffer's #{ timestamp_name ( ) } is #{ prev_timestamp } . \
107107 This may lead to unexpected behavior in elements that have input pad with flow \
108108 control set to `:manual` and demand unit set to `:timestamp`, `{:timestamp, :dts}` \
109109 `{:timestamp, :pts}` or `{:timestamp, :dts_or_pts}`.
@@ -146,8 +146,6 @@ for {timestamp_type, module_suffix} <- [pts: PTS, dts: DTS, dts_or_pts: DTSOrPTS
146146 @ impl TimestampMetric
147147 def timestamp_name ( ) , do: "PTS"
148148
149- defp inspected_timestamp_type ( ) , do: "PTS"
150-
151149 :dts ->
152150 defp get_timestamp ( % Buffer { dts: dts } ) , do: { :ok , dts }
153151
@@ -158,18 +156,14 @@ for {timestamp_type, module_suffix} <- [pts: PTS, dts: DTS, dts_or_pts: DTSOrPTS
158156 @ impl TimestampMetric
159157 def timestamp_name ( ) , do: "DTS"
160158
161- defp inspected_timestamp_type ( ) , do: "DTS"
162-
163159 :dts_or_pts ->
164160 defp get_timestamp ( buffer ) , do: { :ok , Buffer . get_dts_or_pts ( buffer ) }
165161
166162 @ impl TimestampMetric
167163 def nil_timestamp? ( buffer ) , do: is_nil ( Buffer . get_dts_or_pts ( buffer ) )
168164
169165 @ impl TimestampMetric
170- def timestamp_name ( ) , do: "DTS or PTS"
171-
172- defp inspected_timestamp_type ( ) , do: "<DTS or PTS>"
166+ def timestamp_name ( ) , do: "<DTS || PTS>"
173167 end
174168 end
175169end
0 commit comments