This file is indexed.

/usr/share/doc/gstreamer1.0-doc/gstreamer-1.0/GstBus.html is in gstreamer1.0-doc 1.10.4-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
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstBus: GStreamer 1.0 Core Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="GStreamer 1.0 Core Reference Manual">
<link rel="up" href="libgstreamer.html" title="GStreamer Core Library">
<link rel="prev" href="GstBufferPool.html" title="GstBufferPool">
<link rel="next" href="GstCaps.html" title="GstCaps">
<meta name="generator" content="GTK-Doc V1.25 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GstBus.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GstBus.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GstBus.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GstBus.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GstBufferPool.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstCaps.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GstBus"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GstBus.top_of_page"></a>GstBus</span></h2>
<p>GstBus — Asynchronous message bus subsystem</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GstBus.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GstBus.html#GstBusFunc" title="GstBusFunc ()">*GstBusFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBus.html#GstBusSyncReply" title="enum GstBusSyncReply"><span class="returnvalue">GstBusSyncReply</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GstBus.html#GstBusSyncHandler" title="GstBusSyncHandler ()">*GstBusSyncHandler</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBus.html" title="GstBus"><span class="returnvalue">GstBus</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-new" title="gst_bus_new ()">gst_bus_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-post" title="gst_bus_post ()">gst_bus_post</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-have-pending" title="gst_bus_have_pending ()">gst_bus_have_pending</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-peek" title="gst_bus_peek ()">gst_bus_peek</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-pop" title="gst_bus_pop ()">gst_bus_pop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-pop-filtered" title="gst_bus_pop_filtered ()">gst_bus_pop_filtered</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-timed-pop" title="gst_bus_timed_pop ()">gst_bus_timed_pop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-timed-pop-filtered" title="gst_bus_timed_pop_filtered ()">gst_bus_timed_pop_filtered</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-set-flushing" title="gst_bus_set_flushing ()">gst_bus_set_flushing</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-set-sync-handler" title="gst_bus_set_sync_handler ()">gst_bus_set_sync_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstBus.html#GstBusSyncReply" title="enum GstBusSyncReply"><span class="returnvalue">GstBusSyncReply</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-sync-signal-handler" title="gst_bus_sync_signal_handler ()">gst_bus_sync_signal_handler</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-create-watch" title="gst_bus_create_watch ()">gst_bus_create_watch</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-add-watch-full" title="gst_bus_add_watch_full ()">gst_bus_add_watch_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-add-watch" title="gst_bus_add_watch ()">gst_bus_add_watch</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-remove-watch" title="gst_bus_remove_watch ()">gst_bus_remove_watch</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-disable-sync-message-emission" title="gst_bus_disable_sync_message_emission ()">gst_bus_disable_sync_message_emission</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-enable-sync-message-emission" title="gst_bus_enable_sync_message_emission ()">gst_bus_enable_sync_message_emission</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-async-signal-func" title="gst_bus_async_signal_func ()">gst_bus_async_signal_func</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-add-signal-watch" title="gst_bus_add_signal_watch ()">gst_bus_add_signal_watch</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-add-signal-watch-full" title="gst_bus_add_signal_watch_full ()">gst_bus_add_signal_watch_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-remove-signal-watch" title="gst_bus_remove_signal_watch ()">gst_bus_remove_signal_watch</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="GstBus.html#gst-bus-poll" title="gst_bus_poll ()">gst_bus_poll</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstBus.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GstBus.html#GstBus--enable-async" title="The “enable-async” property">enable-async</a></td>
<td class="property_flags">Write / Construct Only</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstBus.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GstBus.html#GstBus-message" title="The “message” signal">message</a></td>
<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-DETAILED:CAPS">Has Details</a></td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GstBus.html#GstBus-sync-message" title="The “sync-message” signal">sync-message</a></td>
<td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-DETAILED:CAPS">Has Details</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstBus.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GstBus.html#GstBus-struct" title="struct GstBus">GstBus</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GstBus.html#GstBusFlags" title="enum GstBusFlags">GstBusFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GstBus.html#GstBusSyncReply" title="enum GstBusSyncReply">GstBusSyncReply</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GstBus.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
    <span class="lineart">╰──</span> <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
        <span class="lineart">╰──</span> <a class="link" href="GstObject.html" title="GstObject">GstObject</a>
            <span class="lineart">╰──</span> GstBus
</pre>
</div>
<div class="refsect1">
<a name="GstBus.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/gst.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GstBus.description"></a><h2>Description</h2>
<p>The <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> is an object responsible for delivering <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> packets in
a first-in first-out way from the streaming threads (see <a class="link" href="GstTask.html" title="GstTask"><span class="type">GstTask</span></a>) to the
application.</p>
<p>Since the application typically only wants to deal with delivery of these
messages from one thread, the GstBus will marshall the messages between
different threads. This is important since the actual streaming of media
is done in another thread than the application.</p>
<p>The GstBus provides support for <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> based notifications. This makes it
possible to handle the delivery in the glib mainloop.</p>
<p>The <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> callback function <a class="link" href="GstBus.html#gst-bus-async-signal-func" title="gst_bus_async_signal_func ()"><code class="function">gst_bus_async_signal_func()</code></a> can be used to
convert all bus messages into signal emissions.</p>
<p>A message is posted on the bus with the <a class="link" href="GstBus.html#gst-bus-post" title="gst_bus_post ()"><code class="function">gst_bus_post()</code></a> method. With the
<a class="link" href="GstBus.html#gst-bus-peek" title="gst_bus_peek ()"><code class="function">gst_bus_peek()</code></a> and <a class="link" href="GstBus.html#gst-bus-pop" title="gst_bus_pop ()"><code class="function">gst_bus_pop()</code></a> methods one can look at or retrieve a
previously posted message.</p>
<p>The bus can be polled with the <a class="link" href="GstBus.html#gst-bus-poll" title="gst_bus_poll ()"><code class="function">gst_bus_poll()</code></a> method. This methods blocks
up to the specified timeout value until one of the specified messages types
is posted on the bus. The application can then <a class="link" href="GstBus.html#gst-bus-pop" title="gst_bus_pop ()"><code class="function">gst_bus_pop()</code></a> the messages
from the bus to handle them.
Alternatively the application can register an asynchronous bus function
using <a class="link" href="GstBus.html#gst-bus-add-watch-full" title="gst_bus_add_watch_full ()"><code class="function">gst_bus_add_watch_full()</code></a> or <a class="link" href="GstBus.html#gst-bus-add-watch" title="gst_bus_add_watch ()"><code class="function">gst_bus_add_watch()</code></a>. This function will
install a <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> in the default glib main loop and will deliver messages
a short while after they have been posted. Note that the main loop should
be running for the asynchronous callbacks.</p>
<p>It is also possible to get messages from the bus without any thread
marshalling with the <a class="link" href="GstBus.html#gst-bus-set-sync-handler" title="gst_bus_set_sync_handler ()"><code class="function">gst_bus_set_sync_handler()</code></a> method. This makes it
possible to react to a message in the same thread that posted the
message on the bus. This should only be used if the application is able
to deal with messages from different threads.</p>
<p>Every <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> has one bus.</p>
<p>Note that a <a class="link" href="GstPipeline.html" title="GstPipeline"><span class="type">GstPipeline</span></a> will set its bus into flushing state when changing
from READY to NULL state.</p>
</div>
<div class="refsect1">
<a name="GstBus.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GstBusFunc"></a><h3>GstBusFunc ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GstBusFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
               <em class="parameter"><code><a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> *message</code></em>,
               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Specifies the type of function passed to <a class="link" href="GstBus.html#gst-bus-add-watch" title="gst_bus_add_watch ()"><code class="function">gst_bus_add_watch()</code></a> or
<a class="link" href="GstBus.html#gst-bus-add-watch-full" title="gst_bus_add_watch_full ()"><code class="function">gst_bus_add_watch_full()</code></a>, which is called from the mainloop when a message
is available on the bus.</p>
<p>The message passed to the function will be unreffed after execution of this
function so it should not be freed in the function.</p>
<p>Note that this function is used as a GSourceFunc which means that returning
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will remove the GSource from the mainloop.</p>
<div class="refsect3">
<a name="GstBusFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> that sent the message</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data that has been given, when registering the handler</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GstBusFunc.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the event source should be removed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstBusSyncHandler"></a><h3>GstBusSyncHandler ()</h3>
<pre class="programlisting"><a class="link" href="GstBus.html#GstBusSyncReply" title="enum GstBusSyncReply"><span class="returnvalue">GstBusSyncReply</span></a>
<span class="c_punctuation">(</span>*GstBusSyncHandler<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                      <em class="parameter"><code><a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> *message</code></em>,
                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Handler will be invoked synchronously, when a new message has been injected
into the bus. This function is mostly used internally. Only one sync handler
can be attached to a given bus.</p>
<p>If the handler returns GST_BUS_DROP, it should unref the message, else the
message should not be unreffed by the sync handler.</p>
<div class="refsect3">
<a name="GstBusSyncHandler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> that sent the message</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data that has been given, when registering the handler</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GstBusSyncHandler.returns"></a><h4>Returns</h4>
<p> <a class="link" href="GstBus.html#GstBusSyncReply" title="enum GstBusSyncReply"><span class="type">GstBusSyncReply</span></a> stating what to do with the message</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-new"></a><h3>gst_bus_new ()</h3>
<pre class="programlisting"><a class="link" href="GstBus.html" title="GstBus"><span class="returnvalue">GstBus</span></a> *
gst_bus_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> instance.</p>
<div class="refsect3">
<a name="gst-bus-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> instance. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-post"></a><h3>gst_bus_post ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_bus_post (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
              <em class="parameter"><code><a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> *message</code></em>);</pre>
<p>Post a message on the given bus. Ownership of the message
is taken by the bus.</p>
<div class="refsect3">
<a name="gst-bus-post.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to post on</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p> the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> to post. </p></td>
<td class="parameter_annotations"><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 class="refsect3">
<a name="gst-bus-post.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message could be posted, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the bus is flushing.</p>
<p>MT safe.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-have-pending"></a><h3>gst_bus_have_pending ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_bus_have_pending (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Check if there are pending messages on the bus that
should be handled.</p>
<div class="refsect3">
<a name="gst-bus-have-pending.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to check</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-have-pending.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there are messages on the bus to be handled, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
otherwise.</p>
<p>MT safe.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-peek"></a><h3>gst_bus_peek ()</h3>
<pre class="programlisting"><a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
gst_bus_peek (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Peek the message on the top of the bus' queue. The message will remain
on the bus' message queue. A reference is returned, and needs to be unreffed
by the caller.</p>
<div class="refsect3">
<a name="gst-bus-peek.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-peek.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> that is on the
bus, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the bus is empty.</p>
<p>MT safe. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-pop"></a><h3>gst_bus_pop ()</h3>
<pre class="programlisting"><a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
gst_bus_pop (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Get a message from the bus.</p>
<div class="refsect3">
<a name="gst-bus-pop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to pop</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-pop.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> that is on the
bus, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the bus is empty. The message is taken from
the bus and needs to be unreffed with <a class="link" href="GstMessage.html#gst-message-unref" title="gst_message_unref ()"><code class="function">gst_message_unref()</code></a> after
usage.</p>
<p>MT safe. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-pop-filtered"></a><h3>gst_bus_pop_filtered ()</h3>
<pre class="programlisting"><a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
gst_bus_pop_filtered (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                      <em class="parameter"><code><a class="link" href="GstMessage.html#GstMessageType" title="enum GstMessageType"><span class="type">GstMessageType</span></a> types</code></em>);</pre>
<p>Get a message matching <em class="parameter"><code>type</code></em>
 from the bus.  Will discard all messages on
the bus that do not match <em class="parameter"><code>type</code></em>
 and that have been posted before the first
message that does match <em class="parameter"><code>type</code></em>
.  If there is no message matching <em class="parameter"><code>type</code></em>
 on
the bus, all messages will be discarded. It is not possible to use message
enums beyond <a class="link" href="GstMessage.html#GST-MESSAGE-EXTENDED:CAPS"><span class="type">GST_MESSAGE_EXTENDED</span></a> in the <em class="parameter"><code>events</code></em>
 mask.</p>
<div class="refsect3">
<a name="gst-bus-pop-filtered.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to pop</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>types</p></td>
<td class="parameter_description"><p>message types to take into account</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-pop-filtered.returns"></a><h4>Returns</h4>
<p> the next <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> matching
<em class="parameter"><code>type</code></em>
that is on the bus, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the bus is empty or there
is no message matching <em class="parameter"><code>type</code></em>
. The message is taken from the bus
and needs to be unreffed with <a class="link" href="GstMessage.html#gst-message-unref" title="gst_message_unref ()"><code class="function">gst_message_unref()</code></a> after usage.</p>
<p>MT safe. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-timed-pop"></a><h3>gst_bus_timed_pop ()</h3>
<pre class="programlisting"><a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
gst_bus_timed_pop (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                   <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> timeout</code></em>);</pre>
<p>Get a message from the bus, waiting up to the specified timeout.</p>
<p>If <em class="parameter"><code>timeout</code></em>
 is 0, this function behaves like <a class="link" href="GstBus.html#gst-bus-pop" title="gst_bus_pop ()"><code class="function">gst_bus_pop()</code></a>. If <em class="parameter"><code>timeout</code></em>
 is
<a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a>, this function will block forever until a message was
posted on the bus.</p>
<div class="refsect3">
<a name="gst-bus-timed-pop.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to pop</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout</p></td>
<td class="parameter_description"><p>a timeout</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-timed-pop.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> that is on the
bus after the specified timeout or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the bus is empty
after the timeout expired.  The message is taken from the bus
and needs to be unreffed with <a class="link" href="GstMessage.html#gst-message-unref" title="gst_message_unref ()"><code class="function">gst_message_unref()</code></a> after usage.</p>
<p>MT safe. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-timed-pop-filtered"></a><h3>gst_bus_timed_pop_filtered ()</h3>
<pre class="programlisting"><a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
gst_bus_timed_pop_filtered (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                            <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> timeout</code></em>,
                            <em class="parameter"><code><a class="link" href="GstMessage.html#GstMessageType" title="enum GstMessageType"><span class="type">GstMessageType</span></a> types</code></em>);</pre>
<p>Get a message from the bus whose type matches the message type mask <em class="parameter"><code>types</code></em>
,
waiting up to the specified timeout (and discarding any messages that do not
match the mask provided).</p>
<p>If <em class="parameter"><code>timeout</code></em>
 is 0, this function behaves like <a class="link" href="GstBus.html#gst-bus-pop-filtered" title="gst_bus_pop_filtered ()"><code class="function">gst_bus_pop_filtered()</code></a>. If
<em class="parameter"><code>timeout</code></em>
 is <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a>, this function will block forever until a
matching message was posted on the bus.</p>
<div class="refsect3">
<a name="gst-bus-timed-pop-filtered.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to pop from</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout</p></td>
<td class="parameter_description"><p>a timeout in nanoseconds, or GST_CLOCK_TIME_NONE to wait forever</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>types</p></td>
<td class="parameter_description"><p>message types to take into account, GST_MESSAGE_ANY for any type</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-timed-pop-filtered.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> matching the
filter in <em class="parameter"><code>types</code></em>
, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no matching message was found on
the bus until the timeout expired. The message is taken from
the bus and needs to be unreffed with <a class="link" href="GstMessage.html#gst-message-unref" title="gst_message_unref ()"><code class="function">gst_message_unref()</code></a> after
usage.</p>
<p>MT safe. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-set-flushing"></a><h3>gst_bus_set_flushing ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_bus_set_flushing (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                      <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> flushing</code></em>);</pre>
<p>If <em class="parameter"><code>flushing</code></em>
, flush out and unref any messages queued in the bus. Releases
references to the message origin objects. Will flush future messages until
<a class="link" href="GstBus.html#gst-bus-set-flushing" title="gst_bus_set_flushing ()"><code class="function">gst_bus_set_flushing()</code></a> sets <em class="parameter"><code>flushing</code></em>
 to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-bus-set-flushing.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flushing</p></td>
<td class="parameter_description"><p>whether or not to flush the bus</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-set-sync-handler"></a><h3>gst_bus_set_sync_handler ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_bus_set_sync_handler (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                          <em class="parameter"><code><a class="link" href="GstBus.html#GstBusSyncHandler" title="GstBusSyncHandler ()"><span class="type">GstBusSyncHandler</span></a> func</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                          <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
<p>Sets the synchronous handler on the bus. The function will be called
every time a new message is posted on the bus. Note that the function
will be called in the same thread context as the posting object. This
function is usually only called by the creator of the bus. Applications
should handle messages asynchronously using the gst_bus watch and poll
functions.</p>
<p>You cannot replace an existing sync_handler. You can pass <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to this
function, which will clear the existing handler.</p>
<div class="refsect3">
<a name="gst-bus-set-sync-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to install the handler on</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p> The handler function to install. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>User data that will be sent to the handler function.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>notify</p></td>
<td class="parameter_description"><p>called when <em class="parameter"><code>user_data</code></em>
becomes unused</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-sync-signal-handler"></a><h3>gst_bus_sync_signal_handler ()</h3>
<pre class="programlisting"><a class="link" href="GstBus.html#GstBusSyncReply" title="enum GstBusSyncReply"><span class="returnvalue">GstBusSyncReply</span></a>
gst_bus_sync_signal_handler (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                             <em class="parameter"><code><a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> *message</code></em>,
                             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>A helper GstBusSyncHandler that can be used to convert all synchronous
messages into signals.</p>
<div class="refsect3">
<a name="gst-bus-sync-signal-handler.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> received</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>user data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-sync-signal-handler.returns"></a><h4>Returns</h4>
<p> GST_BUS_PASS</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-create-watch"></a><h3>gst_bus_create_watch ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *
gst_bus_create_watch (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Create watch for this bus. The GSource will be dispatched whenever
a message is on the bus. After the GSource is dispatched, the
message is popped off the bus and unreffed.</p>
<div class="refsect3">
<a name="gst-bus-create-watch.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to create the watch for</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-create-watch.returns"></a><h4>Returns</h4>
<p> a <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> that can be added to a mainloop. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-add-watch-full"></a><h3>gst_bus_add_watch_full ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gst_bus_add_watch_full (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> priority</code></em>,
                        <em class="parameter"><code><a class="link" href="GstBus.html#GstBusFunc" title="GstBusFunc ()"><span class="type">GstBusFunc</span></a> func</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> notify</code></em>);</pre>
<p>Adds a bus watch to the default main context with the given <em class="parameter"><code>priority</code></em>
 (e.g.
<a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"><code class="literal">G_PRIORITY_DEFAULT</code></a>). It is also possible to use a non-default  main
context set up using <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default"><code class="function">g_main_context_push_thread_default()</code></a> (before
one had to create a bus watch source and attach it to the desired main
context 'manually').</p>
<p>This function is used to receive asynchronous messages in the main loop.
There can only be a single bus watch per bus, you must remove it before you
can set a new one.</p>
<p>The bus watch will only work if a GLib main loop is being run.</p>
<p>When <em class="parameter"><code>func</code></em>
 is called, the message belongs to the caller; if you want to
keep a copy of it, call <a class="link" href="GstMessage.html#gst-message-ref" title="gst_message_ref ()"><code class="function">gst_message_ref()</code></a> before leaving <em class="parameter"><code>func</code></em>
.</p>
<p>The watch can be removed using <a class="link" href="GstBus.html#gst-bus-remove-watch" title="gst_bus_remove_watch ()"><code class="function">gst_bus_remove_watch()</code></a> or by returning <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
from <em class="parameter"><code>func</code></em>
. If the watch was added to the default main context it is also
possible to remove the watch using <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-source-remove"><code class="function">g_source_remove()</code></a>.</p>
<p>MT safe.</p>
<p><span class="annotation">[<acronym title="Rename the original symbol's name to SYMBOL."><span class="acronym">rename-to</span></acronym> gst_bus_add_watch]</span></p>
<div class="refsect3">
<a name="gst-bus-add-watch-full.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to create the watch for.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>priority</p></td>
<td class="parameter_description"><p>The priority of the watch.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>A function to call when a message is received.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data passed to <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>notify</p></td>
<td class="parameter_description"><p>the function to call when the source is removed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-add-watch-full.returns"></a><h4>Returns</h4>
<p> The event source id or 0 if <em class="parameter"><code>bus</code></em>
already got an event source.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-add-watch"></a><h3>gst_bus_add_watch ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gst_bus_add_watch (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                   <em class="parameter"><code><a class="link" href="GstBus.html#GstBusFunc" title="GstBusFunc ()"><span class="type">GstBusFunc</span></a> func</code></em>,
                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Adds a bus watch to the default main context with the default priority
(<a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"><code class="literal">G_PRIORITY_DEFAULT</code></a>). It is also possible to use a non-default main
context set up using <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default"><code class="function">g_main_context_push_thread_default()</code></a> (before
one had to create a bus watch source and attach it to the desired main
context 'manually').</p>
<p>This function is used to receive asynchronous messages in the main loop.
There can only be a single bus watch per bus, you must remove it before you
can set a new one.</p>
<p>The bus watch will only work if a GLib main loop is being run.</p>
<p>The watch can be removed using <a class="link" href="GstBus.html#gst-bus-remove-watch" title="gst_bus_remove_watch ()"><code class="function">gst_bus_remove_watch()</code></a> or by returning <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>
from <em class="parameter"><code>func</code></em>
. If the watch was added to the default main context it is also
possible to remove the watch using <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-source-remove"><code class="function">g_source_remove()</code></a>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="gst-bus-add-watch.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to create the watch for</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>A function to call when a message is received.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data passed to <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-add-watch.returns"></a><h4>Returns</h4>
<p> The event source id or 0 if <em class="parameter"><code>bus</code></em>
already got an event source.</p>
<p>MT safe.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-remove-watch"></a><h3>gst_bus_remove_watch ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_bus_remove_watch (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Removes an installed bus watch from <em class="parameter"><code>bus</code></em>
.</p>
<div class="refsect3">
<a name="gst-bus-remove-watch.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> to remove the watch from.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-remove-watch.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if <em class="parameter"><code>bus</code></em>
has no event source.</p>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-disable-sync-message-emission"></a><h3>gst_bus_disable_sync_message_emission ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_bus_disable_sync_message_emission (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Instructs GStreamer to stop emitting the "sync-message" signal for this bus.
See <a class="link" href="GstBus.html#gst-bus-enable-sync-message-emission" title="gst_bus_enable_sync_message_emission ()"><code class="function">gst_bus_enable_sync_message_emission()</code></a> for more information.</p>
<p>In the event that multiple pieces of code have called
<a class="link" href="GstBus.html#gst-bus-enable-sync-message-emission" title="gst_bus_enable_sync_message_emission ()"><code class="function">gst_bus_enable_sync_message_emission()</code></a>, the sync-message emissions will only
be stopped after all calls to <a class="link" href="GstBus.html#gst-bus-enable-sync-message-emission" title="gst_bus_enable_sync_message_emission ()"><code class="function">gst_bus_enable_sync_message_emission()</code></a> were
"cancelled" by calling this function. In this way the semantics are exactly
the same as <a class="link" href="GstObject.html#gst-object-ref" title="gst_object_ref ()"><code class="function">gst_object_ref()</code></a> that which calls enable should also call
disable.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-bus-disable-sync-message-emission.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> on which you previously called
<a class="link" href="GstBus.html#gst-bus-enable-sync-message-emission" title="gst_bus_enable_sync_message_emission ()"><code class="function">gst_bus_enable_sync_message_emission()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-enable-sync-message-emission"></a><h3>gst_bus_enable_sync_message_emission ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_bus_enable_sync_message_emission (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Instructs GStreamer to emit the "sync-message" signal after running the bus's
sync handler. This function is here so that code can ensure that they can
synchronously receive messages without having to affect what the bin's sync
handler is.</p>
<p>This function may be called multiple times. To clean up, the caller is
responsible for calling <a class="link" href="GstBus.html#gst-bus-disable-sync-message-emission" title="gst_bus_disable_sync_message_emission ()"><code class="function">gst_bus_disable_sync_message_emission()</code></a> as many times
as this function is called.</p>
<p>While this function looks similar to <a class="link" href="GstBus.html#gst-bus-add-signal-watch" title="gst_bus_add_signal_watch ()"><code class="function">gst_bus_add_signal_watch()</code></a>, it is not
exactly the same -- this function enables <span class="emphasis"><em>synchronous</em></span> emission of
signals when messages arrive; <a class="link" href="GstBus.html#gst-bus-add-signal-watch" title="gst_bus_add_signal_watch ()"><code class="function">gst_bus_add_signal_watch()</code></a> adds an idle callback
to pop messages off the bus <span class="emphasis"><em>asynchronously</em></span>. The sync-message signal
comes from the thread of whatever object posted the message; the "message"
signal is marshalled to the main thread via the main loop.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-bus-enable-sync-message-emission.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> on which you want to receive the "sync-message" signal</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-async-signal-func"></a><h3>gst_bus_async_signal_func ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_bus_async_signal_func (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                           <em class="parameter"><code><a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> *message</code></em>,
                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>A helper <a class="link" href="GstBus.html#GstBusFunc" title="GstBusFunc ()"><span class="type">GstBusFunc</span></a> that can be used to convert all asynchronous messages
into signals.</p>
<div class="refsect3">
<a name="gst-bus-async-signal-func.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>the <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> received</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>user data</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-async-signal-func.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-add-signal-watch"></a><h3>gst_bus_add_signal_watch ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_bus_add_signal_watch (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Adds a bus signal watch to the default main context with the default priority
(<a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"><code class="literal">G_PRIORITY_DEFAULT</code></a>). It is also possible to use a non-default
main context set up using <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default"><code class="function">g_main_context_push_thread_default()</code></a> (before
one had to create a bus watch source and attach it to the desired main
context 'manually').</p>
<p>After calling this statement, the bus will emit the "message" signal for each
message posted on the bus.</p>
<p>This function may be called multiple times. To clean up, the caller is
responsible for calling <a class="link" href="GstBus.html#gst-bus-remove-signal-watch" title="gst_bus_remove_signal_watch ()"><code class="function">gst_bus_remove_signal_watch()</code></a> as many times as this
function is called.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-bus-add-signal-watch.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> on which you want to receive the "message" signal</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-add-signal-watch-full"></a><h3>gst_bus_add_signal_watch_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_bus_add_signal_watch_full (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> priority</code></em>);</pre>
<p>Adds a bus signal watch to the default main context with the given <em class="parameter"><code>priority</code></em>

(e.g. <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"><code class="literal">G_PRIORITY_DEFAULT</code></a>). It is also possible to use a non-default main
context set up using <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-main-context-push-thread-default"><code class="function">g_main_context_push_thread_default()</code></a>
(before one had to create a bus watch source and attach it to the desired
main context 'manually').</p>
<p>After calling this statement, the bus will emit the "message" signal for each
message posted on the bus when the main loop is running.</p>
<p>This function may be called multiple times. To clean up, the caller is
responsible for calling <a class="link" href="GstBus.html#gst-bus-remove-signal-watch" title="gst_bus_remove_signal_watch ()"><code class="function">gst_bus_remove_signal_watch()</code></a> as many times as this
function is called.</p>
<p>There can only be a single bus watch per bus, you must remove any signal
watch before you can set another type of watch.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-bus-add-signal-watch-full.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> on which you want to receive the "message" signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>priority</p></td>
<td class="parameter_description"><p>The priority of the watch.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-remove-signal-watch"></a><h3>gst_bus_remove_signal_watch ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_bus_remove_signal_watch (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>);</pre>
<p>Removes a signal watch previously added with <a class="link" href="GstBus.html#gst-bus-add-signal-watch" title="gst_bus_add_signal_watch ()"><code class="function">gst_bus_add_signal_watch()</code></a>.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-bus-remove-signal-watch.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> you previously added a signal watch to</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gst-bus-poll"></a><h3>gst_bus_poll ()</h3>
<pre class="programlisting"><a class="link" href="GstMessage.html" title="GstMessage"><span class="returnvalue">GstMessage</span></a> *
gst_bus_poll (<em class="parameter"><code><a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> *bus</code></em>,
              <em class="parameter"><code><a class="link" href="GstMessage.html#GstMessageType" title="enum GstMessageType"><span class="type">GstMessageType</span></a> events</code></em>,
              <em class="parameter"><code><a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a> timeout</code></em>);</pre>
<p>Poll the bus for messages. Will block while waiting for messages to come.
You can specify a maximum time to poll with the <em class="parameter"><code>timeout</code></em>
 parameter. If
<em class="parameter"><code>timeout</code></em>
 is negative, this function will block indefinitely.</p>
<p>All messages not in <em class="parameter"><code>events</code></em>
 will be popped off the bus and will be ignored.
It is not possible to use message enums beyond <a class="link" href="GstMessage.html#GST-MESSAGE-EXTENDED:CAPS"><span class="type">GST_MESSAGE_EXTENDED</span></a> in the
<em class="parameter"><code>events</code></em>
 mask</p>
<p>Because poll is implemented using the "message" signal enabled by
<a class="link" href="GstBus.html#gst-bus-add-signal-watch" title="gst_bus_add_signal_watch ()"><code class="function">gst_bus_add_signal_watch()</code></a>, calling <a class="link" href="GstBus.html#gst-bus-poll" title="gst_bus_poll ()"><code class="function">gst_bus_poll()</code></a> will cause the "message"
signal to be emitted for every message that poll sees. Thus a "message"
signal handler will see the same messages that this function sees -- neither
will steal messages from the other.</p>
<p>This function will run a main loop from the default main context when
polling.</p>
<p>You should never use this function, since it is pure evil. This is
especially true for GUI applications based on Gtk+ or Qt, but also for any
other non-trivial application that uses the GLib main loop. As this function
runs a GLib main loop, any callback attached to the default GLib main
context may be invoked. This could be timeouts, GUI events, I/O events etc.;
even if <a class="link" href="GstBus.html#gst-bus-poll" title="gst_bus_poll ()"><code class="function">gst_bus_poll()</code></a> is called with a 0 timeout. Any of these callbacks
may do things you do not expect, e.g. destroy the main application window or
some other resource; change other application state; display a dialog and
run another main loop until the user clicks it away. In short, using this
function may add a lot of complexity to your code through unexpected
re-entrancy and unexpected changes to your application's state.</p>
<p>For 0 timeouts use <a class="link" href="GstBus.html#gst-bus-pop-filtered" title="gst_bus_pop_filtered ()"><code class="function">gst_bus_pop_filtered()</code></a> instead of this function; for
other short timeouts use <a class="link" href="GstBus.html#gst-bus-timed-pop-filtered" title="gst_bus_timed_pop_filtered ()"><code class="function">gst_bus_timed_pop_filtered()</code></a>; everything else is
better handled by setting up an asynchronous bus watch and doing things
from there.</p>
<div class="refsect3">
<a name="gst-bus-poll.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>a <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>events</p></td>
<td class="parameter_description"><p>a mask of <a class="link" href="GstMessage.html#GstMessageType" title="enum GstMessageType"><span class="type">GstMessageType</span></a>, representing the set of message types to
poll for (note special handling of extended message types below)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout</p></td>
<td class="parameter_description"><p>the poll timeout, as a <a class="link" href="GstClock.html#GstClockTime" title="GstClockTime"><span class="type">GstClockTime</span></a>, or <a class="link" href="GstClock.html#GST-CLOCK-TIME-NONE:CAPS" title="GST_CLOCK_TIME_NONE"><span class="type">GST_CLOCK_TIME_NONE</span></a> to poll
indefinitely.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-bus-poll.returns"></a><h4>Returns</h4>
<p> the message that was received,
or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the poll timed out. The message is taken from the
bus and needs to be unreffed with <a class="link" href="GstMessage.html#gst-message-unref" title="gst_message_unref ()"><code class="function">gst_message_unref()</code></a> after
usage. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="GstBus.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GstBus-struct"></a><h3>struct GstBus</h3>
<pre class="programlisting">struct GstBus;</pre>
<p>The opaque <a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a> data structure.</p>
</div>
<hr>
<div class="refsect2">
<a name="GstBusFlags"></a><h3>enum GstBusFlags</h3>
<p>The standard flags that a bus may have.</p>
<div class="refsect3">
<a name="GstBusFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-BUS-FLUSHING:CAPS"></a>GST_BUS_FLUSHING</p></td>
<td class="enum_member_description">
<p>The bus is currently dropping all messages</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUS-FLAG-LAST:CAPS"></a>GST_BUS_FLAG_LAST</p></td>
<td class="enum_member_description">
<p>offset to define more flags</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GstBusSyncReply"></a><h3>enum GstBusSyncReply</h3>
<p>The result values for a GstBusSyncHandler.</p>
<div class="refsect3">
<a name="GstBusSyncReply.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GST-BUS-DROP:CAPS"></a>GST_BUS_DROP</p></td>
<td class="enum_member_description">
<p>drop the message</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUS-PASS:CAPS"></a>GST_BUS_PASS</p></td>
<td class="enum_member_description">
<p>pass the message to the async queue</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GST-BUS-ASYNC:CAPS"></a>GST_BUS_ASYNC</p></td>
<td class="enum_member_description">
<p>pass message to async queue, continue if message is handled</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GstBus.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GstBus--enable-async"></a><h3>The <code class="literal">“enable-async”</code> property</h3>
<pre class="programlisting">  “enable-async”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Enable async message delivery for bus watches and gst_bus_pop().</p>
<p>Flags: Write / Construct Only</p>
<p>Default value: TRUE</p>
</div>
</div>
<div class="refsect1">
<a name="GstBus.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GstBus-message"></a><h3>The <code class="literal">“message”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>     *bus,
               <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> *message,
               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)</pre>
<p>A message has been posted on the bus. This signal is emitted from a
GSource added to the mainloop. this signal will only be emitted when
there is a mainloop running.</p>
<div class="refsect3">
<a name="GstBus-message.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>the message that has been posted asynchronously</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-DETAILED:CAPS">Has Details</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GstBus-sync-message"></a><h3>The <code class="literal">“sync-message”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GstBus.html" title="GstBus"><span class="type">GstBus</span></a>     *bus,
               <a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a> *message,
               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)</pre>
<p>A message has been posted on the bus. This signal is emitted from the
thread that posted the message so one has to be careful with locking.</p>
<p>This signal will not be emitted by default, you have to call
<a class="link" href="GstBus.html#gst-bus-enable-sync-message-emission" title="gst_bus_enable_sync_message_emission ()"><code class="function">gst_bus_enable_sync_message_emission()</code></a> before.</p>
<div class="refsect3">
<a name="GstBus-sync-message.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bus</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>the message that has been posted synchronously</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-DETAILED:CAPS">Has Details</a></p>
</div>
</div>
<div class="refsect1">
<a name="GstBus.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GstMessage.html" title="GstMessage"><span class="type">GstMessage</span></a>, <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>