aboutsummaryrefslogtreecommitdiff
path: root/docs/gst/html/GstObject.html
blob: 8c2f5c981e1647ee1c6ccc2d77d020950999411b (plain)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstObject</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GStreamer 0.11 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="gstreamer-GstMiniObject.html" title="GstMiniObject">
<link rel="next" href="GstPad.html" title="GstPad">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gstreamer-GstMiniObject.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GStreamer 0.11 Core Reference Manual</th>
<td><a accesskey="n" href="GstPad.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GstObject.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GstObject.description" class="shortcut">Description</a>
                   | 
                  <a href="#GstObject.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GstObject.derived-interfaces" class="shortcut">Known Derived Interfaces</a>
                   | 
                  <a href="#GstObject.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#GstObject.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="GstObject"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstObject.top_of_page"></a>GstObject</span></h2>
<p>GstObject — Base class for the GStreamer object hierarchy</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GstObject.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gst/gst.h&gt;

struct              <a class="link" href="GstObject.html#GstObject-struct" title="struct GstObject">GstObject</a>;
struct              <a class="link" href="GstObject.html#GstObjectClass" title="struct GstObjectClass">GstObjectClass</a>;
enum                <a class="link" href="GstObject.html#GstObjectFlags" title="enum GstObjectFlags">GstObjectFlags</a>;
#define             <a class="link" href="GstObject.html#GST-OBJECT-FLAGS:CAPS" title="GST_OBJECT_FLAGS()">GST_OBJECT_FLAGS</a>                    (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-FLAG-IS-SET:CAPS" title="GST_OBJECT_FLAG_IS_SET()">GST_OBJECT_FLAG_IS_SET</a>              (obj,
                                                         flag)
#define             <a class="link" href="GstObject.html#GST-OBJECT-FLAG-SET:CAPS" title="GST_OBJECT_FLAG_SET()">GST_OBJECT_FLAG_SET</a>                 (obj,
                                                         flag)
#define             <a class="link" href="GstObject.html#GST-OBJECT-FLAG-UNSET:CAPS" title="GST_OBJECT_FLAG_UNSET()">GST_OBJECT_FLAG_UNSET</a>               (obj,
                                                         flag)
#define             <a class="link" href="GstObject.html#GST-OBJECT-NAME:CAPS" title="GST_OBJECT_NAME()">GST_OBJECT_NAME</a>                     (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-PARENT:CAPS" title="GST_OBJECT_PARENT()">GST_OBJECT_PARENT</a>                   (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-REFCOUNT:CAPS" title="GST_OBJECT_REFCOUNT()">GST_OBJECT_REFCOUNT</a>                 (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-REFCOUNT-VALUE:CAPS" title="GST_OBJECT_REFCOUNT_VALUE()">GST_OBJECT_REFCOUNT_VALUE</a>           (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-LOCK:CAPS" title="GST_OBJECT_LOCK()">GST_OBJECT_LOCK</a>                     (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-TRYLOCK:CAPS" title="GST_OBJECT_TRYLOCK()">GST_OBJECT_TRYLOCK</a>                  (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-UNLOCK:CAPS" title="GST_OBJECT_UNLOCK()">GST_OBJECT_UNLOCK</a>                   (obj)
#define             <a class="link" href="GstObject.html#GST-OBJECT-GET-LOCK:CAPS" title="GST_OBJECT_GET_LOCK()">GST_OBJECT_GET_LOCK</a>                 (obj)
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstObject.html#gst-object-set-name" title="gst_object_set_name ()">gst_object_set_name</a>                 (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="GstObject.html#gst-object-get-name" title="gst_object_get_name ()">gst_object_get_name</a>                 (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstObject.html#gst-object-set-parent" title="gst_object_set_parent ()">gst_object_set_parent</a>               (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *parent</code></em>);
<a class="link" href="GstObject.html" title="GstObject"><span class="returnvalue">GstObject</span></a> *         <a class="link" href="GstObject.html#gst-object-get-parent" title="gst_object_get_parent ()">gst_object_get_parent</a>               (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GstObject.html#gst-object-unparent" title="gst_object_unparent ()">gst_object_unparent</a>                 (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GstObject.html#gst-object-default-deep-notify" title="gst_object_default_deep_notify ()">gst_object_default_deep_notify</a>      (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *orig</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **excluded_props</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GstObject.html#gst-object-default-error" title="gst_object_default_error ()">gst_object_default_error</a>            (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *source</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *debug</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstObject.html#gst-object-check-uniqueness" title="gst_object_check_uniqueness ()">gst_object_check_uniqueness</a>         (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *list</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstObject.html#gst-object-has-ancestor" title="gst_object_has_ancestor ()">gst_object_has_ancestor</a>             (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *ancestor</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="GstObject.html#gst-object-ref" title="gst_object_ref ()">gst_object_ref</a>                      (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()">gst_object_unref</a>                    (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            <a class="link" href="GstObject.html#gst-object-ref-sink" title="gst_object_ref_sink ()">gst_object_ref_sink</a>                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GstObject.html#gst-object-replace" title="gst_object_replace ()">gst_object_replace</a>                  (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> **oldobj</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *newobj</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="GstObject.html#gst-object-get-path-string" title="gst_object_get_path_string ()">gst_object_get_path_string</a>          (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GstObject.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
         +----GstObject
               +----<a class="link" href="GstPad.html" title="GstPad">GstPad</a>
               +----<a class="link" href="GstPadTemplate.html" title="GstPadTemplate">GstPadTemplate</a>
               +----<a class="link" href="GstPluginFeature.html" title="GstPluginFeature">GstPluginFeature</a>
               +----<a class="link" href="GstElement.html" title="GstElement">GstElement</a>
               +----<a class="link" href="GstBus.html" title="GstBus">GstBus</a>
               +----<a class="link" href="GstTask.html" title="GstTask">GstTask</a>
               +----<a class="link" href="GstTaskPool.html" title="GstTaskPool">GstTaskPool</a>
               +----<a class="link" href="GstClock.html" title="GstClock">GstClock</a>
               +----<a class="link" href="GstPlugin.html" title="GstPlugin">GstPlugin</a>
               +----<a class="link" href="GstRegistry.html" title="GstRegistry">GstRegistry</a>
               +----<a class="link" href="GstIndex.html" title="GstIndex">GstIndex</a>
</pre>
</div>
<div class="refsect1">
<a name="GstObject.derived-interfaces"></a><h2>Known Derived Interfaces</h2>
<p>
GstObject is required by
 <a class="link" href="GstChildProxy.html" title="GstChildProxy">GstChildProxy</a>.</p>
</div>
<div class="refsect1">
<a name="GstObject.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GstObject.html#GstObject--name" title='The "name" property'>name</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
  "<a class="link" href="GstObject.html#GstObject--parent" title='The "parent" property'>parent</a>"                   <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>*            : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="GstObject.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GstObject.html#GstObject-deep-notify" title='The "deep-notify" signal'>deep-notify</a>"                                    : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-NO-HOOKS:CAPS"><code class="literal">No Hooks</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GstObject.description"></a><h2>Description</h2>
<p>
<a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> provides a root for the object hierarchy tree filed in by the
GStreamer library.  It is currently a thin wrapper on top of
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. It is an abstract class that is not very usable on its own.
</p>
<p>
<a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> gives us basic refcounting, parenting functionality and locking.
Most of the function are just extended for special GStreamer needs and can be
found under the same name in the base class of <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> which is <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>
(e.g. <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> becomes <a class="link" href="GstObject.html#gst-object-ref" title="gst_object_ref ()"><code class="function">gst_object_ref()</code></a>).
</p>
<p>
The most interesting difference between <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> and <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> is the
"floating" reference count. A <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> is created with a reference count of
1, owned by the creator of the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>. (The owner of a reference is the
code section that has the right to call <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()"><code class="function">gst_object_unref()</code></a> in order to
remove that reference.) A <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> is created with a reference count of 1
also, but it isn't owned by anyone; Instead, the initial reference count
of a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> is "floating". The floating reference can be removed by
anyone at any time, by calling <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html#gst-object-sink"><code class="function">gst_object_sink()</code></a>.  <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html#gst-object-sink"><code class="function">gst_object_sink()</code></a> does
nothing if an object is already sunk (has no floating reference).
</p>
<p>
When you add a <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> to its parent container, the parent container will
do this:
</p>
<div class="informalexample"><pre class="programlisting">
  gst_object_ref (GST_OBJECT (child_element));
  gst_object_sink (GST_OBJECT (child_element));
</pre></div>
<p>
This means that the container now owns a reference to the child element
(since it called <a class="link" href="GstObject.html#gst-object-ref" title="gst_object_ref ()"><code class="function">gst_object_ref()</code></a>), and the child element has no floating
reference.
</p>
<p>
The purpose of the floating reference is to keep the child element alive
until you add it to a parent container, which then manages the lifetime of
the object itself:
</p>
<div class="informalexample"><pre class="programlisting">
   element = gst_element_factory_make (factoryname, name);
   // element has one floating reference to keep it alive
   gst_bin_add (GST_BIN (bin), element);
   // element has one non-floating reference owned by the container
</pre></div>
<p>
</p>
<p>
Another effect of this is, that calling <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()"><code class="function">gst_object_unref()</code></a> on a bin object,
will also destoy all the <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> objects in it. The same is true for
calling <a class="link" href="GstBin.html#gst-bin-remove" title="gst_bin_remove ()"><code class="function">gst_bin_remove()</code></a>.
</p>
<p>
Special care has to be taken for all methods that <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstObject.html#gst-object-sink"><code class="function">gst_object_sink()</code></a> an object
since if the caller of those functions had a floating reference to the object,
the object reference is now invalid.
</p>
<p>
In contrast to <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> instances, <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> adds a name property. The functions
<a class="link" href="GstObject.html#gst-object-set-name" title="gst_object_set_name ()"><code class="function">gst_object_set_name()</code></a> and <a class="link" href="GstObject.html#gst-object-get-name" title="gst_object_get_name ()"><code class="function">gst_object_get_name()</code></a> are used to set/get the name
of the object.
</p>
<p>
Last reviewed on 2005-11-09 (0.9.4)
</p>
</div>
<div class="refsect1">
<a name="GstObject.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GstObject-struct"></a><h3>struct GstObject</h3>
<pre class="programlisting">struct GstObject {
  GMutex        *lock;        /* object LOCK */
  gchar         *name;        /* object name */
  GstObject     *parent;      /* this object's parent, weak ref */
  guint32        flags;
};
</pre>
<p>
GStreamer base object class.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Threads.html#GMutex"><span class="type">GMutex</span></a> *<em class="structfield"><code><a name="GstObject-struct.lock"></a>lock</code></em>;</span></p></td>
<td>object LOCK</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstObject-struct.name"></a>name</code></em>;</span></p></td>
<td>The name of the object</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *<em class="structfield"><code><a name="GstObject-struct.parent"></a>parent</code></em>;</span></p></td>
<td>this object's parent, weak ref</td>
</tr>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint32"><span class="type">guint32</span></a> <em class="structfield"><code><a name="GstObject-struct.flags"></a>flags</code></em>;</span></p></td>
<td>flags for this object</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstObjectClass"></a><h3>struct GstObjectClass</h3>
<pre class="programlisting">struct GstObjectClass {
  GInitiallyUnownedClass parent_class;

  const gchar *path_string_separator;

  /* signals */
  void          (*deep_notify)      (GstObject * object, GstObject * orig, GParamSpec * pspec);

  /* virtual methods for subclasses */
};
</pre>
<p>
GStreamer base object class.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnownedClass"><span class="type">GInitiallyUnownedClass</span></a> <em class="structfield"><code><a name="GstObjectClass.parent-class"></a>parent_class</code></em>;</span></p></td>
<td>parent</td>
</tr>
<tr>
<td><p><span class="term">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GstObjectClass.path-string-separator"></a>path_string_separator</code></em>;</span></p></td>
<td>separator used by <a class="link" href="GstObject.html#gst-object-get-path-string" title="gst_object_get_path_string ()"><code class="function">gst_object_get_path_string()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="GstObjectClass.deep-notify"></a>deep_notify</code></em> ()</span></p></td>
<td>default signal handler</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GstObjectFlags"></a><h3>enum GstObjectFlags</h3>
<pre class="programlisting">typedef enum {
  /* padding */
  GST_OBJECT_FLAG_LAST = (1&lt;&lt;4)
} GstObjectFlags;
</pre>
<p>
The standard flags that an gstobject may have.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><a name="GST-OBJECT-FLAG-LAST:CAPS"></a><span class="term"><code class="literal">GST_OBJECT_FLAG_LAST</code></span></p></td>
<td>subclasses can add additional flags starting from this flag
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-FLAGS:CAPS"></a><h3>GST_OBJECT_FLAGS()</h3>
<pre class="programlisting">#define GST_OBJECT_FLAGS(obj)                  (GST_OBJECT_CAST (obj)-&gt;flags)
</pre>
<p>
This macro returns the entire set of flags for the object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-FLAG-IS-SET:CAPS"></a><h3>GST_OBJECT_FLAG_IS_SET()</h3>
<pre class="programlisting">#define GST_OBJECT_FLAG_IS_SET(obj,flag)       ((GST_OBJECT_FLAGS (obj) &amp; (flag)) == (flag))
</pre>
<p>
This macro checks to see if the given flag is set.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
<td>Flag to check for</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-FLAG-SET:CAPS"></a><h3>GST_OBJECT_FLAG_SET()</h3>
<pre class="programlisting">#define GST_OBJECT_FLAG_SET(obj,flag)          (GST_OBJECT_FLAGS (obj) |= (flag))
</pre>
<p>
This macro sets the given bits.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
<td>Flag to set</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-FLAG-UNSET:CAPS"></a><h3>GST_OBJECT_FLAG_UNSET()</h3>
<pre class="programlisting">#define GST_OBJECT_FLAG_UNSET(obj,flag)        (GST_OBJECT_FLAGS (obj) &amp;= ~(flag))
</pre>
<p>
This macro usets the given bits.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flag</code></em> :</span></p></td>
<td>Flag to set</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-NAME:CAPS"></a><h3>GST_OBJECT_NAME()</h3>
<pre class="programlisting">#define GST_OBJECT_NAME(obj)            (GST_OBJECT_CAST(obj)-&gt;name)
</pre>
<p>
Get the name of this object
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-PARENT:CAPS"></a><h3>GST_OBJECT_PARENT()</h3>
<pre class="programlisting">#define GST_OBJECT_PARENT(obj)          (GST_OBJECT_CAST(obj)-&gt;parent)
</pre>
<p>
Get the parent of this object
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-REFCOUNT:CAPS"></a><h3>GST_OBJECT_REFCOUNT()</h3>
<pre class="programlisting">#define GST_OBJECT_REFCOUNT(obj)                (((GObject*)(obj))-&gt;ref_count)
</pre>
<p>
Get access to the reference count field of the object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-REFCOUNT-VALUE:CAPS"></a><h3>GST_OBJECT_REFCOUNT_VALUE()</h3>
<pre class="programlisting">#define GST_OBJECT_REFCOUNT_VALUE(obj)          g_atomic_int_get ((gint *) &amp;GST_OBJECT_REFCOUNT(obj))
</pre>
<p>
Get the reference count value of the object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-LOCK:CAPS"></a><h3>GST_OBJECT_LOCK()</h3>
<pre class="programlisting">#define GST_OBJECT_LOCK(obj)                   g_mutex_lock(GST_OBJECT_GET_LOCK(obj))
</pre>
<p>
This macro will obtain a lock on the object, making serialization possible.
It blocks until the lock can be obtained.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to lock</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-TRYLOCK:CAPS"></a><h3>GST_OBJECT_TRYLOCK()</h3>
<pre class="programlisting">#define GST_OBJECT_TRYLOCK(obj)                g_mutex_trylock(GST_OBJECT_GET_LOCK(obj))
</pre>
<p>
This macro will try to obtain a lock on the object, but will return with
FALSE if it can't get it immediately.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-UNLOCK:CAPS"></a><h3>GST_OBJECT_UNLOCK()</h3>
<pre class="programlisting">#define GST_OBJECT_UNLOCK(obj)                 g_mutex_unlock(GST_OBJECT_GET_LOCK(obj))
</pre>
<p>
This macro releases a lock on the object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to unlock.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GST-OBJECT-GET-LOCK:CAPS"></a><h3>GST_OBJECT_GET_LOCK()</h3>
<pre class="programlisting">#define GST_OBJECT_GET_LOCK(obj)               (GST_OBJECT_CAST(obj)-&gt;lock)
</pre>
<p>
Acquire a reference to the mutex of this object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-set-name"></a><h3>gst_object_set_name ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_object_set_name                 (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Sets the name of <em class="parameter"><code>object</code></em>, or gives <em class="parameter"><code>object</code></em> a guaranteed unique
name (if <em class="parameter"><code>name</code></em> is NULL).
This function makes a copy of the provided name, so the caller
retains ownership of the name it sent.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>new name of object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if the name could be set. Since Objects that have
a parent cannot be renamed, this function returns FALSE in those
cases.
MT safe.  This function grabs and releases <em class="parameter"><code>object</code></em>'s LOCK.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-get-name"></a><h3>gst_object_get_name ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             gst_object_get_name                 (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);</pre>
<p>
Returns a copy of the name of <em class="parameter"><code>object</code></em>.
Caller should <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> the return value after usage.
For a nameless object, this returns NULL, which you can safely <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>
as well.
</p>
<p>
Free-function: g_free
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the name of <em class="parameter"><code>object</code></em>. <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after usage.
MT safe. This function grabs and releases <em class="parameter"><code>object</code></em>'s LOCK. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-set-parent"></a><h3>gst_object_set_parent ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_object_set_parent               (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *parent</code></em>);</pre>
<p>
Sets the parent of <em class="parameter"><code>object</code></em> to <em class="parameter"><code>parent</code></em>. The object's reference count will
be incremented, and any floating reference will be removed (see <a class="link" href="GstObject.html#gst-object-ref-sink" title="gst_object_ref_sink ()"><code class="function">gst_object_ref_sink()</code></a>).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td>new parent of object</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if <em class="parameter"><code>parent</code></em> could be set or FALSE when <em class="parameter"><code>object</code></em>
already had a parent or <em class="parameter"><code>object</code></em> and <em class="parameter"><code>parent</code></em> are the same.
MT safe. Grabs and releases <em class="parameter"><code>object</code></em>'s LOCK.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-get-parent"></a><h3>gst_object_get_parent ()</h3>
<pre class="programlisting"><a class="link" href="GstObject.html" title="GstObject"><span class="returnvalue">GstObject</span></a> *         gst_object_get_parent               (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);</pre>
<p>
Returns the parent of <em class="parameter"><code>object</code></em>. This function increases the refcount
of the parent object so you should <a class="link" href="GstObject.html#gst-object-unref" title="gst_object_unref ()"><code class="function">gst_object_unref()</code></a> it after usage.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>parent of <em class="parameter"><code>object</code></em>, this can be NULL if <em class="parameter"><code>object</code></em>
has no parent. unref after usage.
MT safe. Grabs and releases <em class="parameter"><code>object</code></em>'s LOCK. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-unparent"></a><h3>gst_object_unparent ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gst_object_unparent                 (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);</pre>
<p>
Clear the parent of <em class="parameter"><code>object</code></em>, removing the associated reference.
This function decreases the refcount of <em class="parameter"><code>object</code></em>.
</p>
<p>
MT safe. Grabs and releases <em class="parameter"><code>object</code></em>'s lock.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to unparent</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-default-deep-notify"></a><h3>gst_object_default_deep_notify ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gst_object_default_deep_notify      (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *orig</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> *pspec</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **excluded_props</code></em>);</pre>
<p>
A default deep_notify signal callback for an object. The user data
should contain a pointer to an array of strings that should be excluded
from the notify. The default handler will print the new value of the property
using g_print.
</p>
<p>
MT safe. This function grabs and releases <em class="parameter"><code>object</code></em>'s LOCK for getting its
         path string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> that signalled the notify.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>orig</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> that initiated the notify.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td>a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> of the property.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>excluded_props</code></em> :</span></p></td>
<td>(array zero-terminated=1) (element-type gchar*)
(allow-none):a set of user-specified properties to exclude or
NULL to show all changes.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-default-error"></a><h3>gst_object_default_error ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gst_object_default_error            (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *source</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *debug</code></em>);</pre>
<p>
A default error function that uses <a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-printerr"><code class="function">g_printerr()</code></a> to display the error message
and the optional debug sting..
</p>
<p>
The default handler will simply print the error string using g_print.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>the <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> that initiated the error.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>the GError. <span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>debug</code></em> :</span></p></td>
<td>an additional debug information string, or NULL. <span class="annotation">[<acronym title="Parameter for input. Default is transfer none."><span class="acronym">in</span></acronym>][<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-check-uniqueness"></a><h3>gst_object_check_uniqueness ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_object_check_uniqueness         (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *list</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Checks to see if there is any object named <em class="parameter"><code>name</code></em> in <em class="parameter"><code>list</code></em>. This function
does not do any locking of any kind. You might want to protect the
provided list with the lock of the owner of the list. This function
will lock each <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> in the list to compare the name, so be
carefull when passing a list with a locked object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>a list of <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to
check through. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gst.Object]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name to search for</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> named <em class="parameter"><code>name</code></em> does not appear in <em class="parameter"><code>list</code></em>,
FALSE if it does.
MT safe. Grabs and releases the LOCK of each object in the list.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-has-ancestor"></a><h3>gst_object_has_ancestor ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_object_has_ancestor             (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *ancestor</code></em>);</pre>
<p>
Check if <em class="parameter"><code>object</code></em> has an ancestor <em class="parameter"><code>ancestor</code></em> somewhere up in
the hierarchy. One can e.g. check if a <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> is inside a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to check</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ancestor</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to check as ancestor</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if <em class="parameter"><code>ancestor</code></em> is an ancestor of <em class="parameter"><code>object</code></em>.
MT safe. Grabs and releases <em class="parameter"><code>object</code></em>'s locks.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-ref"></a><h3>gst_object_ref ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            gst_object_ref                      (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>
Increments the reference count on <em class="parameter"><code>object</code></em>. This function
does not take the lock on <em class="parameter"><code>object</code></em> because it relies on
atomic refcounting.
</p>
<p>
This object returns the input parameter to ease writing
constructs like :
 result = gst_object_ref (object-&gt;parent);
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to reference</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A pointer to <em class="parameter"><code>object</code></em>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-unref"></a><h3>gst_object_unref ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gst_object_unref                    (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>
Decrements the reference count on <em class="parameter"><code>object</code></em>.  If reference count hits
zero, destroy <em class="parameter"><code>object</code></em>. This function does not take the lock
on <em class="parameter"><code>object</code></em> as it relies on atomic refcounting.
</p>
<p>
The unref method should never be called with the LOCK held since
this might deadlock the dispose function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to unreference</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-ref-sink"></a><h3>gst_object_ref_sink ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>            gst_object_ref_sink                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>
Increase the reference count of <em class="parameter"><code>object</code></em>, and possibly remove the floating
reference, if <em class="parameter"><code>object</code></em> has a floating reference.
</p>
<p>
In other words, if the object is floating, then this call "assumes ownership"
of the floating reference, converting it to a normal reference by clearing
the floating flag while leaving the reference count unchanged. If the object
is not floating, then this call adds a new normal reference increasing the
reference count by one.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to sink</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-replace"></a><h3>gst_object_replace ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gst_object_replace                  (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> **oldobj</code></em>,
                                                         <em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *newobj</code></em>);</pre>
<p>
Atomically modifies a pointer to point to a new object.
The reference count of <em class="parameter"><code>oldobj</code></em> is decreased and the reference count of
<em class="parameter"><code>newobj</code></em> is increased.
</p>
<p>
Either <em class="parameter"><code>newobj</code></em> and the value pointed to by <em class="parameter"><code>oldobj</code></em> may be NULL.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>oldobj</code></em> :</span></p></td>
<td>pointer to a place of a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> to
replace. <span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>newobj</code></em> :</span></p></td>
<td>a new <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if <em class="parameter"><code>newobj</code></em> was different from <em class="parameter"><code>oldobj</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gst-object-get-path-string"></a><h3>gst_object_get_path_string ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *             gst_object_get_path_string          (<em class="parameter"><code><a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a> *object</code></em>);</pre>
<p>
Generates a string describing the path of <em class="parameter"><code>object</code></em> in
the object hierarchy. Only useful (or used) for debugging.
</p>
<p>
Free-function: g_free
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a string describing the path of <em class="parameter"><code>object</code></em>. You must
<a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> the string after usage.
MT safe. Grabs and releases the <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>'s LOCK for all objects
in the hierarchy. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="GstObject.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstObject--name"></a><h3>The <code class="literal">"name"</code> property</h3>
<pre class="programlisting">  "name"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
<p>The name of the object.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2">
<a name="GstObject--parent"></a><h3>The <code class="literal">"parent"</code> property</h3>
<pre class="programlisting">  "parent"                   <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>*            : Read / Write</pre>
<p>The parent of the object.</p>
</div>
</div>
<div class="refsect1">
<a name="GstObject.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GstObject-deep-notify"></a><h3>The <code class="literal">"deep-notify"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>  *gstobject,
                                                        <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>  *prop_object,
                                                        <a href="http://library.gnome.org/devel/gobject/unstable/gobject-GParamSpec.html#GParamSpec"><span class="type">GParamSpec</span></a> *prop,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)        : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-NO-HOOKS:CAPS"><code class="literal">No Hooks</code></a></pre>
<p>
The deep notify signal is used to be notified of property changes. It is
typically attached to the toplevel bin to receive notifications from all
the elements contained in that bin.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gstobject</code></em> :</span></p></td>
<td>a <a class="link" href="GstObject.html" title="GstObject"><span class="type">GstObject</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prop_object</code></em> :</span></p></td>
<td>the object that originated the signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prop</code></em> :</span></p></td>
<td>the property that changed</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>