renderer.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. /*
  2. * Generic Implementation of strmbase Base Renderer classes
  3. *
  4. * Copyright 2012 Aric Stewart, CodeWeavers
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  19. */
  20. #include "strmbase_private.h"
  21. WINE_DEFAULT_DEBUG_CHANNEL(quartz);
  22. /* The following quality-of-service code is based on GstBaseSink QoS code, which
  23. * is covered by the following copyright information:
  24. *
  25. * GStreamer
  26. * Copyright (C) 2005-2007 Wim Taymans <wim.taymans@gmail.com>
  27. *
  28. * gstbasesink.c: Base class for sink elements
  29. *
  30. * This library is free software; you can redistribute it and/or
  31. * modify it under the terms of the GNU Library General Public
  32. * License as published by the Free Software Foundation; either
  33. * version 2 of the License, or (at your option) any later version.
  34. *
  35. * This library is distributed in the hope that it will be useful,
  36. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  37. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  38. * Library General Public License for more details.
  39. *
  40. * You should have received a copy of the GNU Library General Public
  41. * License along with this library; if not, write to the
  42. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  43. * Boston, MA 02110-1301, USA.
  44. */
  45. #define DO_RUNNING_AVG(avg,val,size) (((val) + ((size)-1) * (avg)) / (size))
  46. /* Generic running average; this has a neutral window size. */
  47. #define UPDATE_RUNNING_AVG(avg,val) DO_RUNNING_AVG(avg,val,8)
  48. /* The windows for these running averages are experimentally obtained.
  49. * Positive values get averaged more, while negative values use a small
  50. * window so we can react faster to badness. */
  51. #define UPDATE_RUNNING_AVG_P(avg,val) DO_RUNNING_AVG(avg,val,16)
  52. #define UPDATE_RUNNING_AVG_N(avg,val) DO_RUNNING_AVG(avg,val,4)
  53. static void reset_qos(struct strmbase_renderer *filter)
  54. {
  55. filter->last_left = filter->avg_duration = filter->avg_pt = -1;
  56. filter->avg_rate = -1.0;
  57. }
  58. static void perform_qos(struct strmbase_renderer *filter,
  59. const REFERENCE_TIME start, const REFERENCE_TIME stop, REFERENCE_TIME jitter)
  60. {
  61. REFERENCE_TIME pt, entered, left, duration;
  62. double rate;
  63. if (jitter < 0)
  64. {
  65. /* This is the time the buffer entered the sink. */
  66. if (start < -jitter)
  67. entered = 0;
  68. else
  69. entered = start + jitter;
  70. left = start;
  71. }
  72. else
  73. {
  74. /* This is the time the buffer entered the sink. */
  75. entered = start + jitter;
  76. /* This is the time the buffer left the sink. */
  77. left = start + jitter;
  78. }
  79. /* Calculate the duration of the buffer. */
  80. if (stop >= start)
  81. duration = stop - start;
  82. else
  83. duration = 0;
  84. /* If we have the time when the last buffer left us, calculate processing
  85. * time. */
  86. if (filter->last_left >= 0)
  87. {
  88. if (entered > filter->last_left)
  89. pt = entered - filter->last_left;
  90. else
  91. pt = 0;
  92. }
  93. else
  94. {
  95. pt = filter->avg_pt;
  96. }
  97. TRACE("start %s, entered %s, left %s, pt %s, duration %s, jitter %s.\n",
  98. debugstr_time(start), debugstr_time(entered), debugstr_time(left),
  99. debugstr_time(pt), debugstr_time(duration), debugstr_time(jitter));
  100. TRACE("average duration %s, average pt %s, average rate %.16e.\n",
  101. debugstr_time(filter->avg_duration), debugstr_time(filter->avg_pt), filter->avg_rate);
  102. /* Collect running averages. For first observations, we copy the values. */
  103. if (filter->avg_duration < 0)
  104. filter->avg_duration = duration;
  105. else
  106. filter->avg_duration = UPDATE_RUNNING_AVG(filter->avg_duration, duration);
  107. if (filter->avg_pt < 0)
  108. filter->avg_pt = pt;
  109. else
  110. filter->avg_pt = UPDATE_RUNNING_AVG(filter->avg_pt, pt);
  111. if (filter->avg_duration != 0)
  112. rate = (double)filter->avg_pt / (double)filter->avg_duration;
  113. else
  114. rate = 0.0;
  115. if (filter->last_left >= 0)
  116. {
  117. if (filter->avg_rate < 0.0)
  118. {
  119. filter->avg_rate = rate;
  120. }
  121. else
  122. {
  123. if (rate > 1.0)
  124. filter->avg_rate = UPDATE_RUNNING_AVG_N(filter->avg_rate, rate);
  125. else
  126. filter->avg_rate = UPDATE_RUNNING_AVG_P(filter->avg_rate, rate);
  127. }
  128. }
  129. if (filter->avg_rate >= 0.0)
  130. {
  131. Quality q;
  132. /* If we have a valid rate, start sending QoS messages. */
  133. if (jitter < 0)
  134. {
  135. /* Make sure we never go below 0 when adding the jitter to the
  136. * timestamp. */
  137. if (start < -jitter)
  138. jitter = -start;
  139. }
  140. else
  141. {
  142. jitter += stop - start;
  143. }
  144. q.Type = (jitter > 0 ? Famine : Flood);
  145. q.Proportion = 1000.0 / filter->avg_rate;
  146. if (q.Proportion < 200)
  147. q.Proportion = 200;
  148. else if (q.Proportion > 5000)
  149. q.Proportion = 5000;
  150. q.Late = jitter;
  151. q.TimeStamp = start;
  152. IQualityControl_Notify(&filter->IQualityControl_iface, &filter->filter.IBaseFilter_iface, q);
  153. }
  154. /* Record when this buffer will leave us. */
  155. filter->last_left = left;
  156. }
  157. static inline struct strmbase_renderer *impl_from_strmbase_filter(struct strmbase_filter *iface)
  158. {
  159. return CONTAINING_RECORD(iface, struct strmbase_renderer, filter);
  160. }
  161. static inline struct strmbase_renderer *impl_from_IPin(IPin *iface)
  162. {
  163. return CONTAINING_RECORD(iface, struct strmbase_renderer, sink.pin.IPin_iface);
  164. }
  165. static struct strmbase_pin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index)
  166. {
  167. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  168. if (index == 0)
  169. return &filter->sink.pin;
  170. return NULL;
  171. }
  172. static void renderer_destroy(struct strmbase_filter *iface)
  173. {
  174. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  175. filter->ops->renderer_destroy(filter);
  176. }
  177. static HRESULT renderer_query_interface(struct strmbase_filter *iface, REFIID iid, void **out)
  178. {
  179. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  180. HRESULT hr;
  181. if (filter->ops->renderer_query_interface
  182. && SUCCEEDED(hr = filter->ops->renderer_query_interface(filter, iid, out)))
  183. {
  184. return hr;
  185. }
  186. if (IsEqualGUID(iid, &IID_IMediaPosition))
  187. *out = &filter->passthrough.IMediaPosition_iface;
  188. else if (IsEqualGUID(iid, &IID_IMediaSeeking))
  189. *out = &filter->passthrough.IMediaSeeking_iface;
  190. else if (IsEqualGUID(iid, &IID_IQualityControl))
  191. *out = &filter->IQualityControl_iface;
  192. else
  193. return E_NOINTERFACE;
  194. IUnknown_AddRef((IUnknown *)*out);
  195. return S_OK;
  196. }
  197. static HRESULT renderer_init_stream(struct strmbase_filter *iface)
  198. {
  199. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  200. if (filter->sink.pin.peer)
  201. ResetEvent(filter->state_event);
  202. filter->eos = FALSE;
  203. ResetEvent(filter->flush_event);
  204. if (filter->ops->renderer_init_stream)
  205. filter->ops->renderer_init_stream(filter);
  206. return filter->sink.pin.peer ? S_FALSE : S_OK;
  207. }
  208. static HRESULT renderer_start_stream(struct strmbase_filter *iface, REFERENCE_TIME start)
  209. {
  210. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  211. IFilterGraph *graph = filter->filter.graph;
  212. IMediaEventSink *event_sink;
  213. filter->stream_start = start;
  214. SetEvent(filter->state_event);
  215. SetEvent(filter->run_event);
  216. reset_qos(filter);
  217. if (filter->sink.pin.peer && filter->ops->renderer_start_stream)
  218. filter->ops->renderer_start_stream(filter);
  219. if ((filter->eos || !filter->sink.pin.peer) && graph
  220. && SUCCEEDED(IFilterGraph_QueryInterface(graph,
  221. &IID_IMediaEventSink, (void **)&event_sink)))
  222. {
  223. IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK,
  224. (LONG_PTR)&filter->filter.IBaseFilter_iface);
  225. IMediaEventSink_Release(event_sink);
  226. }
  227. return S_OK;
  228. }
  229. static HRESULT renderer_stop_stream(struct strmbase_filter *iface)
  230. {
  231. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  232. ResetEvent(filter->run_event);
  233. if (filter->sink.pin.peer && filter->ops->renderer_stop_stream)
  234. filter->ops->renderer_stop_stream(filter);
  235. return S_OK;
  236. }
  237. static HRESULT renderer_cleanup_stream(struct strmbase_filter *iface)
  238. {
  239. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  240. strmbase_passthrough_invalidate_time(&filter->passthrough);
  241. SetEvent(filter->state_event);
  242. SetEvent(filter->flush_event);
  243. return S_OK;
  244. }
  245. static HRESULT renderer_wait_state(struct strmbase_filter *iface, DWORD timeout)
  246. {
  247. struct strmbase_renderer *filter = impl_from_strmbase_filter(iface);
  248. if (WaitForSingleObject(filter->state_event, timeout) == WAIT_TIMEOUT)
  249. return VFW_S_STATE_INTERMEDIATE;
  250. return S_OK;
  251. }
  252. static const struct strmbase_filter_ops filter_ops =
  253. {
  254. .filter_get_pin = renderer_get_pin,
  255. .filter_destroy = renderer_destroy,
  256. .filter_query_interface = renderer_query_interface,
  257. .filter_init_stream = renderer_init_stream,
  258. .filter_start_stream = renderer_start_stream,
  259. .filter_stop_stream = renderer_stop_stream,
  260. .filter_cleanup_stream = renderer_cleanup_stream,
  261. .filter_wait_state = renderer_wait_state,
  262. };
  263. static HRESULT sink_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
  264. {
  265. struct strmbase_renderer *filter = impl_from_IPin(&pin->IPin_iface);
  266. return filter->ops->renderer_query_accept(filter, mt);
  267. }
  268. static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
  269. {
  270. struct strmbase_renderer *filter = impl_from_IPin(&iface->IPin_iface);
  271. HRESULT hr;
  272. if (filter->ops->renderer_pin_query_interface
  273. && SUCCEEDED(hr = filter->ops->renderer_pin_query_interface(filter, iid, out)))
  274. return hr;
  275. if (IsEqualGUID(iid, &IID_IMemInputPin))
  276. *out = &filter->sink.IMemInputPin_iface;
  277. else
  278. return E_NOINTERFACE;
  279. IUnknown_AddRef((IUnknown *)*out);
  280. return S_OK;
  281. }
  282. static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSample *sample)
  283. {
  284. struct strmbase_renderer *filter = impl_from_IPin(&pin->pin.IPin_iface);
  285. REFERENCE_TIME start, stop;
  286. BOOL need_wait = FALSE;
  287. FILTER_STATE state;
  288. HRESULT hr = S_OK;
  289. AM_MEDIA_TYPE *mt;
  290. if (filter->eos || filter->sink.flushing)
  291. return S_FALSE;
  292. state = filter->filter.state;
  293. if (state == State_Stopped)
  294. return VFW_E_WRONG_STATE;
  295. if (IMediaSample_GetMediaType(sample, &mt) == S_OK)
  296. {
  297. TRACE("Format change.\n");
  298. strmbase_dump_media_type(mt);
  299. if (FAILED(filter->ops->renderer_query_accept(filter, mt)))
  300. return VFW_E_TYPE_NOT_ACCEPTED;
  301. DeleteMediaType(mt);
  302. }
  303. if (filter->filter.clock && SUCCEEDED(IMediaSample_GetTime(sample, &start, &stop)))
  304. {
  305. strmbase_passthrough_update_time(&filter->passthrough, start);
  306. need_wait = TRUE;
  307. }
  308. if (state == State_Paused)
  309. {
  310. HANDLE events[2] = {filter->run_event, filter->flush_event};
  311. filter->current_sample = sample;
  312. hr = filter->ops->renderer_render(filter, sample);
  313. SetEvent(filter->state_event);
  314. LeaveCriticalSection(&filter->filter.stream_cs);
  315. WaitForMultipleObjects(2, events, FALSE, INFINITE);
  316. EnterCriticalSection(&filter->filter.stream_cs);
  317. filter->current_sample = NULL;
  318. }
  319. if (need_wait)
  320. {
  321. REFERENCE_TIME now, jitter;
  322. DWORD_PTR cookie;
  323. IReferenceClock_GetTime(filter->filter.clock, &now);
  324. /* "jitter" describes how early (negative) or late (positive) this
  325. * buffer arrived, relative to its PTS. */
  326. jitter = (now - filter->stream_start) - start;
  327. if (jitter <= -10000) /* if we are early by at least 1 ms */
  328. {
  329. HANDLE handles[2] = {filter->advise_event, filter->flush_event};
  330. DWORD ret;
  331. IReferenceClock_AdviseTime(filter->filter.clock, filter->stream_start,
  332. start, (HEVENT)filter->advise_event, &cookie);
  333. ret = WaitForMultipleObjects(2, handles, FALSE, INFINITE);
  334. IReferenceClock_Unadvise(filter->filter.clock, cookie);
  335. if (ret == 1)
  336. {
  337. TRACE("Flush signaled; discarding current sample.\n");
  338. return S_OK;
  339. }
  340. }
  341. if (state == State_Running)
  342. hr = filter->ops->renderer_render(filter, sample);
  343. perform_qos(filter, start, stop, jitter);
  344. }
  345. else
  346. {
  347. if (state == State_Running)
  348. hr = filter->ops->renderer_render(filter, sample);
  349. }
  350. return hr;
  351. }
  352. static HRESULT sink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt)
  353. {
  354. struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
  355. if (filter->ops->renderer_connect)
  356. return filter->ops->renderer_connect(filter, mt);
  357. return S_OK;
  358. }
  359. static void sink_disconnect(struct strmbase_sink *iface)
  360. {
  361. struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
  362. if (filter->ops->renderer_disconnect)
  363. filter->ops->renderer_disconnect(filter);
  364. }
  365. static HRESULT sink_eos(struct strmbase_sink *iface)
  366. {
  367. struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
  368. IFilterGraph *graph = filter->filter.graph;
  369. IMediaEventSink *event_sink;
  370. filter->eos = TRUE;
  371. if (filter->filter.state == State_Running && graph
  372. && SUCCEEDED(IFilterGraph_QueryInterface(graph,
  373. &IID_IMediaEventSink, (void **)&event_sink)))
  374. {
  375. IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK,
  376. (LONG_PTR)&filter->filter.IBaseFilter_iface);
  377. IMediaEventSink_Release(event_sink);
  378. }
  379. strmbase_passthrough_eos(&filter->passthrough);
  380. SetEvent(filter->state_event);
  381. return S_OK;
  382. }
  383. static HRESULT sink_begin_flush(struct strmbase_sink *iface)
  384. {
  385. struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
  386. SetEvent(filter->flush_event);
  387. return S_OK;
  388. }
  389. static HRESULT sink_end_flush(struct strmbase_sink *iface)
  390. {
  391. struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
  392. EnterCriticalSection(&filter->filter.stream_cs);
  393. filter->eos = FALSE;
  394. reset_qos(filter);
  395. strmbase_passthrough_invalidate_time(&filter->passthrough);
  396. ResetEvent(filter->flush_event);
  397. LeaveCriticalSection(&filter->filter.stream_cs);
  398. return S_OK;
  399. }
  400. static const struct strmbase_sink_ops sink_ops =
  401. {
  402. .base.pin_query_accept = sink_query_accept,
  403. .base.pin_query_interface = sink_query_interface,
  404. .pfnReceive = BaseRenderer_Receive,
  405. .sink_connect = sink_connect,
  406. .sink_disconnect = sink_disconnect,
  407. .sink_eos = sink_eos,
  408. .sink_begin_flush = sink_begin_flush,
  409. .sink_end_flush = sink_end_flush,
  410. };
  411. static struct strmbase_renderer *impl_from_IQualityControl(IQualityControl *iface)
  412. {
  413. return CONTAINING_RECORD(iface, struct strmbase_renderer, IQualityControl_iface);
  414. }
  415. static HRESULT WINAPI quality_control_QueryInterface(IQualityControl *iface, REFIID iid, void **out)
  416. {
  417. struct strmbase_renderer *filter = impl_from_IQualityControl(iface);
  418. return IUnknown_QueryInterface(filter->filter.outer_unk, iid, out);
  419. }
  420. static ULONG WINAPI quality_control_AddRef(IQualityControl *iface)
  421. {
  422. struct strmbase_renderer *filter = impl_from_IQualityControl(iface);
  423. return IUnknown_AddRef(filter->filter.outer_unk);
  424. }
  425. static ULONG WINAPI quality_control_Release(IQualityControl *iface)
  426. {
  427. struct strmbase_renderer *filter = impl_from_IQualityControl(iface);
  428. return IUnknown_Release(filter->filter.outer_unk);
  429. }
  430. static HRESULT WINAPI quality_control_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q)
  431. {
  432. struct strmbase_renderer *filter = impl_from_IQualityControl(iface);
  433. HRESULT hr = S_FALSE;
  434. TRACE("filter %p, sender %p, type %#x, proportion %u, late %s, timestamp %s.\n",
  435. filter, sender, q.Type, q.Proportion, debugstr_time(q.Late), debugstr_time(q.TimeStamp));
  436. if (filter->qc_sink)
  437. return IQualityControl_Notify(filter->qc_sink, &filter->filter.IBaseFilter_iface, q);
  438. if (filter->sink.pin.peer)
  439. {
  440. IQualityControl *peer_qc = NULL;
  441. IPin_QueryInterface(filter->sink.pin.peer, &IID_IQualityControl, (void **)&peer_qc);
  442. if (peer_qc)
  443. {
  444. hr = IQualityControl_Notify(peer_qc, &filter->filter.IBaseFilter_iface, q);
  445. IQualityControl_Release(peer_qc);
  446. }
  447. }
  448. return hr;
  449. }
  450. static HRESULT WINAPI quality_control_SetSink(IQualityControl *iface, IQualityControl *sink)
  451. {
  452. struct strmbase_renderer *filter = impl_from_IQualityControl(iface);
  453. TRACE("filter %p, sink %p.\n", filter, sink);
  454. filter->qc_sink = sink;
  455. return S_OK;
  456. }
  457. static const IQualityControlVtbl quality_control_vtbl =
  458. {
  459. quality_control_QueryInterface,
  460. quality_control_AddRef,
  461. quality_control_Release,
  462. quality_control_Notify,
  463. quality_control_SetSink,
  464. };
  465. void strmbase_renderer_cleanup(struct strmbase_renderer *filter)
  466. {
  467. if (filter->sink.pin.peer)
  468. IPin_Disconnect(filter->sink.pin.peer);
  469. IPin_Disconnect(&filter->sink.pin.IPin_iface);
  470. strmbase_sink_cleanup(&filter->sink);
  471. strmbase_passthrough_cleanup(&filter->passthrough);
  472. CloseHandle(filter->state_event);
  473. CloseHandle(filter->advise_event);
  474. CloseHandle(filter->run_event);
  475. CloseHandle(filter->flush_event);
  476. strmbase_filter_cleanup(&filter->filter);
  477. }
  478. void strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
  479. const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops)
  480. {
  481. memset(filter, 0, sizeof(*filter));
  482. strmbase_filter_init(&filter->filter, outer, clsid, &filter_ops);
  483. strmbase_passthrough_init(&filter->passthrough, (IUnknown *)&filter->filter.IBaseFilter_iface);
  484. ISeekingPassThru_Init(&filter->passthrough.ISeekingPassThru_iface, TRUE, &filter->sink.pin.IPin_iface);
  485. filter->IQualityControl_iface.lpVtbl = &quality_control_vtbl;
  486. filter->ops = ops;
  487. strmbase_sink_init(&filter->sink, &filter->filter, sink_name, &sink_ops, NULL);
  488. filter->state_event = CreateEventW(NULL, TRUE, TRUE, NULL);
  489. filter->advise_event = CreateEventW(NULL, FALSE, FALSE, NULL);
  490. filter->run_event = CreateEventW(NULL, TRUE, FALSE, NULL);
  491. filter->flush_event = CreateEventW(NULL, TRUE, TRUE, NULL);
  492. }