-
Notifications
You must be signed in to change notification settings - Fork 120
Expand file tree
/
Copy pathRecordingSearch.xml
More file actions
1493 lines (1493 loc) · 75.4 KB
/
RecordingSearch.xml
File metadata and controls
1493 lines (1493 loc) · 75.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<?xml-stylesheet href="docbook.xsl" type="text/xsl" ?>
<book xmlns="http://docbook.org/ns/docbook" version="5.0">
<info>
<title>Recording Search Specification</title>
<titleabbrev>RecordingSearch</titleabbrev>
<releaseinfo>22.06</releaseinfo>
<author>
<orgname>ONVIF™</orgname>
<uri>www.onvif.org</uri>
</author>
<pubdate>June, 2022</pubdate>
<mediaobject>
<imageobject>
<imagedata fileref="media/logo.png" contentwidth="60mm" />
</imageobject>
</mediaobject>
<copyright>
<year>2008-2021</year>
<holder>ONVIF™ All rights reserved.</holder>
</copyright>
<legalnotice>
<para>Recipients of this document may copy, distribute, publish, or display this document so long as this copyright notice, license and disclaimer are retained with all copies of the document. No license is granted to modify this document.</para>
<para>THIS DOCUMENT IS PROVIDED "AS IS," AND THE CORPORATION AND ITS MEMBERS AND THEIR AFFILIATES, MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THIS DOCUMENT ARE SUITABLE FOR ANY PURPOSE; OR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</para>
<para>IN NO EVENT WILL THE CORPORATION OR ITS MEMBERS OR THEIR AFFILIATES BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT, WHETHER OR NOT (1) THE CORPORATION, MEMBERS OR THEIR AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR (2) SUCH DAMAGES WERE REASONABLY FORESEEABLE, AND ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THIS DOCUMENT. THE FOREGOING DISCLAIMER AND LIMITATION ON LIABILITY DO NOT APPLY TO, INVALIDATE, OR LIMIT REPRESENTATIONS AND WARRANTIES MADE BY THE MEMBERS AND THEIR RESPECTIVE AFFILIATES TO THE CORPORATION AND OTHER MEMBERS IN CERTAIN WRITTEN POLICIES OF THE CORPORATION.</para>
</legalnotice>
<revhistory>
<revision>
<revnumber>2.1</revnumber>
<date>Jul-2011</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>Split from Core 2.0</revremark>
</revision>
<revision>
<revnumber>2.1.1</revnumber>
<date>Jan-2012</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>Change Requests 325, 327, 328, 435, 535</revremark>
</revision>
<revision>
<revnumber>2.2</revnumber>
<date>Apr-2012</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>Change Requests 601, 608, 614, 616, 621, 671, 672</revremark>
</revision>
<revision>
<revnumber>2.2.1</revnumber>
<date>Sep-2012</date>
<author>
<personname>Hans Busch</personname>
</author>
<revremark>Change Requests 708, 765, 766, 778, 780, 781, 827, 837</revremark>
</revision>
<revision>
<revnumber>2.3</revnumber>
<date>May-2013</date>
<author>
<personname>Michio Hirai</personname>
</author>
<revremark>Change Request 884</revremark>
</revision>
<revision>
<revnumber>2.4</revnumber>
<date>Aug-2013</date>
<author>
<personname>Michio Hirai</personname>
</author>
<revremark>Change Request 1090, 1147, 1152</revremark>
</revision>
<revision>
<revnumber>2.4.1</revnumber>
<date>Dec-2013</date>
<author>
<personname>Michio Hirai</personname>
</author>
<revremark>Change Request 1190, 1208</revremark>
</revision>
<revision>
<revnumber>2.4.2</revnumber>
<date>Jun-2014</date>
<author>
<personname>Michio Hirai</personname>
</author>
<revremark>Change Request 1229</revremark>
</revision>
<revision>
<revnumber>2.5</revnumber>
<date>Dec-2014</date>
<author>
<personname>Michio Hirai</personname>
</author>
<revremark>Change Request 1457</revremark>
</revision>
<revision>
<revnumber>2.6</revnumber>
<date>Jun-2015</date>
<author>
<personname>Michio Hirai</personname>
</author>
<revremark>Change Request 1651</revremark>
</revision>
<revision>
<revnumber>2.6.1</revnumber>
<date>Dec-2015</date>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Change Request 1720</revremark>
</revision>
<revision>
<revnumber>16.06</revnumber>
<date>Jun-2016</date>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Change Request 1695, 1763</revremark>
</revision>
<revision>
<revnumber>17.06</revnumber>
<date>Jun-2017</date>
<author>
<personname>Stefan Andersson</personname>
</author>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Update method layouts
Change Request 1843, 2050, 2053, 2055, 2065</revremark>
</revision>
<revision>
<revnumber>18.12</revnumber>
<date>Dec-2018</date>
<author>
<personname>Hiroyuki Sano</personname>
</author>
<revremark>Change Request 2382</revremark>
</revision>
<revision>
<revnumber>21.12</revnumber>
<date>Dec-2021</date>
<author>
<personname>Sergey Bogdanov</personname>
</author>
<revremark>Change the "role" attribute for request access class.</revremark>
</revision>
<revision>
<revnumber>22.06</revnumber>
<date>June-2022</date>
<author>
<personname>Fredrik Svensson</personname>
</author>
<revremark>Change the "role" attribute for request access class.</revremark>
</revision>
</revhistory>
</info>
<chapter>
<title>Scope</title>
<para>This document defines the web service interface for searching for recorded Video, Audio and Metadata. </para>
<para>For a definition of the storage model see the ONVIF Recording Control Specification.</para>
<para>Web service usage is outside of the scope of this document. Please refer to the ONVIF core specification.</para>
</chapter>
<chapter>
<title>Normative references</title>
<para>ONVIF Core Specification</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/specs/core/ONVIF-Core-Specification.pdf"></link>></para>
<para>ONVIF Recording Control Specification</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/specs/srv/rec/ONVIF-RecordingControl-Service-Spec.pdf"></link>></para>
<para>W3C XML Path Language (XPath) Version 1.0</para>
<para role="reference"><<link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="https://www.w3.org/TR/1999/REC-xpath-19991116"></link>></para>
</chapter>
<chapter>
<title>Terms and Definitions</title>
<section>
<title>Definitions</title>
<informaltable>
<tgroup cols="2">
<colspec colname="c1" colwidth="24*" />
<colspec colname="c2" colwidth="76*" />
<tbody valign="top">
<row>
<entry align="left">
<para>
<emphasis role="bold">Metadata</emphasis>
</para>
</entry>
<entry align="left">
<para>All streaming data except video and audio, including video analytics results, PTZ position data and other <phrase>metadata (such as textual data from POS applications)</phrase>.</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Recording</emphasis>
</para>
</entry>
<entry align="left">
<para>A container for a set of audio, video and metadata tracks. A recording can hold one or more tracks. A track is viewed as an infinite timeline that holds data at certain times.</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Recording Event</emphasis>
</para>
</entry>
<entry align="left">
<para>An event associated with a Recording, represented by a notification message in the APIs</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Recording Job</emphasis>
</para>
</entry>
<entry align="left">
<para>A job performs the transfer of data from a data source to a particular recording using a particular configuration</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Track</emphasis>
</para>
</entry>
<entry align="left">
<para>An individual data channel consisting of video, audio, or metadata. This definition is consistent with the definition of track in [RFC 2326]</para>
</entry>
</row>
<row>
<entry align="left">
<para>
<emphasis role="bold">Video Analytics</emphasis>
</para>
</entry>
<entry align="left">
<para>Algorithms or programs used to analyze video data and to generate data describing object location and behaviour.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>
</chapter>
<chapter>
<title>Overview</title>
<para>The search service enables a client to find information about the recordings on the storage device, for example to construct a “timeline” view, and to find data of interest within a set of recordings. The latter is achieved by searching for events and other information that is included in the metadata track recording.</para>
<para>The search service provides the following functionality:</para>
<itemizedlist>
<listitem>
<para>Find recordings and information about each recording</para>
</listitem>
<listitem>
<para>Find events in the metadata and among the historical events</para>
</listitem>
<listitem>
<para>Find PTZ positions in the metadata</para>
</listitem>
<listitem>
<para>Find other information in the metadata e.g. text from EPOS (electronic point-of-sale) systems</para>
</listitem>
</itemizedlist>
<para>The actual searching is done by coupled find and result operations and is asynchronous. Each find operation initiates a search session. The client can then acquire the results from the search session in increments, or all at once, depending on implementation and the scale of the search. There are four pairs of search operations for recordings, recording events, PTZ positions and metadata.</para>
<para>FindRecordings and GetRecordingSearchResults</para>
<para>FindEvents and GetEventSearchResults</para>
<para>FindPTZPosition and GetPTZPositionSearchResults</para>
<para>FindMetadata and GetMetadataSearchResults</para>
<para>WSDL for this service is specified in <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.onvif.org/ver10/search.wsdl">http://www.onvif.org/ver10/search.wsdl</link>.</para>
<table>
<title>Referenced namespaces (with prefix)</title>
<tgroup cols="2">
<colspec colname="c1" colwidth="13*" />
<colspec colname="c2" colwidth="87*" />
<thead>
<row>
<entry>
<para>Prefix</para>
</entry>
<entry>
<para>Namespace URI</para>
</entry>
</row>
</thead>
<tbody valign="top">
<row>
<entry>
<para>env</para>
</entry>
<entry>
<para>http://www.w3.org/2003/05/soap-envelope</para>
</entry>
</row>
<row>
<entry>
<para>ter</para>
</entry>
<entry>
<para>http://www.onvif.org/ver10/error</para>
</entry>
</row>
<row>
<entry>
<para>xs </para>
</entry>
<entry>
<para>http://www.w3.org/2001/XMLSchema </para>
</entry>
</row>
<row>
<entry>
<para>tt</para>
</entry>
<entry>
<para>http://www.onvif.org/ver10/schema</para>
</entry>
</row>
<row>
<entry>
<para>tse</para>
</entry>
<entry>
<para>http://www.onvif.org/ver10/search/wsdl</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</chapter>
<chapter>
<title>Service</title>
<section>
<title>Introduction</title>
<para>The search service provides a number of operations for finding data of interest within a set of recordings. The most common way of doing this would be to search for events that are either included in the metadata track of a recording, or are otherwise associated with a recording in the device (see Recording Events below). </para>
<para>GetRecordingSummary returns a summary for all recording, and can be used to provide the scale of a timeline.</para>
<para>GetRecordingInformation returns information about a single recording, such as start time and current status.</para>
<para>GetMediaAttributes returns the media attributes of a recording at a specific point in time.</para>
<para>The actual search is done by coupled find and result operations. Each find operation initiates a search session. The client can then acquire the results from the search session in increments, or all at once, depending on implementation and the scale of the search. There are four pairs of search operations for Recordings, Recording Events, PTZ Positions and Metadata.</para>
<para>GetSearchState returns the state of a search session.</para>
<para>EndSearch ends a search session, halting search and returning any blocking result operations.</para>
</section>
<section>
<title>Concepts</title>
<section>
<title>Search Direction</title>
<para>Search is performed from a start point on the time line, towards an end point. If the end point is prior to the start point, search will be performed backwards. This can be useful if only the newest matching event is of interest, or if it is otherwise convenient to get the results in newest to oldest order.</para>
<para>If no end point is specified, the search will always be performed forward in time from the start point.</para>
</section>
<section xml:id="_Toc247178878">
<title>Recording Event</title>
<para>Describes a discrete event related to the recording. It is represented as a notification message, but this does not necessarily mean it has been recorded as a notification. Recording events can either be notifications included in a recorded metadata track, it can be created by the recording device as a result of an internal event or mechanism, or it can be inserted by a client using a WebService request or a metadata stream. However the recording event has been created and associated with a particular recording, this specification makes no implications on how it is stored internally on a device, only how it should be represented in the interface.</para>
<para>However created, recording events are always treated as notifications in regards to search filters and results returned. Each recording event has a notification topic as defined in the Topic Structure section of the ONVIF Core Specification. Predefined recording events are described in section <xref linkend="_Ref300655850" />.</para>
<para>To communicate the original state of property events, virtual start state events can be returned in a search result containing the value of one or more properties at the start point of the search interval. Such start state events are virtual events in the sense that they are created on the fly by the server, rather than being collected from recorded data. If the client indicates that such events are desired by setting the appropriate flag, virtual events matching the topics defined in the search filter shall be returned for any recording in the search scope.</para>
</section>
<section>
<title>Search Session</title>
<para>A search session is started asynchronously by a Find-operation and is identified by a search token unique for that session. Results are returned in increments using GetResult-operations referring to the session created by the Find-operation. The search can be terminated in three ways:</para>
<itemizedlist>
<listitem>
<para>KeepAlive time expires – If no request from a client has been made that refers to a particular session within the specified time interval, it will terminate.</para>
</listitem>
<listitem>
<para>A GetResult method returns the last data for the search session by setting the search state in its result to “<phrase>Completed”.</phrase></para>
</listitem>
<listitem>
<para>EndSearch – The client explicitly ends a session.</para>
</listitem>
</itemizedlist>
<para>Ending a session will cancel an ongoing search, immediately return and make further requests to the same session result in an error message. A device shall not reuse search token immediately as it would confuse clients unaware that a session had ended.</para>
</section>
<section xml:id="_Toc247178880">
<title>Search Scope</title>
<para>The scope contains a number of optional elements, together limiting the set of data to look into when performing searches.</para>
<section>
<title>Included data</title>
<para>Optionally, the client can define sources and recordings to search in by specifying lists of tokens for each type. If several types are given, the union of the specified tokens shall be used. If there are no sources or recordings tokens specified, all recordings shall be included. The scope is further refined by the Recording Information Filter. However, if recordings are specified the filters will only be applied to that subset of recordings.</para>
</section>
<section>
<title>Recording Information Filter</title>
<para>Rather than specifying a list of recording tokens, the recordings can be filtered by an Xpath filter operating on the RecordingInformation structure. This allows the client to filter on all elements present in the RecordingInformation structure, using comparisons according to the Xpath dialect defined in section <xref linkend="_Toc247178908" />. If a recording information filter is supplied, only recordings matching the filter shall be part of the scope.</para>
<para>Example of a filter that includes only recordings containing audio in the search scope:</para>
<programlisting><![CDATA[boolean(//Track[TrackType = “Audio”])
]]></programlisting>
</section>
</section>
<section>
<title>
<literal>
</literal>Search Filters</title>
<para>Search filters are specific for the type of search operation. See FindEvents, FindPTZPosition, FindMetadata respectively. They all act on the recordings defined by the scope.</para>
</section>
<section>
<title>
<literal>
</literal>Time Information</title>
<para>An ONVIF compliant device shall support time values in request parameters that are given in utc with the 'Z' indicator and respond all time values as utc including the 'Z' indicator.</para>
</section>
</section>
<section>
<title>Data Structures</title>
<section>
<title>RecordingInformation Structure</title>
<para>RecordingInformation contains information about a recording, the tracks it consists of and the source.</para>
<variablelist>
<varlistentry>
<term>RecordingToken</term>
<listitem>
<para>a unique identifier of the recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>EarliestRecording</term>
<listitem><para>the date and time of the oldest data in the recording</para></listitem>
</varlistentry>
<varlistentry>
<term>LatestRecording</term>
<listitem><para>the date and time of the newest data in the recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Content</term>
<listitem><para> informative description of content. If the content is unknown this field is empty</para></listitem>
</varlistentry>
<varlistentry>
<term>RecordingStatus</term>
<listitem>
<para>current status of recording, can be any of: Initiated,
Recording, Stopped, Removing, Removed, Unknown.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>RecordingSourceInformation</term>
<listitem>
<para> a structure containing information about the source of the recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>TrackInformation</term>
<listitem><para> a list of track information structures.</para></listitem>
</varlistentry>
</variablelist>
<figure>
<title>Recording state chart.</title>
<mediaobject>
<imageobject>
<imagedata fileref="media/RecordingSearch/image2.svg" contentwidth="116.60mm" contentdepth="64.78mm" />
</imageobject>
</mediaobject>
</figure>
<para>Figure 1 shows the state changes for the RecordingStatus. The following adds additional explanation:</para>
<variablelist>
<varlistentry>
<term>Initiated</term>
<listitem>
<para>The new recording is created and the specified recording has not jet started to record.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Recording</term>
<listitem>
<para>The recording job is executing the specified recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Stopped</term>
<listitem>
<para>The recording job is pausing the specified recording. This case requires that the job has started recording before at least once.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Removing</term>
<listitem>
<para>The specified recording is in the process of being deleted.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Removed</term>
<listitem>
<para>The specified recording has been removed.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Unknown</term>
<listitem>
<para>This case should never happen.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>RecordingSourceInformation Structure</title>
<para>Contains information about the source of a recording.</para>
<variablelist>
<varlistentry>
<term>SourceId</term>
<listitem>
<para>an identifier for the source chosen by the client that creates the recording. This identifier is opaque to the device. Clients may use any type of URI for this field. If this identifier is not present this field is empty.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Name</term>
<listitem>
<para>informative name of the source. If the name is unknown this field is empty.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Location</term>
<listitem>
<para>informative description of the location of the source. If the description is not available this string is empty.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Description</term>
<listitem>
<para>informative description of the source. If this description is not present, the description is empty.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Address</term>
<listitem>
<para>informative URI of the source.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>TrackInformation Structure</title>
<para>Contains information about a single track in a recording. Note that a track may represent a single contiguous time span or consist of multiple slices as shown in the introduction of the ONVIF Recording Control Specification. If there is no recorded data for a track the TrackInformation shall not be provided.</para>
<variablelist>
<varlistentry>
<term>TrackToken</term>
<listitem>
<para>An identifier of the track. The TrackToken is unique between all TrackTokens used within a recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>TrackType</term>
<listitem>
<para>Identifies the type of track (video, audio or metadata)</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Description</term>
<listitem>
<para>Informative description of the track. If this information is not present, this field is empty.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>DataFrom</term>
<listitem>
<para>The start date and time of the oldest recorded data in the track.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>DataTo</term>
<listitem>
<para>The stop date and time of the newest recorded data in the track.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>SearchState Enumeration</title>
<para>The search state can be one of the following</para>
<variablelist>
<varlistentry>
<term>Searching</term>
<listitem>
<para>The database search is in progress and there may be results available that can be fetched via the method GetEventSearchResults.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Completed</term>
<listitem>
<para>Search has been completed and all results have been delivered via GetEventSearchResults.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The usage of the additionally defined state "Queued" is deprecated.</para>
</section>
<section>
<title>MediaAttributes Structure</title>
<para>The MediaAttributes contains information about the media tracks of a particular recording for a particular time frame. The time frame can be a single point in time, in which case the <emphasis>From</emphasis> and <emphasis>Until</emphasis> elements are identical.</para>
<variablelist>
<varlistentry>
<term>RecordingToken</term>
<listitem>
<para>A reference to the recording that this structure concerns.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>From</term>
<listitem>
<para>A point in time from when the attributes are valid for the recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Until</term>
<listitem>
<para>A point in time until when the specified attributes are valid for the recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>VideoAttributes</term>
<listitem>
<para>A set of video attributes, describing the data of a recorded video track.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>AudioAttributes</term>
<listitem>
<para>A set of audio attributes, describing the data of a recorded audio track.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>MetadataAttributes</term>
<listitem>
<para>A set of attributes, describing the possible metadata content of a recorded metadata track.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>FindEventResult Structure</title>
<variablelist>
<varlistentry>
<term>RecordingToken</term>
<listitem>
<para>Identifying the recording containing the found event.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>TrackToken</term>
<listitem>
<para>Identifying the track containing the found event.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Time</term>
<listitem>
<para>The date and time of the found event.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Event</term>
<listitem>
<para>The event message found.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>StartStateEvent</term>
<listitem>
<para>If true, indicates the event represents the start state of one or more properties in the recording.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>FindPTZPositionResult Structure</title>
<variablelist>
<varlistentry>
<term>RecordingToken</term>
<listitem>
<para> – identifying the recording containing the matching position.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>TrackToken</term>
<listitem>
<para>Identifying the track containing the matching position.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Time</term>
<listitem>
<para>The date and time of the matching position.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Position</term>
<listitem>
<para>The matching PTZ vector.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>PTZPositionFilter Structure</title>
<para>Contains the necessary elements to define what PTZ positions to search for. The PTZ vectors shall be in the same coordinate space as the PTZ coordinates stored in the recording.</para>
<variablelist>
<varlistentry>
<term>MinPosition</term>
<listitem>
<para>The lower boundary of the PTZ volume to look for.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>MaxPosition</term>
<listitem>
<para>The upper boundary of the PTZ volume to look for.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>EnterOrExit</term>
<listitem>
<para>If true, report the positions when entering or exiting the specified PTZ volume. Otherwise report all recorded positions within the specified PTZ range. </para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>MetadataFilter Structure</title>
<para>Contains an Xpath expression to be applied to the MetadataStream structure.</para>
<para>Example of an expression searching for objects overlapping the lower right quadrant of the scene:</para>
<programlisting><![CDATA[boolean(//Object/Appearance/Shape/BoundingBox[@right > ”0.5”]) and
boolean(//Object/Appearance/Shape/BoundingBox[@bottom > ”0.5”])
]]></programlisting>
</section>
<section>
<title>FindMetadataResult Structure</title>
<variablelist>
<varlistentry>
<term>RecordingToken</term>
<listitem><para>Identifying the recording containing the matching metadata.</para></listitem>
</varlistentry>
<varlistentry>
<term>TrackToken</term>
<listitem>
<para>Identifying the track containing the matching metadata.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Time</term>
<listitem>
<para>The date and time of the matching metadata.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
</section>
<section>
<title>GetRecordingSummary</title>
<para>GetRecordingSummary is used to get a summary description of all recorded data. This operation is mandatory to support for a device implementing the recording search service. If a device returns NumberRecordings as zero, both DataFrom and DataUntil can be safely ignored.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="text">This is an empty message.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="param">Summary [tt:RecordingSummary]</para>
<para role="text">A structure containing: DataFrom specifying the first time when there is recorded data on the device; DataUntil specifying the last point in time where there is data recorded on the device; the total number of recordings on the device.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="text">None</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">READ_MEDIA</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>GetRecordingInformation</title>
<para>Returns information about a single <emphasis>Recording</emphasis> specified by a <emphasis>RecordingToken.</emphasis> This operation is mandatory to support for a device implementing the recording search service.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">RecordingToken [tt:ReferenceToken]</para>
<para role="text">Identifies the recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="param">RecordingInformation [tt:RecordingInformation]</para>
<para role="text">Information about the recording.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidToken</para>
<para role="text">The recording token is not valid</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">READ_MEDIA</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>GetMediaAttributes</title>
<para>Returns a set of media attributes for all tracks of the specified recordings at a specified point in time. Clients using this operation shall be able to use it as a non-blocking operation. A device shall set the starttime and endtime of the MediaAttributes structure to equal values if calculating this range would cause this operation to block. See MediaAttributes structure for more information. This operation is mandatory to support for a device implementing the recording search service.</para>
<para>Devices indicating CanContainPTZ shall report the PTZ spaces in use at the specified point in time (including generic spaces). For optimal interoperability device implementations should use generic spaces. The generic spaces are the following:</para>
<programlisting><![CDATA[http://www.onvif.org/ver10/tptz/PanTiltSpaces/PositionGenericSpace
http://www.onvif.org/ver10/tptz/ZoomSpaces/PositionGenericSpace
]]></programlisting>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">RecordingTokens – optional, unbounded [tt:ReferenceToken]</para>
<para role="text">A list of references to the recordings to query. If no recording tokens are provided all recordings should be queried.</para>
<para role="param">Time [xs:dateTime]</para>
<para role="text">The point in time from where the information is requested.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="param">MediaAttributes – optional, unbounded [tt:MediaAttributes]</para>
<para role="text">Contains a MediaAttributes structure for the RecordingToken specified in the request. Note that each RecordingToken can result in zero or one MediaAttributes.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidToken</para>
<para role="text">The recording token is not valid.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">READ_MEDIA</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>FindRecordings</title>
<para>FindRecordings starts a search session, looking for recordings that match the scope (See <xref linkend="_Toc247178880" />) defined in the request. Results from the search are acquired using the GetRecordingSearchResults request, specifying the search token returned from this request.</para>
<para>The device shall continue searching until one of the following occurs:</para>
<itemizedlist>
<listitem>
<para>The total number of matches has been found, defined by the <emphasis>MaxMatches</emphasis> parameter.</para>
</listitem>
<listitem>
<para>The session has been ended by a client EndSearch request.</para>
</listitem>
<listitem>
<para>The session has been ended because <emphasis>KeepAliveTime</emphasis> since the last request related to this session has expired.</para>
</listitem>
</itemizedlist>
<para>The order of the results is undefined, to allow the device to return results in any order they are found. This operation is mandatory to support for a device implementing the recording search service. </para>
<para>For the KeepAliveTime a device shall support at least values up to ten seconds. A device may adapt larger values.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">Scope [tt:SearchScope]</para>
<para role="text">Defines the dataset to consider for this search</para>
<para role="param">MaxMatches - optional [xs:int]</para>
<para role="text">The search ends after MaxMatches.</para>
<para role="param">KeepAliveTimeout [xs:duration]</para>
<para role="text">The session timeout after each request concerning this session.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>response</term>
<listitem>
<para role="param">SearchToken [tt:Jobtoken]</para>
<para role="text">Identifies the search session created by this request.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidToken</para>
<para role="text">The recording token is not valid.</para>
<para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidSource</para>
<para role="text">The recording source is not valid.</para>
<para role="param">env:Receiver - ter:Action - ter:ResourceProblem</para>
<para role="text">Device is unable to create a new search session.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">READ_MEDIA</para>
</listitem>
</varlistentry>
</variablelist>
</section>
<section>
<title>GetRecordingSearchResults</title>
<para>GetRecordingSearchResults acquires the results from a recording search session previously initiated by a FindRecordings operation. The response shall not include results already returned in previous requests for the same session. If <emphasis>MaxResults</emphasis> is specified, the response shall not contain more than <emphasis>MaxResults</emphasis> results. The number of results relates to the number of recordings. For viewing individual recorded data for a signal track use the FindEvents method.</para>
<para>GetRecordingSearchResults shall block until:</para>
<itemizedlist>
<listitem>
<para>
<emphasis>MaxResults</emphasis> results are available for the response if <emphasis>MaxResults</emphasis> is specified.</para>
</listitem>
<listitem>
<para>
<emphasis>MinResults</emphasis> results are available for the response if <emphasis>MinResults</emphasis> is specified.</para>
</listitem>
<listitem>
<para>
<emphasis>WaitTime</emphasis> has expired.</para>
</listitem>
<listitem>
<para>Search is completed or stopped.</para>
</listitem>
</itemizedlist>
<para>This operation is mandatory to support for a device implementing the recording search service. If any of the specified parameters MinResults and WaitTime exceed the supported range a device shall adapt them instead of responding an error.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">SearchToken [tt:JobToken]</para>
<para role="text">Specifies the search session.</para>
<para role="param">MinResults - optional [xs:int]</para>
<para role="text">Specifies the minimum number of results that should be returned. If the total number of results is lower than MinResults in a completed search, all results should be returned.</para>
<para role="param">MaxResults – optional [xs:int]</para>
<para role="text">Specifies the maximum number of results to return.</para>
<para role="param">WaitTime – optional [xs:duration]</para>
<para role="text">Defines the maximum time to block, waiting for results.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>faults</term>
<listitem>
<para role="param">env:Sender - ter:InvalidArgVal - ter:InvalidToken</para>
<para role="text">The search token is invalid.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>access class</term>
<listitem>
<para role="access">READ_MEDIA</para>
</listitem>
</varlistentry>
</variablelist>
<para>RESPONE:</para>
<itemizedlist>
<listitem>
<para>ResultList [tt:FindRecordingResultList]</para>
<para>A structure containing the current SearchState and a list of RecordingInformation structures.</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>FindEvents</title>
<para>FindEvents starts a search session, looking for events in the <emphasis>scope</emphasis> (See <xref linkend="_Toc247178880" />) that match the search filter defined in the request. Events are recording events (see <xref linkend="_Toc247178878" />) and other events that are available in the track. Results from the search are acquired using the GetEventSearchResults request, specifying the search token returned from this request.</para>
<para>The device shall continue searching until one of the following occurs:</para>
<itemizedlist>
<listitem>
<para>The entire time range from <emphasis>StartPoint</emphasis> to <emphasis>EndPoint </emphasis>has been searched through.</para>
</listitem>
<listitem>
<para>The total number of matches has been found, defined by the <emphasis>MaxMatches</emphasis> parameter.</para>
</listitem>
<listitem>
<para>The session has been ended by a client EndSearch request.</para>
</listitem>
<listitem>
<para>The session has been ended because <emphasis>KeepAliveTime</emphasis> since the last request related to this session has expired.</para>
</listitem>
</itemizedlist>
<para>Results shall be ordered by time, ascending in case of forward search, or descending in case of backward search. This operation is mandatory to support for a device implementing the recording search service. Although the values of property events refer to the forward direction, they shall be reported identically in reverse search mode.</para>
<para>For the KeepAliveTime a device shall support at least values up to ten seconds. A device may adapt larger values.</para>
<variablelist role="op">
<varlistentry>
<term>request</term>
<listitem>
<para role="param">StartPoint [xs:dateTime]</para>
<para role="text">The point of time where the search will start.</para>
<para role="param">EndPoint – optional [xs:dateTime]</para>
<para role="text">The point of time where the search will stop. This can be a time before the StartPoint, in which case the search is performed backwards in time. If EndPoint is omitted, search will go forward from the StartPoint.</para>
<para role="param">Scope [tt:SearchScope]</para>
<para role="text">Defines the dataset to consider for this search.</para>
<para role="param">SearchFilter [tt:EventFilter]</para>
<para role="text">Contains the topic and message filter needed to define what events to search for.</para>
<para role="param">IncludeStartState [xs:boolean]</para>
<para role="text">By setting the IncludeStartState to true, the client indicates that virtual events at the time of StartPoint should be returned to represent the state in the recording. In case of a backward search, virtual events at the time of EndPoint and StartPoint should be returned. Support for virtual events is mandatory for recording events. Support for additional virtual events is signalled via the GeneralStartEvents capability.</para>
<para role="param">MaxMatches – optional [xs:int]</para>
<para role="text">The search ends after MaxMatches.</para>
<para role="param">KeepAliveTime [xs:duration]</para>
<para role="text">The session timeout after each request concerning this session.</para>
</listitem>