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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use glib::translate::*;
use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use glib::StaticType;
use glib::Type;
use gobject_sys;
use gst_rtsp_sys;

/// Authentication methods, ordered by strength
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPAuthMethod {
    /// no authentication
    None,
    /// basic authentication
    Basic,
    /// digest authentication
    Digest,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPAuthMethod {
    type GlibType = gst_rtsp_sys::GstRTSPAuthMethod;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPAuthMethod {
        match *self {
            RTSPAuthMethod::None => gst_rtsp_sys::GST_RTSP_AUTH_NONE,
            RTSPAuthMethod::Basic => gst_rtsp_sys::GST_RTSP_AUTH_BASIC,
            RTSPAuthMethod::Digest => gst_rtsp_sys::GST_RTSP_AUTH_DIGEST,
            RTSPAuthMethod::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPAuthMethod> for RTSPAuthMethod {
    fn from_glib(value: gst_rtsp_sys::GstRTSPAuthMethod) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPAuthMethod::None,
            1 => RTSPAuthMethod::Basic,
            2 => RTSPAuthMethod::Digest,
            value => RTSPAuthMethod::__Unknown(value),
        }
    }
}

impl StaticType for RTSPAuthMethod {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_auth_method_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPAuthMethod {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPAuthMethod {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPAuthMethod {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// The possible network families.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPFamily {
    /// unknown network family
    None,
    /// internet
    Inet,
    /// internet V6
    Inet6,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPFamily {
    type GlibType = gst_rtsp_sys::GstRTSPFamily;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPFamily {
        match *self {
            RTSPFamily::None => gst_rtsp_sys::GST_RTSP_FAM_NONE,
            RTSPFamily::Inet => gst_rtsp_sys::GST_RTSP_FAM_INET,
            RTSPFamily::Inet6 => gst_rtsp_sys::GST_RTSP_FAM_INET6,
            RTSPFamily::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPFamily> for RTSPFamily {
    fn from_glib(value: gst_rtsp_sys::GstRTSPFamily) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPFamily::None,
            1 => RTSPFamily::Inet,
            2 => RTSPFamily::Inet6,
            value => RTSPFamily::__Unknown(value),
        }
    }
}

impl StaticType for RTSPFamily {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_family_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPFamily {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPFamily {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPFamily {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// Enumeration of rtsp header fields
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPHeaderField {
    Invalid,
    Accept,
    AcceptEncoding,
    AcceptLanguage,
    Allow,
    Authorization,
    Bandwidth,
    Blocksize,
    CacheControl,
    Conference,
    Connection,
    ContentBase,
    ContentEncoding,
    ContentLanguage,
    ContentLength,
    ContentLocation,
    ContentType,
    Cseq,
    Date,
    Expires,
    From,
    IfModifiedSince,
    LastModified,
    ProxyAuthenticate,
    ProxyRequire,
    Public,
    Range,
    Referer,
    Require,
    RetryAfter,
    RtpInfo,
    Scale,
    Session,
    Server,
    Speed,
    Transport,
    Unsupported,
    UserAgent,
    Via,
    WwwAuthenticate,
    ClientChallenge,
    RealChallenge1,
    RealChallenge2,
    RealChallenge3,
    Subscribe,
    Alert,
    ClientId,
    CompanyId,
    Guid,
    RegionData,
    MaxAsmWidth,
    Language,
    PlayerStartTime,
    Location,
    Etag,
    IfMatch,
    AcceptCharset,
    Supported,
    Vary,
    XAccelerateStreaming,
    XAcceptAuthent,
    XAcceptProxyAuthent,
    XBroadcastId,
    XBurstStreaming,
    XNotice,
    XPlayerLagTime,
    XPlaylist,
    XPlaylistChangeNotice,
    XPlaylistGenId,
    XPlaylistSeekId,
    XProxyClientAgent,
    XProxyClientVerb,
    XRecedingPlaylistchange,
    XRtpInfo,
    XStartupprofile,
    Timestamp,
    AuthenticationInfo,
    Host,
    Pragma,
    XServerIpAddress,
    XSessioncookie,
    RtcpInterval,
    Keymgmt,
    PipelinedRequests,
    MediaProperties,
    SeekStyle,
    AcceptRanges,
    Frames,
    RateControl,
    Last,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPHeaderField {
    type GlibType = gst_rtsp_sys::GstRTSPHeaderField;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPHeaderField {
        match *self {
            RTSPHeaderField::Invalid => gst_rtsp_sys::GST_RTSP_HDR_INVALID,
            RTSPHeaderField::Accept => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT,
            RTSPHeaderField::AcceptEncoding => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_ENCODING,
            RTSPHeaderField::AcceptLanguage => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_LANGUAGE,
            RTSPHeaderField::Allow => gst_rtsp_sys::GST_RTSP_HDR_ALLOW,
            RTSPHeaderField::Authorization => gst_rtsp_sys::GST_RTSP_HDR_AUTHORIZATION,
            RTSPHeaderField::Bandwidth => gst_rtsp_sys::GST_RTSP_HDR_BANDWIDTH,
            RTSPHeaderField::Blocksize => gst_rtsp_sys::GST_RTSP_HDR_BLOCKSIZE,
            RTSPHeaderField::CacheControl => gst_rtsp_sys::GST_RTSP_HDR_CACHE_CONTROL,
            RTSPHeaderField::Conference => gst_rtsp_sys::GST_RTSP_HDR_CONFERENCE,
            RTSPHeaderField::Connection => gst_rtsp_sys::GST_RTSP_HDR_CONNECTION,
            RTSPHeaderField::ContentBase => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_BASE,
            RTSPHeaderField::ContentEncoding => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_ENCODING,
            RTSPHeaderField::ContentLanguage => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LANGUAGE,
            RTSPHeaderField::ContentLength => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LENGTH,
            RTSPHeaderField::ContentLocation => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_LOCATION,
            RTSPHeaderField::ContentType => gst_rtsp_sys::GST_RTSP_HDR_CONTENT_TYPE,
            RTSPHeaderField::Cseq => gst_rtsp_sys::GST_RTSP_HDR_CSEQ,
            RTSPHeaderField::Date => gst_rtsp_sys::GST_RTSP_HDR_DATE,
            RTSPHeaderField::Expires => gst_rtsp_sys::GST_RTSP_HDR_EXPIRES,
            RTSPHeaderField::From => gst_rtsp_sys::GST_RTSP_HDR_FROM,
            RTSPHeaderField::IfModifiedSince => gst_rtsp_sys::GST_RTSP_HDR_IF_MODIFIED_SINCE,
            RTSPHeaderField::LastModified => gst_rtsp_sys::GST_RTSP_HDR_LAST_MODIFIED,
            RTSPHeaderField::ProxyAuthenticate => gst_rtsp_sys::GST_RTSP_HDR_PROXY_AUTHENTICATE,
            RTSPHeaderField::ProxyRequire => gst_rtsp_sys::GST_RTSP_HDR_PROXY_REQUIRE,
            RTSPHeaderField::Public => gst_rtsp_sys::GST_RTSP_HDR_PUBLIC,
            RTSPHeaderField::Range => gst_rtsp_sys::GST_RTSP_HDR_RANGE,
            RTSPHeaderField::Referer => gst_rtsp_sys::GST_RTSP_HDR_REFERER,
            RTSPHeaderField::Require => gst_rtsp_sys::GST_RTSP_HDR_REQUIRE,
            RTSPHeaderField::RetryAfter => gst_rtsp_sys::GST_RTSP_HDR_RETRY_AFTER,
            RTSPHeaderField::RtpInfo => gst_rtsp_sys::GST_RTSP_HDR_RTP_INFO,
            RTSPHeaderField::Scale => gst_rtsp_sys::GST_RTSP_HDR_SCALE,
            RTSPHeaderField::Session => gst_rtsp_sys::GST_RTSP_HDR_SESSION,
            RTSPHeaderField::Server => gst_rtsp_sys::GST_RTSP_HDR_SERVER,
            RTSPHeaderField::Speed => gst_rtsp_sys::GST_RTSP_HDR_SPEED,
            RTSPHeaderField::Transport => gst_rtsp_sys::GST_RTSP_HDR_TRANSPORT,
            RTSPHeaderField::Unsupported => gst_rtsp_sys::GST_RTSP_HDR_UNSUPPORTED,
            RTSPHeaderField::UserAgent => gst_rtsp_sys::GST_RTSP_HDR_USER_AGENT,
            RTSPHeaderField::Via => gst_rtsp_sys::GST_RTSP_HDR_VIA,
            RTSPHeaderField::WwwAuthenticate => gst_rtsp_sys::GST_RTSP_HDR_WWW_AUTHENTICATE,
            RTSPHeaderField::ClientChallenge => gst_rtsp_sys::GST_RTSP_HDR_CLIENT_CHALLENGE,
            RTSPHeaderField::RealChallenge1 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE1,
            RTSPHeaderField::RealChallenge2 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE2,
            RTSPHeaderField::RealChallenge3 => gst_rtsp_sys::GST_RTSP_HDR_REAL_CHALLENGE3,
            RTSPHeaderField::Subscribe => gst_rtsp_sys::GST_RTSP_HDR_SUBSCRIBE,
            RTSPHeaderField::Alert => gst_rtsp_sys::GST_RTSP_HDR_ALERT,
            RTSPHeaderField::ClientId => gst_rtsp_sys::GST_RTSP_HDR_CLIENT_ID,
            RTSPHeaderField::CompanyId => gst_rtsp_sys::GST_RTSP_HDR_COMPANY_ID,
            RTSPHeaderField::Guid => gst_rtsp_sys::GST_RTSP_HDR_GUID,
            RTSPHeaderField::RegionData => gst_rtsp_sys::GST_RTSP_HDR_REGION_DATA,
            RTSPHeaderField::MaxAsmWidth => gst_rtsp_sys::GST_RTSP_HDR_MAX_ASM_WIDTH,
            RTSPHeaderField::Language => gst_rtsp_sys::GST_RTSP_HDR_LANGUAGE,
            RTSPHeaderField::PlayerStartTime => gst_rtsp_sys::GST_RTSP_HDR_PLAYER_START_TIME,
            RTSPHeaderField::Location => gst_rtsp_sys::GST_RTSP_HDR_LOCATION,
            RTSPHeaderField::Etag => gst_rtsp_sys::GST_RTSP_HDR_ETAG,
            RTSPHeaderField::IfMatch => gst_rtsp_sys::GST_RTSP_HDR_IF_MATCH,
            RTSPHeaderField::AcceptCharset => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_CHARSET,
            RTSPHeaderField::Supported => gst_rtsp_sys::GST_RTSP_HDR_SUPPORTED,
            RTSPHeaderField::Vary => gst_rtsp_sys::GST_RTSP_HDR_VARY,
            RTSPHeaderField::XAccelerateStreaming => {
                gst_rtsp_sys::GST_RTSP_HDR_X_ACCELERATE_STREAMING
            }
            RTSPHeaderField::XAcceptAuthent => gst_rtsp_sys::GST_RTSP_HDR_X_ACCEPT_AUTHENT,
            RTSPHeaderField::XAcceptProxyAuthent => {
                gst_rtsp_sys::GST_RTSP_HDR_X_ACCEPT_PROXY_AUTHENT
            }
            RTSPHeaderField::XBroadcastId => gst_rtsp_sys::GST_RTSP_HDR_X_BROADCAST_ID,
            RTSPHeaderField::XBurstStreaming => gst_rtsp_sys::GST_RTSP_HDR_X_BURST_STREAMING,
            RTSPHeaderField::XNotice => gst_rtsp_sys::GST_RTSP_HDR_X_NOTICE,
            RTSPHeaderField::XPlayerLagTime => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYER_LAG_TIME,
            RTSPHeaderField::XPlaylist => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST,
            RTSPHeaderField::XPlaylistChangeNotice => {
                gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_CHANGE_NOTICE
            }
            RTSPHeaderField::XPlaylistGenId => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_GEN_ID,
            RTSPHeaderField::XPlaylistSeekId => gst_rtsp_sys::GST_RTSP_HDR_X_PLAYLIST_SEEK_ID,
            RTSPHeaderField::XProxyClientAgent => gst_rtsp_sys::GST_RTSP_HDR_X_PROXY_CLIENT_AGENT,
            RTSPHeaderField::XProxyClientVerb => gst_rtsp_sys::GST_RTSP_HDR_X_PROXY_CLIENT_VERB,
            RTSPHeaderField::XRecedingPlaylistchange => {
                gst_rtsp_sys::GST_RTSP_HDR_X_RECEDING_PLAYLISTCHANGE
            }
            RTSPHeaderField::XRtpInfo => gst_rtsp_sys::GST_RTSP_HDR_X_RTP_INFO,
            RTSPHeaderField::XStartupprofile => gst_rtsp_sys::GST_RTSP_HDR_X_STARTUPPROFILE,
            RTSPHeaderField::Timestamp => gst_rtsp_sys::GST_RTSP_HDR_TIMESTAMP,
            RTSPHeaderField::AuthenticationInfo => gst_rtsp_sys::GST_RTSP_HDR_AUTHENTICATION_INFO,
            RTSPHeaderField::Host => gst_rtsp_sys::GST_RTSP_HDR_HOST,
            RTSPHeaderField::Pragma => gst_rtsp_sys::GST_RTSP_HDR_PRAGMA,
            RTSPHeaderField::XServerIpAddress => gst_rtsp_sys::GST_RTSP_HDR_X_SERVER_IP_ADDRESS,
            RTSPHeaderField::XSessioncookie => gst_rtsp_sys::GST_RTSP_HDR_X_SESSIONCOOKIE,
            RTSPHeaderField::RtcpInterval => gst_rtsp_sys::GST_RTSP_HDR_RTCP_INTERVAL,
            RTSPHeaderField::Keymgmt => gst_rtsp_sys::GST_RTSP_HDR_KEYMGMT,
            RTSPHeaderField::PipelinedRequests => gst_rtsp_sys::GST_RTSP_HDR_PIPELINED_REQUESTS,
            RTSPHeaderField::MediaProperties => gst_rtsp_sys::GST_RTSP_HDR_MEDIA_PROPERTIES,
            RTSPHeaderField::SeekStyle => gst_rtsp_sys::GST_RTSP_HDR_SEEK_STYLE,
            RTSPHeaderField::AcceptRanges => gst_rtsp_sys::GST_RTSP_HDR_ACCEPT_RANGES,
            RTSPHeaderField::Frames => gst_rtsp_sys::GST_RTSP_HDR_FRAMES,
            RTSPHeaderField::RateControl => gst_rtsp_sys::GST_RTSP_HDR_RATE_CONTROL,
            RTSPHeaderField::Last => gst_rtsp_sys::GST_RTSP_HDR_LAST,
            RTSPHeaderField::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPHeaderField> for RTSPHeaderField {
    fn from_glib(value: gst_rtsp_sys::GstRTSPHeaderField) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPHeaderField::Invalid,
            1 => RTSPHeaderField::Accept,
            2 => RTSPHeaderField::AcceptEncoding,
            3 => RTSPHeaderField::AcceptLanguage,
            4 => RTSPHeaderField::Allow,
            5 => RTSPHeaderField::Authorization,
            6 => RTSPHeaderField::Bandwidth,
            7 => RTSPHeaderField::Blocksize,
            8 => RTSPHeaderField::CacheControl,
            9 => RTSPHeaderField::Conference,
            10 => RTSPHeaderField::Connection,
            11 => RTSPHeaderField::ContentBase,
            12 => RTSPHeaderField::ContentEncoding,
            13 => RTSPHeaderField::ContentLanguage,
            14 => RTSPHeaderField::ContentLength,
            15 => RTSPHeaderField::ContentLocation,
            16 => RTSPHeaderField::ContentType,
            17 => RTSPHeaderField::Cseq,
            18 => RTSPHeaderField::Date,
            19 => RTSPHeaderField::Expires,
            20 => RTSPHeaderField::From,
            21 => RTSPHeaderField::IfModifiedSince,
            22 => RTSPHeaderField::LastModified,
            23 => RTSPHeaderField::ProxyAuthenticate,
            24 => RTSPHeaderField::ProxyRequire,
            25 => RTSPHeaderField::Public,
            26 => RTSPHeaderField::Range,
            27 => RTSPHeaderField::Referer,
            28 => RTSPHeaderField::Require,
            29 => RTSPHeaderField::RetryAfter,
            30 => RTSPHeaderField::RtpInfo,
            31 => RTSPHeaderField::Scale,
            32 => RTSPHeaderField::Session,
            33 => RTSPHeaderField::Server,
            34 => RTSPHeaderField::Speed,
            35 => RTSPHeaderField::Transport,
            36 => RTSPHeaderField::Unsupported,
            37 => RTSPHeaderField::UserAgent,
            38 => RTSPHeaderField::Via,
            39 => RTSPHeaderField::WwwAuthenticate,
            40 => RTSPHeaderField::ClientChallenge,
            41 => RTSPHeaderField::RealChallenge1,
            42 => RTSPHeaderField::RealChallenge2,
            43 => RTSPHeaderField::RealChallenge3,
            44 => RTSPHeaderField::Subscribe,
            45 => RTSPHeaderField::Alert,
            46 => RTSPHeaderField::ClientId,
            47 => RTSPHeaderField::CompanyId,
            48 => RTSPHeaderField::Guid,
            49 => RTSPHeaderField::RegionData,
            50 => RTSPHeaderField::MaxAsmWidth,
            51 => RTSPHeaderField::Language,
            52 => RTSPHeaderField::PlayerStartTime,
            53 => RTSPHeaderField::Location,
            54 => RTSPHeaderField::Etag,
            55 => RTSPHeaderField::IfMatch,
            56 => RTSPHeaderField::AcceptCharset,
            57 => RTSPHeaderField::Supported,
            58 => RTSPHeaderField::Vary,
            59 => RTSPHeaderField::XAccelerateStreaming,
            60 => RTSPHeaderField::XAcceptAuthent,
            61 => RTSPHeaderField::XAcceptProxyAuthent,
            62 => RTSPHeaderField::XBroadcastId,
            63 => RTSPHeaderField::XBurstStreaming,
            64 => RTSPHeaderField::XNotice,
            65 => RTSPHeaderField::XPlayerLagTime,
            66 => RTSPHeaderField::XPlaylist,
            67 => RTSPHeaderField::XPlaylistChangeNotice,
            68 => RTSPHeaderField::XPlaylistGenId,
            69 => RTSPHeaderField::XPlaylistSeekId,
            70 => RTSPHeaderField::XProxyClientAgent,
            71 => RTSPHeaderField::XProxyClientVerb,
            72 => RTSPHeaderField::XRecedingPlaylistchange,
            73 => RTSPHeaderField::XRtpInfo,
            74 => RTSPHeaderField::XStartupprofile,
            75 => RTSPHeaderField::Timestamp,
            76 => RTSPHeaderField::AuthenticationInfo,
            77 => RTSPHeaderField::Host,
            78 => RTSPHeaderField::Pragma,
            79 => RTSPHeaderField::XServerIpAddress,
            80 => RTSPHeaderField::XSessioncookie,
            81 => RTSPHeaderField::RtcpInterval,
            82 => RTSPHeaderField::Keymgmt,
            83 => RTSPHeaderField::PipelinedRequests,
            84 => RTSPHeaderField::MediaProperties,
            85 => RTSPHeaderField::SeekStyle,
            86 => RTSPHeaderField::AcceptRanges,
            87 => RTSPHeaderField::Frames,
            88 => RTSPHeaderField::RateControl,
            89 => RTSPHeaderField::Last,
            value => RTSPHeaderField::__Unknown(value),
        }
    }
}

impl StaticType for RTSPHeaderField {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_header_field_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPHeaderField {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPHeaderField {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPHeaderField {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// The type of a message.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPMsgType {
    /// invalid message type
    Invalid,
    /// RTSP request message
    Request,
    /// RTSP response message
    Response,
    /// HTTP request message.
    HttpRequest,
    /// HTTP response message.
    HttpResponse,
    /// data message
    Data,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPMsgType {
    type GlibType = gst_rtsp_sys::GstRTSPMsgType;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPMsgType {
        match *self {
            RTSPMsgType::Invalid => gst_rtsp_sys::GST_RTSP_MESSAGE_INVALID,
            RTSPMsgType::Request => gst_rtsp_sys::GST_RTSP_MESSAGE_REQUEST,
            RTSPMsgType::Response => gst_rtsp_sys::GST_RTSP_MESSAGE_RESPONSE,
            RTSPMsgType::HttpRequest => gst_rtsp_sys::GST_RTSP_MESSAGE_HTTP_REQUEST,
            RTSPMsgType::HttpResponse => gst_rtsp_sys::GST_RTSP_MESSAGE_HTTP_RESPONSE,
            RTSPMsgType::Data => gst_rtsp_sys::GST_RTSP_MESSAGE_DATA,
            RTSPMsgType::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPMsgType> for RTSPMsgType {
    fn from_glib(value: gst_rtsp_sys::GstRTSPMsgType) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPMsgType::Invalid,
            1 => RTSPMsgType::Request,
            2 => RTSPMsgType::Response,
            3 => RTSPMsgType::HttpRequest,
            4 => RTSPMsgType::HttpResponse,
            5 => RTSPMsgType::Data,
            value => RTSPMsgType::__Unknown(value),
        }
    }
}

impl StaticType for RTSPMsgType {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_msg_type_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPMsgType {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPMsgType {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPMsgType {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// Different possible time range units.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPRangeUnit {
    /// SMPTE timecode
    Smpte,
    /// 29.97 frames per second
    Smpte30Drop,
    /// 25 frames per second
    Smpte25,
    /// Normal play time
    Npt,
    /// Absolute time expressed as ISO 8601 timestamps
    Clock,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPRangeUnit {
    type GlibType = gst_rtsp_sys::GstRTSPRangeUnit;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPRangeUnit {
        match *self {
            RTSPRangeUnit::Smpte => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE,
            RTSPRangeUnit::Smpte30Drop => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE_30_DROP,
            RTSPRangeUnit::Smpte25 => gst_rtsp_sys::GST_RTSP_RANGE_SMPTE_25,
            RTSPRangeUnit::Npt => gst_rtsp_sys::GST_RTSP_RANGE_NPT,
            RTSPRangeUnit::Clock => gst_rtsp_sys::GST_RTSP_RANGE_CLOCK,
            RTSPRangeUnit::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPRangeUnit> for RTSPRangeUnit {
    fn from_glib(value: gst_rtsp_sys::GstRTSPRangeUnit) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPRangeUnit::Smpte,
            1 => RTSPRangeUnit::Smpte30Drop,
            2 => RTSPRangeUnit::Smpte25,
            3 => RTSPRangeUnit::Npt,
            4 => RTSPRangeUnit::Clock,
            value => RTSPRangeUnit::__Unknown(value),
        }
    }
}

impl StaticType for RTSPRangeUnit {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_range_unit_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPRangeUnit {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPRangeUnit {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPRangeUnit {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// Result codes from the RTSP functions.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPResult {
    /// no error
    Ok,
    /// some unspecified error occurred
    Error,
    /// invalid arguments were provided to a function
    Einval,
    /// an operation was canceled
    Eintr,
    /// no memory was available for the operation
    Enomem,
    /// a host resolve error occurred
    Eresolv,
    /// function not implemented
    Enotimpl,
    /// a system error occurred, errno contains more details
    Esys,
    /// a parsing error occurred
    Eparse,
    /// windows networking could not start
    Ewsastart,
    /// windows networking stack has wrong version
    Ewsaversion,
    /// end-of-file was reached
    Eeof,
    /// a network problem occurred, h_errno contains more details
    Enet,
    /// the host is not an IP host
    Enotip,
    /// a timeout occurred
    Etimeout,
    /// the tunnel GET request has been performed
    Etget,
    /// the tunnel POST request has been performed
    Etpost,
    /// last error
    Elast,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPResult {
    type GlibType = gst_rtsp_sys::GstRTSPResult;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPResult {
        match *self {
            RTSPResult::Ok => gst_rtsp_sys::GST_RTSP_OK,
            RTSPResult::Error => gst_rtsp_sys::GST_RTSP_ERROR,
            RTSPResult::Einval => gst_rtsp_sys::GST_RTSP_EINVAL,
            RTSPResult::Eintr => gst_rtsp_sys::GST_RTSP_EINTR,
            RTSPResult::Enomem => gst_rtsp_sys::GST_RTSP_ENOMEM,
            RTSPResult::Eresolv => gst_rtsp_sys::GST_RTSP_ERESOLV,
            RTSPResult::Enotimpl => gst_rtsp_sys::GST_RTSP_ENOTIMPL,
            RTSPResult::Esys => gst_rtsp_sys::GST_RTSP_ESYS,
            RTSPResult::Eparse => gst_rtsp_sys::GST_RTSP_EPARSE,
            RTSPResult::Ewsastart => gst_rtsp_sys::GST_RTSP_EWSASTART,
            RTSPResult::Ewsaversion => gst_rtsp_sys::GST_RTSP_EWSAVERSION,
            RTSPResult::Eeof => gst_rtsp_sys::GST_RTSP_EEOF,
            RTSPResult::Enet => gst_rtsp_sys::GST_RTSP_ENET,
            RTSPResult::Enotip => gst_rtsp_sys::GST_RTSP_ENOTIP,
            RTSPResult::Etimeout => gst_rtsp_sys::GST_RTSP_ETIMEOUT,
            RTSPResult::Etget => gst_rtsp_sys::GST_RTSP_ETGET,
            RTSPResult::Etpost => gst_rtsp_sys::GST_RTSP_ETPOST,
            RTSPResult::Elast => gst_rtsp_sys::GST_RTSP_ELAST,
            RTSPResult::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPResult> for RTSPResult {
    fn from_glib(value: gst_rtsp_sys::GstRTSPResult) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPResult::Ok,
            -1 => RTSPResult::Error,
            -2 => RTSPResult::Einval,
            -3 => RTSPResult::Eintr,
            -4 => RTSPResult::Enomem,
            -5 => RTSPResult::Eresolv,
            -6 => RTSPResult::Enotimpl,
            -7 => RTSPResult::Esys,
            -8 => RTSPResult::Eparse,
            -9 => RTSPResult::Ewsastart,
            -10 => RTSPResult::Ewsaversion,
            -11 => RTSPResult::Eeof,
            -12 => RTSPResult::Enet,
            -13 => RTSPResult::Enotip,
            -14 => RTSPResult::Etimeout,
            -15 => RTSPResult::Etget,
            -16 => RTSPResult::Etpost,
            -17 => RTSPResult::Elast,
            value => RTSPResult::__Unknown(value),
        }
    }
}

impl StaticType for RTSPResult {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_result_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPResult {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPResult {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPResult {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// The different RTSP states.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPState {
    /// invalid state
    Invalid,
    /// initializing
    Init,
    /// ready for operation
    Ready,
    /// seeking in progress
    Seeking,
    /// playing
    Playing,
    /// recording
    Recording,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPState {
    type GlibType = gst_rtsp_sys::GstRTSPState;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPState {
        match *self {
            RTSPState::Invalid => gst_rtsp_sys::GST_RTSP_STATE_INVALID,
            RTSPState::Init => gst_rtsp_sys::GST_RTSP_STATE_INIT,
            RTSPState::Ready => gst_rtsp_sys::GST_RTSP_STATE_READY,
            RTSPState::Seeking => gst_rtsp_sys::GST_RTSP_STATE_SEEKING,
            RTSPState::Playing => gst_rtsp_sys::GST_RTSP_STATE_PLAYING,
            RTSPState::Recording => gst_rtsp_sys::GST_RTSP_STATE_RECORDING,
            RTSPState::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPState> for RTSPState {
    fn from_glib(value: gst_rtsp_sys::GstRTSPState) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPState::Invalid,
            1 => RTSPState::Init,
            2 => RTSPState::Ready,
            3 => RTSPState::Seeking,
            4 => RTSPState::Playing,
            5 => RTSPState::Recording,
            value => RTSPState::__Unknown(value),
        }
    }
}

impl StaticType for RTSPState {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_state_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPState {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPState {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPState {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// Enumeration of rtsp status codes
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPStatusCode {
    Invalid,
    Continue,
    Ok,
    Created,
    LowOnStorage,
    MultipleChoices,
    MovedPermanently,
    MoveTemporarily,
    SeeOther,
    NotModified,
    UseProxy,
    BadRequest,
    Unauthorized,
    PaymentRequired,
    Forbidden,
    NotFound,
    MethodNotAllowed,
    NotAcceptable,
    ProxyAuthRequired,
    RequestTimeout,
    Gone,
    LengthRequired,
    PreconditionFailed,
    RequestEntityTooLarge,
    RequestUriTooLarge,
    UnsupportedMediaType,
    ParameterNotUnderstood,
    ConferenceNotFound,
    NotEnoughBandwidth,
    SessionNotFound,
    MethodNotValidInThisState,
    HeaderFieldNotValidForResource,
    InvalidRange,
    ParameterIsReadonly,
    AggregateOperationNotAllowed,
    OnlyAggregateOperationAllowed,
    UnsupportedTransport,
    DestinationUnreachable,
    KeyManagementFailure,
    InternalServerError,
    NotImplemented,
    BadGateway,
    ServiceUnavailable,
    GatewayTimeout,
    RtspVersionNotSupported,
    OptionNotSupported,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPStatusCode {
    type GlibType = gst_rtsp_sys::GstRTSPStatusCode;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPStatusCode {
        match *self {
            RTSPStatusCode::Invalid => gst_rtsp_sys::GST_RTSP_STS_INVALID,
            RTSPStatusCode::Continue => gst_rtsp_sys::GST_RTSP_STS_CONTINUE,
            RTSPStatusCode::Ok => gst_rtsp_sys::GST_RTSP_STS_OK,
            RTSPStatusCode::Created => gst_rtsp_sys::GST_RTSP_STS_CREATED,
            RTSPStatusCode::LowOnStorage => gst_rtsp_sys::GST_RTSP_STS_LOW_ON_STORAGE,
            RTSPStatusCode::MultipleChoices => gst_rtsp_sys::GST_RTSP_STS_MULTIPLE_CHOICES,
            RTSPStatusCode::MovedPermanently => gst_rtsp_sys::GST_RTSP_STS_MOVED_PERMANENTLY,
            RTSPStatusCode::MoveTemporarily => gst_rtsp_sys::GST_RTSP_STS_MOVE_TEMPORARILY,
            RTSPStatusCode::SeeOther => gst_rtsp_sys::GST_RTSP_STS_SEE_OTHER,
            RTSPStatusCode::NotModified => gst_rtsp_sys::GST_RTSP_STS_NOT_MODIFIED,
            RTSPStatusCode::UseProxy => gst_rtsp_sys::GST_RTSP_STS_USE_PROXY,
            RTSPStatusCode::BadRequest => gst_rtsp_sys::GST_RTSP_STS_BAD_REQUEST,
            RTSPStatusCode::Unauthorized => gst_rtsp_sys::GST_RTSP_STS_UNAUTHORIZED,
            RTSPStatusCode::PaymentRequired => gst_rtsp_sys::GST_RTSP_STS_PAYMENT_REQUIRED,
            RTSPStatusCode::Forbidden => gst_rtsp_sys::GST_RTSP_STS_FORBIDDEN,
            RTSPStatusCode::NotFound => gst_rtsp_sys::GST_RTSP_STS_NOT_FOUND,
            RTSPStatusCode::MethodNotAllowed => gst_rtsp_sys::GST_RTSP_STS_METHOD_NOT_ALLOWED,
            RTSPStatusCode::NotAcceptable => gst_rtsp_sys::GST_RTSP_STS_NOT_ACCEPTABLE,
            RTSPStatusCode::ProxyAuthRequired => gst_rtsp_sys::GST_RTSP_STS_PROXY_AUTH_REQUIRED,
            RTSPStatusCode::RequestTimeout => gst_rtsp_sys::GST_RTSP_STS_REQUEST_TIMEOUT,
            RTSPStatusCode::Gone => gst_rtsp_sys::GST_RTSP_STS_GONE,
            RTSPStatusCode::LengthRequired => gst_rtsp_sys::GST_RTSP_STS_LENGTH_REQUIRED,
            RTSPStatusCode::PreconditionFailed => gst_rtsp_sys::GST_RTSP_STS_PRECONDITION_FAILED,
            RTSPStatusCode::RequestEntityTooLarge => {
                gst_rtsp_sys::GST_RTSP_STS_REQUEST_ENTITY_TOO_LARGE
            }
            RTSPStatusCode::RequestUriTooLarge => gst_rtsp_sys::GST_RTSP_STS_REQUEST_URI_TOO_LARGE,
            RTSPStatusCode::UnsupportedMediaType => {
                gst_rtsp_sys::GST_RTSP_STS_UNSUPPORTED_MEDIA_TYPE
            }
            RTSPStatusCode::ParameterNotUnderstood => {
                gst_rtsp_sys::GST_RTSP_STS_PARAMETER_NOT_UNDERSTOOD
            }
            RTSPStatusCode::ConferenceNotFound => gst_rtsp_sys::GST_RTSP_STS_CONFERENCE_NOT_FOUND,
            RTSPStatusCode::NotEnoughBandwidth => gst_rtsp_sys::GST_RTSP_STS_NOT_ENOUGH_BANDWIDTH,
            RTSPStatusCode::SessionNotFound => gst_rtsp_sys::GST_RTSP_STS_SESSION_NOT_FOUND,
            RTSPStatusCode::MethodNotValidInThisState => {
                gst_rtsp_sys::GST_RTSP_STS_METHOD_NOT_VALID_IN_THIS_STATE
            }
            RTSPStatusCode::HeaderFieldNotValidForResource => {
                gst_rtsp_sys::GST_RTSP_STS_HEADER_FIELD_NOT_VALID_FOR_RESOURCE
            }
            RTSPStatusCode::InvalidRange => gst_rtsp_sys::GST_RTSP_STS_INVALID_RANGE,
            RTSPStatusCode::ParameterIsReadonly => gst_rtsp_sys::GST_RTSP_STS_PARAMETER_IS_READONLY,
            RTSPStatusCode::AggregateOperationNotAllowed => {
                gst_rtsp_sys::GST_RTSP_STS_AGGREGATE_OPERATION_NOT_ALLOWED
            }
            RTSPStatusCode::OnlyAggregateOperationAllowed => {
                gst_rtsp_sys::GST_RTSP_STS_ONLY_AGGREGATE_OPERATION_ALLOWED
            }
            RTSPStatusCode::UnsupportedTransport => {
                gst_rtsp_sys::GST_RTSP_STS_UNSUPPORTED_TRANSPORT
            }
            RTSPStatusCode::DestinationUnreachable => {
                gst_rtsp_sys::GST_RTSP_STS_DESTINATION_UNREACHABLE
            }
            RTSPStatusCode::KeyManagementFailure => {
                gst_rtsp_sys::GST_RTSP_STS_KEY_MANAGEMENT_FAILURE
            }
            RTSPStatusCode::InternalServerError => gst_rtsp_sys::GST_RTSP_STS_INTERNAL_SERVER_ERROR,
            RTSPStatusCode::NotImplemented => gst_rtsp_sys::GST_RTSP_STS_NOT_IMPLEMENTED,
            RTSPStatusCode::BadGateway => gst_rtsp_sys::GST_RTSP_STS_BAD_GATEWAY,
            RTSPStatusCode::ServiceUnavailable => gst_rtsp_sys::GST_RTSP_STS_SERVICE_UNAVAILABLE,
            RTSPStatusCode::GatewayTimeout => gst_rtsp_sys::GST_RTSP_STS_GATEWAY_TIMEOUT,
            RTSPStatusCode::RtspVersionNotSupported => {
                gst_rtsp_sys::GST_RTSP_STS_RTSP_VERSION_NOT_SUPPORTED
            }
            RTSPStatusCode::OptionNotSupported => gst_rtsp_sys::GST_RTSP_STS_OPTION_NOT_SUPPORTED,
            RTSPStatusCode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPStatusCode> for RTSPStatusCode {
    fn from_glib(value: gst_rtsp_sys::GstRTSPStatusCode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPStatusCode::Invalid,
            100 => RTSPStatusCode::Continue,
            200 => RTSPStatusCode::Ok,
            201 => RTSPStatusCode::Created,
            250 => RTSPStatusCode::LowOnStorage,
            300 => RTSPStatusCode::MultipleChoices,
            301 => RTSPStatusCode::MovedPermanently,
            302 => RTSPStatusCode::MoveTemporarily,
            303 => RTSPStatusCode::SeeOther,
            304 => RTSPStatusCode::NotModified,
            305 => RTSPStatusCode::UseProxy,
            400 => RTSPStatusCode::BadRequest,
            401 => RTSPStatusCode::Unauthorized,
            402 => RTSPStatusCode::PaymentRequired,
            403 => RTSPStatusCode::Forbidden,
            404 => RTSPStatusCode::NotFound,
            405 => RTSPStatusCode::MethodNotAllowed,
            406 => RTSPStatusCode::NotAcceptable,
            407 => RTSPStatusCode::ProxyAuthRequired,
            408 => RTSPStatusCode::RequestTimeout,
            410 => RTSPStatusCode::Gone,
            411 => RTSPStatusCode::LengthRequired,
            412 => RTSPStatusCode::PreconditionFailed,
            413 => RTSPStatusCode::RequestEntityTooLarge,
            414 => RTSPStatusCode::RequestUriTooLarge,
            415 => RTSPStatusCode::UnsupportedMediaType,
            451 => RTSPStatusCode::ParameterNotUnderstood,
            452 => RTSPStatusCode::ConferenceNotFound,
            453 => RTSPStatusCode::NotEnoughBandwidth,
            454 => RTSPStatusCode::SessionNotFound,
            455 => RTSPStatusCode::MethodNotValidInThisState,
            456 => RTSPStatusCode::HeaderFieldNotValidForResource,
            457 => RTSPStatusCode::InvalidRange,
            458 => RTSPStatusCode::ParameterIsReadonly,
            459 => RTSPStatusCode::AggregateOperationNotAllowed,
            460 => RTSPStatusCode::OnlyAggregateOperationAllowed,
            461 => RTSPStatusCode::UnsupportedTransport,
            462 => RTSPStatusCode::DestinationUnreachable,
            463 => RTSPStatusCode::KeyManagementFailure,
            500 => RTSPStatusCode::InternalServerError,
            501 => RTSPStatusCode::NotImplemented,
            502 => RTSPStatusCode::BadGateway,
            503 => RTSPStatusCode::ServiceUnavailable,
            504 => RTSPStatusCode::GatewayTimeout,
            505 => RTSPStatusCode::RtspVersionNotSupported,
            551 => RTSPStatusCode::OptionNotSupported,
            value => RTSPStatusCode::__Unknown(value),
        }
    }
}

impl StaticType for RTSPStatusCode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_status_code_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPStatusCode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPStatusCode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPStatusCode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

/// Possible time types.
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum RTSPTimeType {
    /// seconds
    Seconds,
    /// now
    Now,
    /// end
    End,
    /// frames and subframes
    Frames,
    /// UTC time
    Utc,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for RTSPTimeType {
    type GlibType = gst_rtsp_sys::GstRTSPTimeType;

    fn to_glib(&self) -> gst_rtsp_sys::GstRTSPTimeType {
        match *self {
            RTSPTimeType::Seconds => gst_rtsp_sys::GST_RTSP_TIME_SECONDS,
            RTSPTimeType::Now => gst_rtsp_sys::GST_RTSP_TIME_NOW,
            RTSPTimeType::End => gst_rtsp_sys::GST_RTSP_TIME_END,
            RTSPTimeType::Frames => gst_rtsp_sys::GST_RTSP_TIME_FRAMES,
            RTSPTimeType::Utc => gst_rtsp_sys::GST_RTSP_TIME_UTC,
            RTSPTimeType::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_rtsp_sys::GstRTSPTimeType> for RTSPTimeType {
    fn from_glib(value: gst_rtsp_sys::GstRTSPTimeType) -> Self {
        skip_assert_initialized!();
        match value {
            0 => RTSPTimeType::Seconds,
            1 => RTSPTimeType::Now,
            2 => RTSPTimeType::End,
            3 => RTSPTimeType::Frames,
            4 => RTSPTimeType::Utc,
            value => RTSPTimeType::__Unknown(value),
        }
    }
}

impl StaticType for RTSPTimeType {
    fn static_type() -> Type {
        unsafe { from_glib(gst_rtsp_sys::gst_rtsp_time_type_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for RTSPTimeType {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for RTSPTimeType {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for RTSPTimeType {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}