gstreamer_mpegts/auto/
section.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::ffi;
7use glib::translate::*;
8
9glib::wrapper! {
10    /// ## Generic usage of sections with `GstMpegtsSection`
11    ///
12    /// The `GstMpegtsSection` object is the representation of MPEG-TS Section (SI or
13    /// PSI).
14    ///
15    /// Various elements can post those on the bus via `GstMessage` of type
16    /// `GST_MESSAGE_ELEMENT`. The `gst_message_parse_mpegts_section()` function
17    /// provides access to the section.
18    ///
19    /// Applications (or other elements) can create them either by using one of the
20    /// `gst_mpegts_section_from_*` functions, or by providing the raw SI data via
21    /// `gst_mpegts_section_new()`.
22    ///
23    /// Elements outputting MPEG-TS streams can also create sections using the
24    /// various convenience functions and then get the packetized data (to be
25    /// inserted in MPEG-TS packets) using `gst_mpegts_section_packetize()`.
26    ///
27    /// For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications
28    /// and other specifications mentioned in the documentation.
29    ///
30    /// # Supported base MPEG-TS sections
31    /// These are the sections for which parsing and packetizing code exists.
32    ///
33    /// ## Program Association Table (PAT)
34    /// See:
35    /// * `gst_mpegts_section_get_pat()`
36    /// * `gst_mpegts_pat_program_new()`
37    /// * `GstMpegtsPatProgram`
38    ///
39    /// ## Conditional Access Table (CAT)
40    /// See:
41    /// * `gst_mpegts_section_get_cat()`
42    ///
43    /// ## Program Map Table (PMT)
44    /// See:
45    /// * `GstMpegtsPMT`
46    /// * `gst_mpegts_section_get_pmt()`
47    /// * `gst_mpegts_pmt_new()`
48    /// * `GstMpegtsPMTStream`
49    ///
50    /// ## Transport Stream Description Table (TSDT)
51    /// See:
52    /// * `gst_mpegts_section_get_tsdt()`
53    /// # API
54    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
55    pub struct Section(Boxed<ffi::GstMpegtsSection>);
56
57    match fn {
58        copy => |ptr| glib::gobject_ffi::g_boxed_copy(ffi::gst_mpegts_section_get_type(), ptr as *mut _) as *mut ffi::GstMpegtsSection,
59        free => |ptr| glib::gobject_ffi::g_boxed_free(ffi::gst_mpegts_section_get_type(), ptr as *mut _),
60        type_ => || ffi::gst_mpegts_section_get_type(),
61    }
62}
63
64impl Section {
65    //#[doc(alias = "gst_mpegts_section_get_atsc_cvct")]
66    //#[doc(alias = "get_atsc_cvct")]
67    //pub fn atsc_cvct(&mut self) -> /*Ignored*/Option<AtscVCT> {
68    //    unsafe { TODO: call ffi:gst_mpegts_section_get_atsc_cvct() }
69    //}
70
71    //#[doc(alias = "gst_mpegts_section_get_atsc_eit")]
72    //#[doc(alias = "get_atsc_eit")]
73    //pub fn atsc_eit(&mut self) -> /*Ignored*/AtscEIT {
74    //    unsafe { TODO: call ffi:gst_mpegts_section_get_atsc_eit() }
75    //}
76
77    //#[doc(alias = "gst_mpegts_section_get_atsc_ett")]
78    //#[doc(alias = "get_atsc_ett")]
79    //pub fn atsc_ett(&mut self) -> /*Ignored*/AtscETT {
80    //    unsafe { TODO: call ffi:gst_mpegts_section_get_atsc_ett() }
81    //}
82
83    //#[doc(alias = "gst_mpegts_section_get_atsc_mgt")]
84    //#[doc(alias = "get_atsc_mgt")]
85    //pub fn atsc_mgt(&mut self) -> /*Ignored*/Option<AtscMGT> {
86    //    unsafe { TODO: call ffi:gst_mpegts_section_get_atsc_mgt() }
87    //}
88
89    //#[doc(alias = "gst_mpegts_section_get_atsc_rrt")]
90    //#[doc(alias = "get_atsc_rrt")]
91    //pub fn atsc_rrt(&mut self) -> /*Ignored*/AtscRRT {
92    //    unsafe { TODO: call ffi:gst_mpegts_section_get_atsc_rrt() }
93    //}
94
95    //#[doc(alias = "gst_mpegts_section_get_atsc_stt")]
96    //#[doc(alias = "get_atsc_stt")]
97    //pub fn atsc_stt(&mut self) -> /*Ignored*/AtscSTT {
98    //    unsafe { TODO: call ffi:gst_mpegts_section_get_atsc_stt() }
99    //}
100
101    //#[doc(alias = "gst_mpegts_section_get_atsc_tvct")]
102    //#[doc(alias = "get_atsc_tvct")]
103    //pub fn atsc_tvct(&mut self) -> /*Ignored*/Option<AtscVCT> {
104    //    unsafe { TODO: call ffi:gst_mpegts_section_get_atsc_tvct() }
105    //}
106
107    //#[doc(alias = "gst_mpegts_section_get_bat")]
108    //#[doc(alias = "get_bat")]
109    //pub fn bat(&mut self) -> /*Ignored*/Option<BAT> {
110    //    unsafe { TODO: call ffi:gst_mpegts_section_get_bat() }
111    //}
112
113    /// Gets the original unparsed section data.
114    ///
115    /// # Returns
116    ///
117    /// The original unparsed section data.
118    #[doc(alias = "gst_mpegts_section_get_data")]
119    #[doc(alias = "get_data")]
120    pub fn data(&mut self) -> glib::Bytes {
121        unsafe { from_glib_full(ffi::gst_mpegts_section_get_data(self.to_glib_none_mut().0)) }
122    }
123
124    //#[doc(alias = "gst_mpegts_section_get_eit")]
125    //#[doc(alias = "get_eit")]
126    //pub fn eit(&mut self) -> /*Ignored*/Option<EIT> {
127    //    unsafe { TODO: call ffi:gst_mpegts_section_get_eit() }
128    //}
129
130    //#[doc(alias = "gst_mpegts_section_get_nit")]
131    //#[doc(alias = "get_nit")]
132    //pub fn nit(&mut self) -> /*Ignored*/Option<NIT> {
133    //    unsafe { TODO: call ffi:gst_mpegts_section_get_nit() }
134    //}
135
136    //#[doc(alias = "gst_mpegts_section_get_pat")]
137    //#[doc(alias = "get_pat")]
138    //pub fn pat(&mut self) -> /*Ignored*/Vec<PatProgram> {
139    //    unsafe { TODO: call ffi:gst_mpegts_section_get_pat() }
140    //}
141
142    //#[doc(alias = "gst_mpegts_section_get_pmt")]
143    //#[doc(alias = "get_pmt")]
144    //pub fn pmt(&mut self) -> /*Ignored*/Option<PMT> {
145    //    unsafe { TODO: call ffi:gst_mpegts_section_get_pmt() }
146    //}
147
148    //#[doc(alias = "gst_mpegts_section_get_sdt")]
149    //#[doc(alias = "get_sdt")]
150    //pub fn sdt(&mut self) -> /*Ignored*/Option<SDT> {
151    //    unsafe { TODO: call ffi:gst_mpegts_section_get_sdt() }
152    //}
153
154    //#[doc(alias = "gst_mpegts_section_get_sit")]
155    //#[doc(alias = "get_sit")]
156    //pub fn sit(&mut self) -> /*Ignored*/Option<SIT> {
157    //    unsafe { TODO: call ffi:gst_mpegts_section_get_sit() }
158    //}
159
160    //#[doc(alias = "gst_mpegts_section_get_tdt")]
161    //#[doc(alias = "get_tdt")]
162    //pub fn tdt(&mut self) -> /*Ignored*/Option<gst::DateTime> {
163    //    unsafe { TODO: call ffi:gst_mpegts_section_get_tdt() }
164    //}
165
166    //#[doc(alias = "gst_mpegts_section_get_tot")]
167    //#[doc(alias = "get_tot")]
168    //pub fn tot(&mut self) -> /*Ignored*/Option<TOT> {
169    //    unsafe { TODO: call ffi:gst_mpegts_section_get_tot() }
170    //}
171
172    //#[doc(alias = "gst_mpegts_section_from_atsc_mgt")]
173    //pub fn from_atsc_mgt(mgt: /*Ignored*/AtscMGT) -> Option<Section> {
174    //    unsafe { TODO: call ffi:gst_mpegts_section_from_atsc_mgt() }
175    //}
176
177    //#[doc(alias = "gst_mpegts_section_from_atsc_rrt")]
178    //pub fn from_atsc_rrt(rrt: /*Ignored*/&mut AtscRRT) -> Section {
179    //    unsafe { TODO: call ffi:gst_mpegts_section_from_atsc_rrt() }
180    //}
181
182    //#[doc(alias = "gst_mpegts_section_from_atsc_stt")]
183    //pub fn from_atsc_stt(stt: /*Ignored*/&mut AtscSTT) -> Section {
184    //    unsafe { TODO: call ffi:gst_mpegts_section_from_atsc_stt() }
185    //}
186
187    //#[doc(alias = "gst_mpegts_section_from_nit")]
188    //pub fn from_nit(nit: /*Ignored*/NIT) -> Option<Section> {
189    //    unsafe { TODO: call ffi:gst_mpegts_section_from_nit() }
190    //}
191
192    //#[doc(alias = "gst_mpegts_section_from_pat")]
193    //pub fn from_pat(programs: /*Ignored*/Vec<PatProgram>, ts_id: u16) -> Section {
194    //    unsafe { TODO: call ffi:gst_mpegts_section_from_pat() }
195    //}
196
197    //#[doc(alias = "gst_mpegts_section_from_pmt")]
198    //pub fn from_pmt(pmt: /*Ignored*/PMT, pid: u16) -> Option<Section> {
199    //    unsafe { TODO: call ffi:gst_mpegts_section_from_pmt() }
200    //}
201
202    //#[doc(alias = "gst_mpegts_section_from_sdt")]
203    //pub fn from_sdt(sdt: /*Ignored*/SDT) -> Option<Section> {
204    //    unsafe { TODO: call ffi:gst_mpegts_section_from_sdt() }
205    //}
206}
207
208unsafe impl Send for Section {}
209unsafe impl Sync for Section {}