This file is indexed.

/usr/share/gir-1.0/GstCheck-1.0.gir is in libgstreamer1.0-dev 1.2.4-0ubuntu1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations.  -->
<repository version="1.2"
            xmlns="http://www.gtk.org/introspection/core/1.0"
            xmlns:c="http://www.gtk.org/introspection/c/1.0"
            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  <include name="Gst" version="1.0"/>
  <package name="gstreamer-check-1.0"/>
  <c:include name="gst/check/check.h"/>
  <namespace name="GstCheck"
             version="1.0"
             shared-library="libgstcheck-1.0.so.0"
             c:identifier-prefixes="Gst"
             c:symbol-prefixes="gst">
    <record name="CheckABIStruct" c:type="GstCheckABIStruct">
      <field name="name" writable="1">
        <type name="utf8" c:type="const char*"/>
      </field>
      <field name="size" writable="1">
        <type name="gint" c:type="int"/>
      </field>
      <field name="abi_size" writable="1">
        <type name="gint" c:type="int"/>
      </field>
    </record>
    <record name="StreamConsistency"
            c:type="GstStreamConsistency"
            disguised="1">
      <doc xml:space="preserve">Opaque consistency checker handle.</doc>
    </record>
    <class name="TestClock"
           c:symbol-prefix="test_clock"
           c:type="GstTestClock"
           version="1.2"
           parent="Gst.Clock"
           glib:type-name="GstTestClock"
           glib:get-type="gst_test_clock_get_type"
           glib:type-struct="TestClockClass">
      <doc xml:space="preserve">GstTestClock is an implementation of #GstClock which has different
behaviour compared to #GstSystemClock. Time for #GstSystemClock advances
according to the system time, while time for #GstTestClock changes only
when gst_test_clock_set_time() or gst_test_clock_advance_time() are
called. #GstTestClock provides unit tests with the possibility to
precisely advance the time in a deterministic manner, independent of the
system time or any other external factors.

&lt;example&gt;
&lt;title&gt;Advancing the time of a #GstTestClock&lt;/title&gt;
  &lt;programlisting language="c"&gt;
  #include &amp;lt;gst/gst.h&amp;gt;
  #include &amp;lt;gst/check/gsttestclock.h&amp;gt;

  GstClock *clock;
  GstTestClock *test_clock;

  clock = gst_test_clock_new ();
  test_clock = GST_TEST_CLOCK (clock);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  gst_test_clock_advance_time ( test_clock, 1 * GST_SECOND);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  g_usleep (10 * G_USEC_PER_SEC);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  gst_test_clock_set_time (test_clock, 42 * GST_SECOND);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  ...
  &lt;/programlisting&gt;
&lt;/example&gt;

#GstClock allows for setting up single shot or periodic clock notifications
as well as waiting for these notifications synchronously (using
gst_clock_id_wait()) or asynchronously (using gst_clock_id_wait_async() or
gst_clock_id_wait_async_full()). This is used by many GStreamer elements,
among them #GstBaseSrc and #GstBaseSink.

#GstTestClock keeps track of these clock notifications. By calling
gst_test_clock_wait_for_next_pending_id() or
gst_test_clock_wait_for_pending_id_count() a unit tests may wait for the
next one or several clock notifications to be requested. Additionally unit
tests may release blocked waits in a controlled fashion by calling
gst_test_clock_process_next_clock_id(). This way a unit test can control the
inaccuracy (jitter) of clock notifications, since the test can decide to
release blocked waits when the clock time has advanced exactly to, or past,
the requested clock notification time.

There are also interfaces for determining if a notification belongs to a
#GstTestClock or not, as well as getting the number of requested clock
notifications so far.

N.B.: When a unit test waits for a certain amount of clock notifications to
be requested in gst_test_clock_wait_for_next_pending_id() or
gst_test_clock_wait_for_pending_id_count() then these functions may block
for a long time. If they block forever then the expected clock notifications
were never requested from #GstTestClock, and so the assumptions in the code
of the unit test are wrong. The unit test case runner in #GstCheck is
expected to catch these cases either by the default test case timeout or the
one set for the unit test by calling tcase_set_timeout().

The sample code below assumes that the element under test will delay a
buffer pushed on the source pad by some latency until it arrives on the sink
pad. Moreover it is assumed that the element will at some point call
gst_clock_id_wait() to synchronously wait for a specific time. The first
buffer sent will arrive exactly on time only delayed by the latency. The
second buffer will arrive a little late (7ms) due to simulated jitter in the
clock notification.

&lt;example&gt;
&lt;title&gt;Demonstration of how to work with clock notifications and #GstTestClock&lt;/title&gt;
  &lt;programlisting language="c"&gt;
  #include &amp;lt;gst/gst.h&amp;gt;
  #include &amp;lt;gst/check/gstcheck.h&amp;gt;
  #include &amp;lt;gst/check/gsttestclock.h&amp;gt;

  GstClockTime latency;
  GstElement *element;
  GstPad *srcpad;
  GstClock *clock;
  GstTestClock *test_clock;
  GstBuffer buf;
  GstClockID pending_id;
  GstClockID processed_id;

  latency = 42 * GST_MSECOND;
  element = create_element (latency, ...);
  srcpad = get_source_pad (element);

  clock = gst_test_clock_new ();
  test_clock = GST_TEST_CLOCK (clock);
  gst_element_set_clock (element, clock);

  GST_INFO ("Set time, create and push the first buffer\n");
  gst_test_clock_set_time (test_clock, 0);
  buf = create_test_buffer (gst_clock_get_time (clock), ...);
  gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK);

  GST_INFO ("Block until element is waiting for a clock notification\n");
  gst_test_clock_wait_for_next_pending_id (test_clock, &amp;pending_id);
  GST_INFO ("Advance to the requested time of the clock notification\n");
  gst_test_clock_advance_time (test_clock, latency);
  GST_INFO ("Release the next blocking wait and make sure it is the one from element\n");
  processed_id = gst_test_clock_process_next_clock_id (test_clock);
  g_assert (processed_id == pending_id);
  g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK);
  gst_clock_id_unref (pending_id);
  gst_clock_id_unref (processed_id);

  GST_INFO ("Validate that element produced an output buffer and check its timestamp\n");
  g_assert_cmpint (get_number_of_output_buffer (...), ==, 1);
  buf = get_buffer_pushed_by_element (element, ...);
  g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==, latency);
  gst_buffer_unref (buf);
  GST_INFO ("Check that element does not wait for any clock notification\n");
  g_assert (gst_test_clock_peek_next_pending_id (test_clock, NULL) == FALSE);

  GST_INFO ("Set time, create and push the second buffer\n");
  gst_test_clock_advance_time (test_clock, 10 * GST_SECOND);
  buf = create_test_buffer (gst_clock_get_time (clock), ...);
  gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK);

  GST_INFO ("Block until element is waiting for a new clock notification\n");
  (gst_test_clock_wait_for_next_pending_id (test_clock, &amp;pending_id);
  GST_INFO ("Advance past 7ms beyond the requested time of the clock notification\n");
  gst_test_clock_advance_time (test_clock, latency + 7 * GST_MSECOND);
  GST_INFO ("Release the next blocking wait and make sure it is the one from element\n");
  processed_id = gst_test_clock_process_next_clock_id (test_clock);
  g_assert (processed_id == pending_id);
  g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK);
  gst_clock_id_unref (pending_id);
  gst_clock_id_unref (processed_id);

  GST_INFO ("Validate that element produced an output buffer and check its timestamp\n");
  g_assert_cmpint (get_number_of_output_buffer (...), ==, 1);
  buf = get_buffer_pushed_by_element (element, ...);
  g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==,
      10 * GST_SECOND + latency + 7 * GST_MSECOND);
  gst_buffer_unref (buf);
  GST_INFO ("Check that element does not wait for any clock notification\n");
  g_assert (gst_test_clock_peek_next_pending_id (test_clock, NULL) == FALSE);
  ...
  &lt;/programlisting&gt;
&lt;/example&gt;

Since #GstTestClock is only supposed to be used in unit tests it calls
g_assert(), g_assert_cmpint() or g_assert_cmpuint() to validate all function
arguments. This will highlight any issues with the unit test code itself.</doc>
      <constructor name="new" c:identifier="gst_test_clock_new" version="1.2">
        <doc xml:space="preserve">Creates a new test clock with its time set to zero.

MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a #GstTestClock cast to #GstClock.</doc>
          <type name="Gst.Clock" c:type="GstClock*"/>
        </return-value>
      </constructor>
      <constructor name="new_with_start_time"
                   c:identifier="gst_test_clock_new_with_start_time"
                   version="1.2">
        <doc xml:space="preserve">Creates a new test clock with its time set to the specified time.

MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a #GstTestClock cast to #GstClock.</doc>
          <type name="Gst.Clock" c:type="GstClock*"/>
        </return-value>
        <parameters>
          <parameter name="start_time" transfer-ownership="none">
            <doc xml:space="preserve">a #GstClockTime set to the desired start time of the clock.</doc>
            <type name="Gst.ClockTime" c:type="GstClockTime"/>
          </parameter>
        </parameters>
      </constructor>
      <method name="advance_time"
              c:identifier="gst_test_clock_advance_time"
              version="1.2">
        <doc xml:space="preserve">Advances the time of the @test_clock by the amount given by @delta. The
time of @test_clock is monotonically increasing, therefore providing a
@delta which is negative or zero is a programming error.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock for which to increase the time</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="delta" transfer-ownership="none">
            <doc xml:space="preserve">a positive #GstClockTimeDiff to be added to the time of the clock</doc>
            <type name="Gst.ClockTimeDiff" c:type="GstClockTimeDiff"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_next_entry_time"
              c:identifier="gst_test_clock_get_next_entry_time"
              version="1.2">
        <doc xml:space="preserve">Retrieve the requested time for the next pending clock notification.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a #GstClockTime set to the time of the next pending clock
notification. If no clock notifications have been requested
%GST_CLOCK_TIME_NONE will be returned.</doc>
          <type name="Gst.ClockTime" c:type="GstClockTime"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock to fetch the next clock notification time for</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="has_id" c:identifier="gst_test_clock_has_id" version="1.2">
        <doc xml:space="preserve">Checks whether @test_clock was requested to provide the clock notification
given by @id.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the clock has been asked to provide the given clock
notification, %FALSE otherwise.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock to ask if it provided the notification</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="id" transfer-ownership="none">
            <doc xml:space="preserve">a #GstClockID clock notification</doc>
            <type name="Gst.ClockID" c:type="GstClockID"/>
          </parameter>
        </parameters>
      </method>
      <method name="peek_id_count"
              c:identifier="gst_test_clock_peek_id_count"
              version="1.2">
        <doc xml:space="preserve">Determine the number of pending clock notifications that have been
requested from the @test_clock.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the number of pending clock notifications.</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock for which to count notifications</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="peek_next_pending_id"
              c:identifier="gst_test_clock_peek_next_pending_id"
              version="1.2">
        <doc xml:space="preserve">Determines if the @pending_id is the next clock notification scheduled to
be triggered given the current time of the @test_clock.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if @pending_id is the next clock notification to be
triggered, %FALSE otherwise.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock to check the clock notifications for</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="pending_id"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     allow-none="1">
            <doc xml:space="preserve">a #GstClockID clock
notification to look for</doc>
            <type name="Gst.ClockID" c:type="GstClockID*"/>
          </parameter>
        </parameters>
      </method>
      <method name="process_next_clock_id"
              c:identifier="gst_test_clock_process_next_clock_id"
              version="1.2">
        <doc xml:space="preserve">MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a #GstClockID containing the next pending clock
notification.</doc>
          <type name="Gst.ClockID" c:type="GstClockID"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock for which to retrive the next pending clock
notification</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="set_time"
              c:identifier="gst_test_clock_set_time"
              version="1.2">
        <doc xml:space="preserve">Sets the time of @test_clock to the time given by @new_time. The time of
@test_clock is monotonically increasing, therefore providing a @new_time
which is earlier or equal to the time of the clock as given by
gst_clock_get_time() is a programming error.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock of which to set the time</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="new_time" transfer-ownership="none">
            <doc xml:space="preserve">a #GstClockTime later than that returned by gst_clock_get_time()</doc>
            <type name="Gst.ClockTime" c:type="GstClockTime"/>
          </parameter>
        </parameters>
      </method>
      <method name="wait_for_next_pending_id"
              c:identifier="gst_test_clock_wait_for_next_pending_id"
              version="1.2">
        <doc xml:space="preserve">Waits until a clock notification is requested from @test_clock. There is no
timeout for this wait, see the main description of #GstTestClock. A reference
to the pending clock notification is stored in @pending_id.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">#GstTestClock for which to get the pending clock notification</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="pending_id"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     allow-none="1">
            <doc xml:space="preserve">#GstClockID
with information about the pending clock notification</doc>
            <type name="Gst.ClockID" c:type="GstClockID*"/>
          </parameter>
        </parameters>
      </method>
      <method name="wait_for_pending_id_count"
              c:identifier="gst_test_clock_wait_for_pending_id_count"
              version="1.2">
        <doc xml:space="preserve">Blocks until at least @count clock notifications have been requested from
@test_clock. There is no timeout for this wait, see the main description of
#GstTestClock.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">#GstTestClock for which to await having enough pending clock</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="count" transfer-ownership="none">
            <doc xml:space="preserve">the number of pending clock notifications to wait for</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <property name="start-time"
                writable="1"
                construct-only="1"
                transfer-ownership="none">
        <doc xml:space="preserve">When a #GstTestClock is constructed it will have a certain start time set.
If the clock was created using gst_test_clock_new_with_start_time() then
this property contains the value of the @start_time argument. If
gst_test_clock_new() was called the clock started at time zero, and thus
this property contains the value 0.</doc>
        <type name="guint64" c:type="guint64"/>
      </property>
      <field name="parent">
        <type name="Gst.Clock" c:type="GstClock"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="TestClockPrivate" c:type="GstTestClockPrivate*"/>
      </field>
    </class>
    <record name="TestClockClass"
            c:type="GstTestClockClass"
            glib:is-gtype-struct-for="TestClock"
            version="1.2">
      <doc xml:space="preserve">The class of a #GstTestClock, which has no virtual methods to override.</doc>
      <field name="parent_class">
        <doc xml:space="preserve">the parent class structure</doc>
        <type name="Gst.ClockClass" c:type="GstClockClass"/>
      </field>
    </record>
    <record name="TestClockPrivate" c:type="GstTestClockPrivate" disguised="1">
    </record>
    <function name="buffer_straw_get_buffer"
              c:identifier="gst_buffer_straw_get_buffer">
      <doc xml:space="preserve">Get one buffer from @pad. Implemented via buffer probes. This function will
block until the pipeline passes a buffer over @pad, so for robust behavior
in unit tests, you need to use check's timeout to fail out in the case that a
buffer never arrives.

You must have previously called gst_buffer_straw_start_pipeline() on
@pipeline and @pad.</doc>
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">the captured #GstBuffer.</doc>
        <type name="Gst.Buffer" c:type="GstBuffer*"/>
      </return-value>
      <parameters>
        <parameter name="bin" transfer-ownership="none">
          <doc xml:space="preserve">the pipeline previously started via gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">the pad previously passed to gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="buffer_straw_start_pipeline"
              c:identifier="gst_buffer_straw_start_pipeline">
      <doc xml:space="preserve">Sets up a pipeline for buffer sucking. This will allow you to call
gst_buffer_straw_get_buffer() to access buffers as they pass over @pad.

This function is normally used in unit tests that want to verify that a
particular element is outputting correct buffers. For example, you would make
a pipeline via gst_parse_launch(), pull out the pad you want to monitor, then
call gst_buffer_straw_get_buffer() to get the buffers that pass through @pad.
The pipeline will block until you have sucked off the buffers.

This function will set the state of @bin to PLAYING; to clean up, be sure to
call gst_buffer_straw_stop_pipeline().

Note that you may not start two buffer straws at the same time. This function
is intended for unit tests, not general API use. In fact it calls fail_if
from libcheck, so you cannot use it outside unit tests.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="bin" transfer-ownership="none">
          <doc xml:space="preserve">the pipeline to run</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">a pad on an element in @bin</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="buffer_straw_stop_pipeline"
              c:identifier="gst_buffer_straw_stop_pipeline">
      <doc xml:space="preserve">Set @bin to #GST_STATE_NULL and release resource allocated in
gst_buffer_straw_start_pipeline().

You must have previously called gst_buffer_straw_start_pipeline() on
@pipeline and @pad.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="bin" transfer-ownership="none">
          <doc xml:space="preserve">the pipeline previously started via gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">the pad previously passed to gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_abi_list" c:identifier="gst_check_abi_list">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="list" transfer-ownership="none">
          <type name="CheckABIStruct" c:type="GstCheckABIStruct"/>
        </parameter>
        <parameter name="have_abi_sizes" transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_buffer_data" c:identifier="gst_check_buffer_data">
      <doc xml:space="preserve">Compare the buffer contents with @data and @size.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="buffer" transfer-ownership="none">
          <doc xml:space="preserve">buffer to compare</doc>
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
        <parameter name="data" transfer-ownership="none">
          <doc xml:space="preserve">data to compare to</doc>
          <type name="gpointer" c:type="gconstpointer"/>
        </parameter>
        <parameter name="size" transfer-ownership="none">
          <doc xml:space="preserve">size of data to compare</doc>
          <type name="gsize" c:type="gsize"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_caps_equal" c:identifier="gst_check_caps_equal">
      <doc xml:space="preserve">Compare two caps with gst_caps_is_equal and fail unless they are
equal.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="caps1" transfer-ownership="none">
          <doc xml:space="preserve">first caps to compare</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="caps2" transfer-ownership="none">
          <doc xml:space="preserve">second caps to compare</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_chain_func" c:identifier="gst_check_chain_func">
      <return-value transfer-ownership="none">
        <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
      </return-value>
      <parameters>
        <parameter name="pad" transfer-ownership="none">
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
        <parameter name="parent" transfer-ownership="none">
          <type name="Gst.Object" c:type="GstObject*"/>
        </parameter>
        <parameter name="buffer" transfer-ownership="none">
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_drop_buffers" c:identifier="gst_check_drop_buffers">
      <doc xml:space="preserve">Unref and remove all buffers that are in the global @buffers GList,
emptying the list.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
    </function>
    <function name="check_element_push_buffer"
              c:identifier="gst_check_element_push_buffer">
      <doc xml:space="preserve">Create an @element with the factory with the name and push the
@buffer_in to this element. The element should create one buffer
and this will be compared with @buffer_out. We only check the caps
and the data of the buffers. This function unrefs the buffers.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element_name" transfer-ownership="none">
          <doc xml:space="preserve">name of the element that needs to be created</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
        <parameter name="buffer_in" transfer-ownership="none">
          <doc xml:space="preserve">push this buffer to the element</doc>
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
        <parameter name="caps_in" transfer-ownership="none">
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="buffer_out" transfer-ownership="none">
          <doc xml:space="preserve">compare the result with this buffer</doc>
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
        <parameter name="caps_out" transfer-ownership="none">
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_element_push_buffer_list"
              c:identifier="gst_check_element_push_buffer_list">
      <doc xml:space="preserve">Create an @element with the factory with the name and push the buffers in
@buffer_in to this element. The element should create the buffers equal to
the buffers in @buffer_out. We only check the caps, size and the data of the
buffers. This function unrefs the buffers in the two lists.
The last_flow_return parameter indicates the expected flow return value from
pushing the final buffer in the list.
This can be used to set up a test which pushes some buffers and then an
invalid buffer, when the final buffer is expected to fail, for example.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element_name" transfer-ownership="none">
          <doc xml:space="preserve">name of the element that needs to be created</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
        <parameter name="buffer_in" transfer-ownership="full">
          <doc xml:space="preserve">a list of buffers that needs to be
 puched to the element</doc>
          <type name="GLib.List" c:type="GList*">
            <type name="Gst.Buffer"/>
          </type>
        </parameter>
        <parameter name="caps_in" transfer-ownership="none">
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="buffer_out" transfer-ownership="full">
          <doc xml:space="preserve">a list of buffers that we expect from
the element</doc>
          <type name="GLib.List" c:type="GList*">
            <type name="Gst.Buffer"/>
          </type>
        </parameter>
        <parameter name="caps_out" transfer-ownership="none">
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="last_flow_return" transfer-ownership="none">
          <doc xml:space="preserve">the last buffer push needs to give this GstFlowReturn</doc>
          <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_init" c:identifier="gst_check_init">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="argc" transfer-ownership="none">
          <type name="gint" c:type="int*"/>
        </parameter>
        <parameter name="argv" transfer-ownership="none">
          <type name="utf8" c:type="char**"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_message_error"
              c:identifier="gst_check_message_error">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="message" transfer-ownership="none">
          <type name="Gst.Message" c:type="GstMessage*"/>
        </parameter>
        <parameter name="type" transfer-ownership="none">
          <type name="Gst.MessageType" c:type="GstMessageType"/>
        </parameter>
        <parameter name="domain" transfer-ownership="none">
          <type name="GLib.Quark" c:type="GQuark"/>
        </parameter>
        <parameter name="code" transfer-ownership="none">
          <type name="gint" c:type="gint"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_run_suite"
              c:identifier="gst_check_run_suite"
              introspectable="0">
      <return-value transfer-ownership="none">
        <type name="gint" c:type="gint"/>
      </return-value>
      <parameters>
        <parameter name="suite" transfer-ownership="none">
          <type c:type="Suite*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
        <parameter name="fname" transfer-ownership="none">
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_element"
              c:identifier="gst_check_setup_element">
      <doc xml:space="preserve">setup an element for a filter test with mysrcpad and mysinkpad</doc>
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new element</doc>
        <type name="Gst.Element" c:type="GstElement*"/>
      </return-value>
      <parameters>
        <parameter name="factory" transfer-ownership="none">
          <doc xml:space="preserve">factory</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_events" c:identifier="gst_check_setup_events">
      <doc xml:space="preserve">Push stream-start, caps and segment event, which concist of the minimum
required events to allow streaming. Caps is optional to allow raw src
testing. If @element has more than one src or sink pad, use
gst_check_setup_events_with_stream_id() instead.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="srcpad" transfer-ownership="none">
          <doc xml:space="preserve">The src #GstPad to push on</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">The #GstElement use to create the stream id</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="caps" transfer-ownership="none" allow-none="1">
          <doc xml:space="preserve">#GstCaps in case caps event must be sent</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="format" transfer-ownership="none">
          <doc xml:space="preserve">The #GstFormat of the default segment to send</doc>
          <type name="Gst.Format" c:type="GstFormat"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_events_with_stream_id"
              c:identifier="gst_check_setup_events_with_stream_id">
      <doc xml:space="preserve">Push stream-start, caps and segment event, which concist of the minimum
required events to allow streaming. Caps is optional to allow raw src
testing.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="srcpad" transfer-ownership="none">
          <doc xml:space="preserve">The src #GstPad to push on</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">The #GstElement use to create the stream id</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="caps" transfer-ownership="none" allow-none="1">
          <doc xml:space="preserve">#GstCaps in case caps event must be sent</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="format" transfer-ownership="none">
          <doc xml:space="preserve">The #GstFormat of the default segment to send</doc>
          <type name="Gst.Format" c:type="GstFormat"/>
        </parameter>
        <parameter name="stream_id" transfer-ownership="none">
          <doc xml:space="preserve">A unique identifier for the stream</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_sink_pad"
              c:identifier="gst_check_setup_sink_pad">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_sink_pad_by_name"
              c:identifier="gst_check_setup_sink_pad_by_name">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <doc xml:space="preserve">name</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_src_pad"
              c:identifier="gst_check_setup_src_pad">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_src_pad_by_name"
              c:identifier="gst_check_setup_src_pad_by_name">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <doc xml:space="preserve">name</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_element"
              c:identifier="gst_check_teardown_element">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_pad_by_name"
              c:identifier="gst_check_teardown_pad_by_name">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_sink_pad"
              c:identifier="gst_check_teardown_sink_pad">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_src_pad"
              c:identifier="gst_check_teardown_src_pad">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_add_pad"
              c:identifier="gst_consistency_checker_add_pad">
      <doc xml:space="preserve">Sets up a data probe on the given pad which will raise assertions if the
data flow is inconsistent.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">%TRUE if the pad was added</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
      <parameters>
        <parameter name="consist" transfer-ownership="none">
          <doc xml:space="preserve">The #GstStreamConsistency handle</doc>
          <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">The #GstPad on which the dataflow will be checked.</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_free"
              c:identifier="gst_consistency_checker_free">
      <doc xml:space="preserve">Frees the allocated data and probes associated with @consist.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="consist" transfer-ownership="none">
          <doc xml:space="preserve">The #GstStreamConsistency to free.</doc>
          <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_new"
              c:identifier="gst_consistency_checker_new"
              introspectable="0">
      <doc xml:space="preserve">Sets up a data probe on the given pad which will raise assertions if the
data flow is inconsistent.</doc>
      <return-value>
        <doc xml:space="preserve">A #GstStreamConsistency structure used to track data flow.</doc>
        <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
      </return-value>
      <parameters>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">The #GstPad on which the dataflow will be checked.</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_reset"
              c:identifier="gst_consistency_checker_reset">
      <doc xml:space="preserve">Reset the stream checker's internal variables.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="consist" transfer-ownership="none">
          <doc xml:space="preserve">The #GstStreamConsistency to reset.</doc>
          <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
        </parameter>
      </parameters>
    </function>
  </namespace>
</repository>