Commit 6ff08cc
authored
Initialize should be called with the packet reception time (#762)
Adding private function that does almost the same thing as the existing initialze, with the diff that it takes what it used to be now from the packet reception time. Main reason is that initialize might be delayed (until stable sequence of packets arrive), if time.Now is used on the first packet which was gated for a while - it will induce an offset.
Using packet reception time might have as a result that some other track initialized the syncrhonizer main start point to a time t1 that comes after a time of reception of this track first packet. This will in turn make base offset negative - and potentially first few PTSs returned by GetPTS.
For now these negative PTS could be ignored at the caller site before pushing a packet to the gst pipeline. Ideally - these are not ignored but a new offset is generated for the given source with a base time that would reflect the negative offset and pushed to the gst appsource.1 parent 69048ff commit 6ff08cc
2 files changed
+78
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
166 | 177 | | |
167 | 178 | | |
168 | 179 | | |
169 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
170 | 183 | | |
171 | | - | |
| 184 | + | |
172 | 185 | | |
173 | 186 | | |
174 | 187 | | |
| |||
177 | 190 | | |
178 | 191 | | |
179 | 192 | | |
180 | | - | |
| 193 | + | |
181 | 194 | | |
182 | 195 | | |
183 | 196 | | |
184 | | - | |
185 | | - | |
| 197 | + | |
| 198 | + | |
186 | 199 | | |
187 | 200 | | |
188 | 201 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
125 | 182 | | |
126 | 183 | | |
127 | 184 | | |
| |||
0 commit comments