mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 02:51:10 +00:00
Simplify IsSubclassable::override_vfunc() implementations
This commit is contained in:
parent
99fbbc32cb
commit
b91123d298
27 changed files with 273 additions and 337 deletions
|
@ -515,26 +515,24 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_audio_sys::GstAudioDecoderClass);
|
||||
klass.open = Some(audio_decoder_open::<T>);
|
||||
klass.close = Some(audio_decoder_close::<T>);
|
||||
klass.start = Some(audio_decoder_start::<T>);
|
||||
klass.stop = Some(audio_decoder_stop::<T>);
|
||||
klass.set_format = Some(audio_decoder_set_format::<T>);
|
||||
klass.parse = Some(audio_decoder_parse::<T>);
|
||||
klass.handle_frame = Some(audio_decoder_handle_frame::<T>);
|
||||
klass.pre_push = Some(audio_decoder_pre_push::<T>);
|
||||
klass.flush = Some(audio_decoder_flush::<T>);
|
||||
klass.negotiate = Some(audio_decoder_negotiate::<T>);
|
||||
klass.getcaps = Some(audio_decoder_getcaps::<T>);
|
||||
klass.sink_event = Some(audio_decoder_sink_event::<T>);
|
||||
klass.src_event = Some(audio_decoder_src_event::<T>);
|
||||
klass.sink_query = Some(audio_decoder_sink_query::<T>);
|
||||
klass.src_query = Some(audio_decoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(audio_decoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(audio_decoder_decide_allocation::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.open = Some(audio_decoder_open::<T>);
|
||||
klass.close = Some(audio_decoder_close::<T>);
|
||||
klass.start = Some(audio_decoder_start::<T>);
|
||||
klass.stop = Some(audio_decoder_stop::<T>);
|
||||
klass.set_format = Some(audio_decoder_set_format::<T>);
|
||||
klass.parse = Some(audio_decoder_parse::<T>);
|
||||
klass.handle_frame = Some(audio_decoder_handle_frame::<T>);
|
||||
klass.pre_push = Some(audio_decoder_pre_push::<T>);
|
||||
klass.flush = Some(audio_decoder_flush::<T>);
|
||||
klass.negotiate = Some(audio_decoder_negotiate::<T>);
|
||||
klass.getcaps = Some(audio_decoder_getcaps::<T>);
|
||||
klass.sink_event = Some(audio_decoder_sink_event::<T>);
|
||||
klass.src_event = Some(audio_decoder_src_event::<T>);
|
||||
klass.sink_query = Some(audio_decoder_sink_query::<T>);
|
||||
klass.src_query = Some(audio_decoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(audio_decoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(audio_decoder_decide_allocation::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -464,25 +464,23 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_audio_sys::GstAudioEncoderClass);
|
||||
klass.open = Some(audio_encoder_open::<T>);
|
||||
klass.close = Some(audio_encoder_close::<T>);
|
||||
klass.start = Some(audio_encoder_start::<T>);
|
||||
klass.stop = Some(audio_encoder_stop::<T>);
|
||||
klass.set_format = Some(audio_encoder_set_format::<T>);
|
||||
klass.handle_frame = Some(audio_encoder_handle_frame::<T>);
|
||||
klass.pre_push = Some(audio_encoder_pre_push::<T>);
|
||||
klass.flush = Some(audio_encoder_flush::<T>);
|
||||
klass.negotiate = Some(audio_encoder_negotiate::<T>);
|
||||
klass.getcaps = Some(audio_encoder_getcaps::<T>);
|
||||
klass.sink_event = Some(audio_encoder_sink_event::<T>);
|
||||
klass.src_event = Some(audio_encoder_src_event::<T>);
|
||||
klass.sink_query = Some(audio_encoder_sink_query::<T>);
|
||||
klass.src_query = Some(audio_encoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(audio_encoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(audio_encoder_decide_allocation::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.open = Some(audio_encoder_open::<T>);
|
||||
klass.close = Some(audio_encoder_close::<T>);
|
||||
klass.start = Some(audio_encoder_start::<T>);
|
||||
klass.stop = Some(audio_encoder_stop::<T>);
|
||||
klass.set_format = Some(audio_encoder_set_format::<T>);
|
||||
klass.handle_frame = Some(audio_encoder_handle_frame::<T>);
|
||||
klass.pre_push = Some(audio_encoder_pre_push::<T>);
|
||||
klass.flush = Some(audio_encoder_flush::<T>);
|
||||
klass.negotiate = Some(audio_encoder_negotiate::<T>);
|
||||
klass.getcaps = Some(audio_encoder_getcaps::<T>);
|
||||
klass.sink_event = Some(audio_encoder_sink_event::<T>);
|
||||
klass.src_event = Some(audio_encoder_src_event::<T>);
|
||||
klass.sink_query = Some(audio_encoder_sink_query::<T>);
|
||||
klass.src_query = Some(audio_encoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(audio_encoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(audio_encoder_decide_allocation::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -190,16 +190,14 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst_base::BaseSink as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_audio_sys::GstAudioSinkClass);
|
||||
klass.close = Some(audiosink_close::<T>);
|
||||
klass.delay = Some(audiosink_delay::<T>);
|
||||
klass.open = Some(audiosink_open::<T>);
|
||||
klass.prepare = Some(audiosink_prepare::<T>);
|
||||
klass.unprepare = Some(audiosink_unprepare::<T>);
|
||||
klass.write = Some(audiosink_write::<T>);
|
||||
klass.reset = Some(audiosink_reset::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.close = Some(audiosink_close::<T>);
|
||||
klass.delay = Some(audiosink_delay::<T>);
|
||||
klass.open = Some(audiosink_open::<T>);
|
||||
klass.prepare = Some(audiosink_prepare::<T>);
|
||||
klass.unprepare = Some(audiosink_unprepare::<T>);
|
||||
klass.write = Some(audiosink_write::<T>);
|
||||
klass.reset = Some(audiosink_reset::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -206,16 +206,14 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst_base::BaseSrc as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_audio_sys::GstAudioSrcClass);
|
||||
klass.close = Some(audiosrc_close::<T>);
|
||||
klass.delay = Some(audiosrc_delay::<T>);
|
||||
klass.open = Some(audiosrc_open::<T>);
|
||||
klass.prepare = Some(audiosrc_prepare::<T>);
|
||||
klass.unprepare = Some(audiosrc_unprepare::<T>);
|
||||
klass.read = Some(audiosrc_read::<T>);
|
||||
klass.reset = Some(audiosrc_reset::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.close = Some(audiosrc_close::<T>);
|
||||
klass.delay = Some(audiosrc_delay::<T>);
|
||||
klass.open = Some(audiosrc_open::<T>);
|
||||
klass.prepare = Some(audiosrc_prepare::<T>);
|
||||
klass.unprepare = Some(audiosrc_unprepare::<T>);
|
||||
klass.read = Some(audiosrc_read::<T>);
|
||||
klass.reset = Some(audiosrc_reset::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -678,32 +678,30 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_base_sys::GstAggregatorClass);
|
||||
klass.flush = Some(aggregator_flush::<T>);
|
||||
klass.clip = Some(aggregator_clip::<T>);
|
||||
klass.finish_buffer = Some(aggregator_finish_buffer::<T>);
|
||||
klass.sink_event = Some(aggregator_sink_event::<T>);
|
||||
klass.sink_query = Some(aggregator_sink_query::<T>);
|
||||
klass.src_event = Some(aggregator_src_event::<T>);
|
||||
klass.src_query = Some(aggregator_src_query::<T>);
|
||||
klass.src_activate = Some(aggregator_src_activate::<T>);
|
||||
klass.aggregate = Some(aggregator_aggregate::<T>);
|
||||
klass.start = Some(aggregator_start::<T>);
|
||||
klass.stop = Some(aggregator_stop::<T>);
|
||||
klass.get_next_time = Some(aggregator_get_next_time::<T>);
|
||||
klass.create_new_pad = Some(aggregator_create_new_pad::<T>);
|
||||
klass.update_src_caps = Some(aggregator_update_src_caps::<T>);
|
||||
klass.fixate_src_caps = Some(aggregator_fixate_src_caps::<T>);
|
||||
klass.negotiated_src_caps = Some(aggregator_negotiated_src_caps::<T>);
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
{
|
||||
klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::<T>);
|
||||
klass.sink_query_pre_queue = Some(aggregator_sink_query_pre_queue::<T>);
|
||||
klass.negotiate = Some(aggregator_negotiate::<T>);
|
||||
klass.peek_next_sample = Some(aggregator_peek_next_sample::<T>);
|
||||
klass.finish_buffer_list = Some(aggregator_finish_buffer_list::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.flush = Some(aggregator_flush::<T>);
|
||||
klass.clip = Some(aggregator_clip::<T>);
|
||||
klass.finish_buffer = Some(aggregator_finish_buffer::<T>);
|
||||
klass.sink_event = Some(aggregator_sink_event::<T>);
|
||||
klass.sink_query = Some(aggregator_sink_query::<T>);
|
||||
klass.src_event = Some(aggregator_src_event::<T>);
|
||||
klass.src_query = Some(aggregator_src_query::<T>);
|
||||
klass.src_activate = Some(aggregator_src_activate::<T>);
|
||||
klass.aggregate = Some(aggregator_aggregate::<T>);
|
||||
klass.start = Some(aggregator_start::<T>);
|
||||
klass.stop = Some(aggregator_stop::<T>);
|
||||
klass.get_next_time = Some(aggregator_get_next_time::<T>);
|
||||
klass.create_new_pad = Some(aggregator_create_new_pad::<T>);
|
||||
klass.update_src_caps = Some(aggregator_update_src_caps::<T>);
|
||||
klass.fixate_src_caps = Some(aggregator_fixate_src_caps::<T>);
|
||||
klass.negotiated_src_caps = Some(aggregator_negotiated_src_caps::<T>);
|
||||
#[cfg(any(feature = "v1_18", feature = "dox"))]
|
||||
{
|
||||
klass.sink_event_pre_queue = Some(aggregator_sink_event_pre_queue::<T>);
|
||||
klass.sink_query_pre_queue = Some(aggregator_sink_query_pre_queue::<T>);
|
||||
klass.negotiate = Some(aggregator_negotiate::<T>);
|
||||
klass.peek_next_sample = Some(aggregator_peek_next_sample::<T>);
|
||||
klass.finish_buffer_list = Some(aggregator_finish_buffer_list::<T>);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,11 +102,9 @@ impl<T: AggregatorPadImpl> AggregatorPadImplExt for T {
|
|||
unsafe impl<T: AggregatorPadImpl> IsSubclassable<T> for AggregatorPad {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Pad as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_base_sys::GstAggregatorPadClass);
|
||||
klass.flush = Some(aggregator_pad_flush::<T>);
|
||||
klass.skip_buffer = Some(aggregator_pad_skip_buffer::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.flush = Some(aggregator_pad_flush::<T>);
|
||||
klass.skip_buffer = Some(aggregator_pad_skip_buffer::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -220,14 +220,12 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_base_sys::GstBaseParseClass);
|
||||
klass.start = Some(base_parse_start::<T>);
|
||||
klass.stop = Some(base_parse_stop::<T>);
|
||||
klass.set_sink_caps = Some(base_parse_set_sink_caps::<T>);
|
||||
klass.handle_frame = Some(base_parse_handle_frame::<T>);
|
||||
klass.convert = Some(base_parse_convert::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.start = Some(base_parse_start::<T>);
|
||||
klass.stop = Some(base_parse_stop::<T>);
|
||||
klass.set_sink_caps = Some(base_parse_set_sink_caps::<T>);
|
||||
klass.handle_frame = Some(base_parse_handle_frame::<T>);
|
||||
klass.convert = Some(base_parse_convert::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -386,22 +386,20 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_base_sys::GstBaseSinkClass);
|
||||
klass.start = Some(base_sink_start::<T>);
|
||||
klass.stop = Some(base_sink_stop::<T>);
|
||||
klass.render = Some(base_sink_render::<T>);
|
||||
klass.render_list = Some(base_sink_render_list::<T>);
|
||||
klass.prepare = Some(base_sink_prepare::<T>);
|
||||
klass.prepare_list = Some(base_sink_prepare_list::<T>);
|
||||
klass.query = Some(base_sink_query::<T>);
|
||||
klass.event = Some(base_sink_event::<T>);
|
||||
klass.get_caps = Some(base_sink_get_caps::<T>);
|
||||
klass.set_caps = Some(base_sink_set_caps::<T>);
|
||||
klass.fixate = Some(base_sink_fixate::<T>);
|
||||
klass.unlock = Some(base_sink_unlock::<T>);
|
||||
klass.unlock_stop = Some(base_sink_unlock_stop::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.start = Some(base_sink_start::<T>);
|
||||
klass.stop = Some(base_sink_stop::<T>);
|
||||
klass.render = Some(base_sink_render::<T>);
|
||||
klass.render_list = Some(base_sink_render_list::<T>);
|
||||
klass.prepare = Some(base_sink_prepare::<T>);
|
||||
klass.prepare_list = Some(base_sink_prepare_list::<T>);
|
||||
klass.query = Some(base_sink_query::<T>);
|
||||
klass.event = Some(base_sink_event::<T>);
|
||||
klass.get_caps = Some(base_sink_get_caps::<T>);
|
||||
klass.set_caps = Some(base_sink_set_caps::<T>);
|
||||
klass.fixate = Some(base_sink_fixate::<T>);
|
||||
klass.unlock = Some(base_sink_unlock::<T>);
|
||||
klass.unlock_stop = Some(base_sink_unlock_stop::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -575,26 +575,24 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_base_sys::GstBaseSrcClass);
|
||||
klass.start = Some(base_src_start::<T>);
|
||||
klass.stop = Some(base_src_stop::<T>);
|
||||
klass.is_seekable = Some(base_src_is_seekable::<T>);
|
||||
klass.get_size = Some(base_src_get_size::<T>);
|
||||
klass.get_times = Some(base_src_get_times::<T>);
|
||||
klass.fill = Some(base_src_fill::<T>);
|
||||
klass.alloc = Some(base_src_alloc::<T>);
|
||||
klass.create = Some(base_src_create::<T>);
|
||||
klass.do_seek = Some(base_src_do_seek::<T>);
|
||||
klass.query = Some(base_src_query::<T>);
|
||||
klass.event = Some(base_src_event::<T>);
|
||||
klass.get_caps = Some(base_src_get_caps::<T>);
|
||||
klass.negotiate = Some(base_src_negotiate::<T>);
|
||||
klass.set_caps = Some(base_src_set_caps::<T>);
|
||||
klass.fixate = Some(base_src_fixate::<T>);
|
||||
klass.unlock = Some(base_src_unlock::<T>);
|
||||
klass.unlock_stop = Some(base_src_unlock_stop::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.start = Some(base_src_start::<T>);
|
||||
klass.stop = Some(base_src_stop::<T>);
|
||||
klass.is_seekable = Some(base_src_is_seekable::<T>);
|
||||
klass.get_size = Some(base_src_get_size::<T>);
|
||||
klass.get_times = Some(base_src_get_times::<T>);
|
||||
klass.fill = Some(base_src_fill::<T>);
|
||||
klass.alloc = Some(base_src_alloc::<T>);
|
||||
klass.create = Some(base_src_create::<T>);
|
||||
klass.do_seek = Some(base_src_do_seek::<T>);
|
||||
klass.query = Some(base_src_query::<T>);
|
||||
klass.event = Some(base_src_event::<T>);
|
||||
klass.get_caps = Some(base_src_get_caps::<T>);
|
||||
klass.negotiate = Some(base_src_negotiate::<T>);
|
||||
klass.set_caps = Some(base_src_set_caps::<T>);
|
||||
klass.fixate = Some(base_src_fixate::<T>);
|
||||
klass.unlock = Some(base_src_unlock::<T>);
|
||||
klass.unlock_stop = Some(base_src_unlock_stop::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -832,26 +832,24 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_base_sys::GstBaseTransformClass);
|
||||
klass.start = Some(base_transform_start::<T>);
|
||||
klass.stop = Some(base_transform_stop::<T>);
|
||||
klass.transform_caps = Some(base_transform_transform_caps::<T>);
|
||||
klass.fixate_caps = Some(base_transform_fixate_caps::<T>);
|
||||
klass.set_caps = Some(base_transform_set_caps::<T>);
|
||||
klass.accept_caps = Some(base_transform_accept_caps::<T>);
|
||||
klass.query = Some(base_transform_query::<T>);
|
||||
klass.transform_size = Some(base_transform_transform_size::<T>);
|
||||
klass.get_unit_size = Some(base_transform_get_unit_size::<T>);
|
||||
klass.prepare_output_buffer = Some(base_transform_prepare_output_buffer::<T>);
|
||||
klass.sink_event = Some(base_transform_sink_event::<T>);
|
||||
klass.src_event = Some(base_transform_src_event::<T>);
|
||||
klass.transform_meta = Some(base_transform_transform_meta::<T>);
|
||||
klass.copy_metadata = Some(base_transform_copy_metadata::<T>);
|
||||
klass.before_transform = Some(base_transform_before_transform::<T>);
|
||||
klass.submit_input_buffer = Some(base_transform_submit_input_buffer::<T>);
|
||||
klass.generate_output = Some(base_transform_generate_output::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.start = Some(base_transform_start::<T>);
|
||||
klass.stop = Some(base_transform_stop::<T>);
|
||||
klass.transform_caps = Some(base_transform_transform_caps::<T>);
|
||||
klass.fixate_caps = Some(base_transform_fixate_caps::<T>);
|
||||
klass.set_caps = Some(base_transform_set_caps::<T>);
|
||||
klass.accept_caps = Some(base_transform_accept_caps::<T>);
|
||||
klass.query = Some(base_transform_query::<T>);
|
||||
klass.transform_size = Some(base_transform_transform_size::<T>);
|
||||
klass.get_unit_size = Some(base_transform_get_unit_size::<T>);
|
||||
klass.prepare_output_buffer = Some(base_transform_prepare_output_buffer::<T>);
|
||||
klass.sink_event = Some(base_transform_sink_event::<T>);
|
||||
klass.src_event = Some(base_transform_src_event::<T>);
|
||||
klass.transform_meta = Some(base_transform_transform_meta::<T>);
|
||||
klass.copy_metadata = Some(base_transform_copy_metadata::<T>);
|
||||
klass.before_transform = Some(base_transform_before_transform::<T>);
|
||||
klass.submit_input_buffer = Some(base_transform_submit_input_buffer::<T>);
|
||||
klass.generate_output = Some(base_transform_generate_output::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -119,12 +119,10 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<::BaseSrc as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_base_sys::GstPushSrcClass);
|
||||
klass.fill = Some(push_src_fill::<T>);
|
||||
klass.alloc = Some(push_src_alloc::<T>);
|
||||
klass.create = Some(push_src_create::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.fill = Some(push_src_fill::<T>);
|
||||
klass.alloc = Some(push_src_alloc::<T>);
|
||||
klass.create = Some(push_src_create::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -795,39 +795,37 @@ impl<T: RTSPClientImpl> RTSPClientImplExt for T {
|
|||
unsafe impl<T: RTSPClientImpl> IsSubclassable<T> for RTSPClient {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_rtsp_server_sys::GstRTSPClientClass);
|
||||
klass.create_sdp = Some(client_create_sdp::<T>);
|
||||
klass.configure_client_media = Some(client_configure_client_media::<T>);
|
||||
klass.params_set = Some(client_params_set::<T>);
|
||||
klass.params_get = Some(client_params_get::<T>);
|
||||
klass.make_path_from_uri = Some(client_make_path_from_uri::<T>);
|
||||
klass.closed = Some(client_closed::<T>);
|
||||
klass.new_session = Some(client_new_session::<T>);
|
||||
klass.options_request = Some(client_options_request::<T>);
|
||||
klass.describe_request = Some(client_describe_request::<T>);
|
||||
klass.setup_request = Some(client_setup_request::<T>);
|
||||
klass.play_request = Some(client_play_request::<T>);
|
||||
klass.pause_request = Some(client_pause_request::<T>);
|
||||
klass.teardown_request = Some(client_teardown_request::<T>);
|
||||
klass.set_parameter_request = Some(client_set_parameter_request::<T>);
|
||||
klass.get_parameter_request = Some(client_get_parameter_request::<T>);
|
||||
klass.announce_request = Some(client_announce_request::<T>);
|
||||
klass.record_request = Some(client_record_request::<T>);
|
||||
klass.handle_response = Some(client_handle_response::<T>);
|
||||
klass.handle_sdp = Some(client_handle_sdp::<T>);
|
||||
klass.check_requirements = Some(client_check_requirements::<T>);
|
||||
klass.pre_options_request = Some(client_pre_options_request::<T>);
|
||||
klass.pre_describe_request = Some(client_pre_describe_request::<T>);
|
||||
klass.pre_setup_request = Some(client_pre_setup_request::<T>);
|
||||
klass.pre_play_request = Some(client_pre_play_request::<T>);
|
||||
klass.pre_pause_request = Some(client_pre_pause_request::<T>);
|
||||
klass.pre_teardown_request = Some(client_pre_teardown_request::<T>);
|
||||
klass.pre_set_parameter_request = Some(client_pre_set_parameter_request::<T>);
|
||||
klass.pre_get_parameter_request = Some(client_pre_get_parameter_request::<T>);
|
||||
klass.pre_announce_request = Some(client_pre_announce_request::<T>);
|
||||
klass.pre_record_request = Some(client_pre_record_request::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.create_sdp = Some(client_create_sdp::<T>);
|
||||
klass.configure_client_media = Some(client_configure_client_media::<T>);
|
||||
klass.params_set = Some(client_params_set::<T>);
|
||||
klass.params_get = Some(client_params_get::<T>);
|
||||
klass.make_path_from_uri = Some(client_make_path_from_uri::<T>);
|
||||
klass.closed = Some(client_closed::<T>);
|
||||
klass.new_session = Some(client_new_session::<T>);
|
||||
klass.options_request = Some(client_options_request::<T>);
|
||||
klass.describe_request = Some(client_describe_request::<T>);
|
||||
klass.setup_request = Some(client_setup_request::<T>);
|
||||
klass.play_request = Some(client_play_request::<T>);
|
||||
klass.pause_request = Some(client_pause_request::<T>);
|
||||
klass.teardown_request = Some(client_teardown_request::<T>);
|
||||
klass.set_parameter_request = Some(client_set_parameter_request::<T>);
|
||||
klass.get_parameter_request = Some(client_get_parameter_request::<T>);
|
||||
klass.announce_request = Some(client_announce_request::<T>);
|
||||
klass.record_request = Some(client_record_request::<T>);
|
||||
klass.handle_response = Some(client_handle_response::<T>);
|
||||
klass.handle_sdp = Some(client_handle_sdp::<T>);
|
||||
klass.check_requirements = Some(client_check_requirements::<T>);
|
||||
klass.pre_options_request = Some(client_pre_options_request::<T>);
|
||||
klass.pre_describe_request = Some(client_pre_describe_request::<T>);
|
||||
klass.pre_setup_request = Some(client_pre_setup_request::<T>);
|
||||
klass.pre_play_request = Some(client_pre_play_request::<T>);
|
||||
klass.pre_pause_request = Some(client_pre_pause_request::<T>);
|
||||
klass.pre_teardown_request = Some(client_pre_teardown_request::<T>);
|
||||
klass.pre_set_parameter_request = Some(client_pre_set_parameter_request::<T>);
|
||||
klass.pre_get_parameter_request = Some(client_pre_get_parameter_request::<T>);
|
||||
klass.pre_announce_request = Some(client_pre_announce_request::<T>);
|
||||
klass.pre_record_request = Some(client_pre_record_request::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -451,26 +451,24 @@ impl<T: RTSPMediaImpl> RTSPMediaImplExt for T {
|
|||
unsafe impl<T: RTSPMediaImpl> IsSubclassable<T> for RTSPMedia {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_rtsp_server_sys::GstRTSPMediaClass);
|
||||
klass.handle_message = Some(media_handle_message::<T>);
|
||||
klass.prepare = Some(media_prepare::<T>);
|
||||
klass.unprepare = Some(media_unprepare::<T>);
|
||||
klass.suspend = Some(media_suspend::<T>);
|
||||
klass.unsuspend = Some(media_unsuspend::<T>);
|
||||
klass.query_position = Some(media_query_position::<T>);
|
||||
klass.query_stop = Some(media_query_stop::<T>);
|
||||
klass.create_rtpbin = Some(media_create_rtpbin::<T>);
|
||||
klass.setup_rtpbin = Some(media_setup_rtpbin::<T>);
|
||||
klass.setup_sdp = Some(media_setup_sdp::<T>);
|
||||
klass.new_stream = Some(media_new_stream::<T>);
|
||||
klass.removed_stream = Some(media_removed_stream::<T>);
|
||||
klass.prepared = Some(media_prepared::<T>);
|
||||
klass.unprepared = Some(media_unprepared::<T>);
|
||||
klass.target_state = Some(media_target_state::<T>);
|
||||
klass.new_state = Some(media_new_state::<T>);
|
||||
klass.handle_sdp = Some(media_handle_sdp::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.handle_message = Some(media_handle_message::<T>);
|
||||
klass.prepare = Some(media_prepare::<T>);
|
||||
klass.unprepare = Some(media_unprepare::<T>);
|
||||
klass.suspend = Some(media_suspend::<T>);
|
||||
klass.unsuspend = Some(media_unsuspend::<T>);
|
||||
klass.query_position = Some(media_query_position::<T>);
|
||||
klass.query_stop = Some(media_query_stop::<T>);
|
||||
klass.create_rtpbin = Some(media_create_rtpbin::<T>);
|
||||
klass.setup_rtpbin = Some(media_setup_rtpbin::<T>);
|
||||
klass.setup_sdp = Some(media_setup_sdp::<T>);
|
||||
klass.new_stream = Some(media_new_stream::<T>);
|
||||
klass.removed_stream = Some(media_removed_stream::<T>);
|
||||
klass.prepared = Some(media_prepared::<T>);
|
||||
klass.unprepared = Some(media_unprepared::<T>);
|
||||
klass.target_state = Some(media_target_state::<T>);
|
||||
klass.new_state = Some(media_new_state::<T>);
|
||||
klass.handle_sdp = Some(media_handle_sdp::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -204,17 +204,14 @@ impl<T: RTSPMediaFactoryImpl> RTSPMediaFactoryImplExt for T {
|
|||
unsafe impl<T: RTSPMediaFactoryImpl> IsSubclassable<T> for RTSPMediaFactory {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass =
|
||||
&mut *(klass.as_mut() as *mut gst_rtsp_server_sys::GstRTSPMediaFactoryClass);
|
||||
klass.gen_key = Some(factory_gen_key::<T>);
|
||||
klass.create_element = Some(factory_create_element::<T>);
|
||||
klass.construct = Some(factory_construct::<T>);
|
||||
klass.create_pipeline = Some(factory_create_pipeline::<T>);
|
||||
klass.configure = Some(factory_configure::<T>);
|
||||
klass.media_constructed = Some(factory_media_constructed::<T>);
|
||||
klass.media_configure = Some(factory_media_configure::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.gen_key = Some(factory_gen_key::<T>);
|
||||
klass.create_element = Some(factory_create_element::<T>);
|
||||
klass.construct = Some(factory_construct::<T>);
|
||||
klass.create_pipeline = Some(factory_create_pipeline::<T>);
|
||||
klass.configure = Some(factory_configure::<T>);
|
||||
klass.media_constructed = Some(factory_media_constructed::<T>);
|
||||
klass.media_configure = Some(factory_media_configure::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,11 +56,9 @@ impl<T: RTSPServerImpl> RTSPServerImplExt for T {
|
|||
unsafe impl<T: RTSPServerImpl> IsSubclassable<T> for RTSPServer {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_rtsp_server_sys::GstRTSPServerClass);
|
||||
klass.create_client = Some(server_create_client::<T>);
|
||||
klass.client_connected = Some(server_client_connected::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.create_client = Some(server_create_client::<T>);
|
||||
klass.client_connected = Some(server_client_connected::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -504,27 +504,25 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_video_sys::GstVideoDecoderClass);
|
||||
klass.open = Some(video_decoder_open::<T>);
|
||||
klass.close = Some(video_decoder_close::<T>);
|
||||
klass.start = Some(video_decoder_start::<T>);
|
||||
klass.stop = Some(video_decoder_stop::<T>);
|
||||
klass.finish = Some(video_decoder_finish::<T>);
|
||||
klass.drain = Some(video_decoder_drain::<T>);
|
||||
klass.set_format = Some(video_decoder_set_format::<T>);
|
||||
klass.parse = Some(video_decoder_parse::<T>);
|
||||
klass.handle_frame = Some(video_decoder_handle_frame::<T>);
|
||||
klass.flush = Some(video_decoder_flush::<T>);
|
||||
klass.negotiate = Some(video_decoder_negotiate::<T>);
|
||||
klass.getcaps = Some(video_decoder_getcaps::<T>);
|
||||
klass.sink_event = Some(video_decoder_sink_event::<T>);
|
||||
klass.src_event = Some(video_decoder_src_event::<T>);
|
||||
klass.sink_query = Some(video_decoder_sink_query::<T>);
|
||||
klass.src_query = Some(video_decoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(video_decoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(video_decoder_decide_allocation::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.open = Some(video_decoder_open::<T>);
|
||||
klass.close = Some(video_decoder_close::<T>);
|
||||
klass.start = Some(video_decoder_start::<T>);
|
||||
klass.stop = Some(video_decoder_stop::<T>);
|
||||
klass.finish = Some(video_decoder_finish::<T>);
|
||||
klass.drain = Some(video_decoder_drain::<T>);
|
||||
klass.set_format = Some(video_decoder_set_format::<T>);
|
||||
klass.parse = Some(video_decoder_parse::<T>);
|
||||
klass.handle_frame = Some(video_decoder_handle_frame::<T>);
|
||||
klass.flush = Some(video_decoder_flush::<T>);
|
||||
klass.negotiate = Some(video_decoder_negotiate::<T>);
|
||||
klass.getcaps = Some(video_decoder_getcaps::<T>);
|
||||
klass.sink_event = Some(video_decoder_sink_event::<T>);
|
||||
klass.src_event = Some(video_decoder_src_event::<T>);
|
||||
klass.sink_query = Some(video_decoder_sink_query::<T>);
|
||||
klass.src_query = Some(video_decoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(video_decoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(video_decoder_decide_allocation::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -440,25 +440,23 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_video_sys::GstVideoEncoderClass);
|
||||
klass.open = Some(video_encoder_open::<T>);
|
||||
klass.close = Some(video_encoder_close::<T>);
|
||||
klass.start = Some(video_encoder_start::<T>);
|
||||
klass.stop = Some(video_encoder_stop::<T>);
|
||||
klass.finish = Some(video_encoder_finish::<T>);
|
||||
klass.set_format = Some(video_encoder_set_format::<T>);
|
||||
klass.handle_frame = Some(video_encoder_handle_frame::<T>);
|
||||
klass.flush = Some(video_encoder_flush::<T>);
|
||||
klass.negotiate = Some(video_encoder_negotiate::<T>);
|
||||
klass.getcaps = Some(video_encoder_getcaps::<T>);
|
||||
klass.sink_event = Some(video_encoder_sink_event::<T>);
|
||||
klass.src_event = Some(video_encoder_src_event::<T>);
|
||||
klass.sink_query = Some(video_encoder_sink_query::<T>);
|
||||
klass.src_query = Some(video_encoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(video_encoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(video_encoder_decide_allocation::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.open = Some(video_encoder_open::<T>);
|
||||
klass.close = Some(video_encoder_close::<T>);
|
||||
klass.start = Some(video_encoder_start::<T>);
|
||||
klass.stop = Some(video_encoder_stop::<T>);
|
||||
klass.finish = Some(video_encoder_finish::<T>);
|
||||
klass.set_format = Some(video_encoder_set_format::<T>);
|
||||
klass.handle_frame = Some(video_encoder_handle_frame::<T>);
|
||||
klass.flush = Some(video_encoder_flush::<T>);
|
||||
klass.negotiate = Some(video_encoder_negotiate::<T>);
|
||||
klass.getcaps = Some(video_encoder_getcaps::<T>);
|
||||
klass.sink_event = Some(video_encoder_sink_event::<T>);
|
||||
klass.src_event = Some(video_encoder_src_event::<T>);
|
||||
klass.sink_query = Some(video_encoder_sink_query::<T>);
|
||||
klass.src_query = Some(video_encoder_src_query::<T>);
|
||||
klass.propose_allocation = Some(video_encoder_propose_allocation::<T>);
|
||||
klass.decide_allocation = Some(video_encoder_decide_allocation::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,10 +63,8 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<gst_base::BaseSink as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_video_sys::GstVideoSinkClass);
|
||||
klass.show_frame = Some(video_sink_show_frame::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.show_frame = Some(video_sink_show_frame::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -92,12 +92,10 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<::Element as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_sys::GstBinClass);
|
||||
klass.add_element = Some(bin_add_element::<T>);
|
||||
klass.remove_element = Some(bin_remove_element::<T>);
|
||||
klass.handle_message = Some(bin_handle_message::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.add_element = Some(bin_add_element::<T>);
|
||||
klass.remove_element = Some(bin_remove_element::<T>);
|
||||
klass.handle_message = Some(bin_handle_message::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -235,16 +235,13 @@ impl<T: ClockImpl> ClockImplExt for T {
|
|||
unsafe impl<T: ClockImpl> IsSubclassable<T> for Clock {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_sys::GstClockClass);
|
||||
klass.change_resolution = Some(clock_change_resolution::<T>);
|
||||
klass.get_resolution = Some(clock_get_resolution::<T>);
|
||||
klass.get_internal_time = Some(clock_get_internal_time::<T>);
|
||||
klass.wait = Some(clock_wait::<T>);
|
||||
klass.wait_async = Some(clock_wait_async::<T>);
|
||||
klass.unschedule = Some(clock_unschedule::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.change_resolution = Some(clock_change_resolution::<T>);
|
||||
klass.get_resolution = Some(clock_get_resolution::<T>);
|
||||
klass.get_internal_time = Some(clock_get_internal_time::<T>);
|
||||
klass.wait = Some(clock_wait::<T>);
|
||||
klass.wait_async = Some(clock_wait_async::<T>);
|
||||
klass.unschedule = Some(clock_unschedule::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,11 +101,9 @@ impl<T: DeviceImpl> DeviceImplExt for T {
|
|||
unsafe impl<T: DeviceImpl> IsSubclassable<T> for Device {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_sys::GstDeviceClass);
|
||||
klass.create_element = Some(device_create_element::<T>);
|
||||
klass.reconfigure_element = Some(device_reconfigure_element::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.create_element = Some(device_create_element::<T>);
|
||||
klass.reconfigure_element = Some(device_reconfigure_element::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -117,12 +117,10 @@ unsafe impl DeviceProviderClassSubclassExt for DeviceProviderClass {}
|
|||
unsafe impl<T: DeviceProviderImpl> IsSubclassable<T> for DeviceProvider {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_sys::GstDeviceProviderClass);
|
||||
klass.probe = Some(device_provider_probe::<T>);
|
||||
klass.start = Some(device_provider_start::<T>);
|
||||
klass.stop = Some(device_provider_stop::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.probe = Some(device_provider_probe::<T>);
|
||||
klass.start = Some(device_provider_start::<T>);
|
||||
klass.stop = Some(device_provider_stop::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -344,19 +344,16 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_sys::GstElementClass);
|
||||
klass.change_state = Some(element_change_state::<T>);
|
||||
klass.request_new_pad = Some(element_request_new_pad::<T>);
|
||||
klass.release_pad = Some(element_release_pad::<T>);
|
||||
klass.send_event = Some(element_send_event::<T>);
|
||||
klass.query = Some(element_query::<T>);
|
||||
klass.set_context = Some(element_set_context::<T>);
|
||||
klass.set_clock = Some(element_set_clock::<T>);
|
||||
klass.provide_clock = Some(element_provide_clock::<T>);
|
||||
klass.post_message = Some(element_post_message::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.change_state = Some(element_change_state::<T>);
|
||||
klass.request_new_pad = Some(element_request_new_pad::<T>);
|
||||
klass.release_pad = Some(element_release_pad::<T>);
|
||||
klass.send_event = Some(element_send_event::<T>);
|
||||
klass.query = Some(element_query::<T>);
|
||||
klass.set_context = Some(element_set_context::<T>);
|
||||
klass.set_clock = Some(element_set_clock::<T>);
|
||||
klass.provide_clock = Some(element_provide_clock::<T>);
|
||||
klass.post_message = Some(element_post_message::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use gst_sys;
|
||||
|
||||
use super::prelude::*;
|
||||
use glib::subclass::prelude::*;
|
||||
|
||||
|
@ -18,9 +16,7 @@ pub trait GhostPadImpl: PadImpl {}
|
|||
unsafe impl<T: GhostPadImpl> IsSubclassable<T> for GhostPad {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<::Pad as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let _klass = &mut *(klass.as_mut() as *mut gst_sys::GstGhostPadClass);
|
||||
// Nothing to do here
|
||||
}
|
||||
let _klass = klass.as_mut();
|
||||
// Nothing to do here
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,12 +60,9 @@ impl<T: PadImpl> PadImplExt for T {
|
|||
unsafe impl<T: PadImpl> IsSubclassable<T> for Pad {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<glib::Object as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
|
||||
unsafe {
|
||||
let klass = &mut *(klass.as_mut() as *mut gst_sys::GstPadClass);
|
||||
klass.linked = Some(pad_linked::<T>);
|
||||
klass.unlinked = Some(pad_unlinked::<T>);
|
||||
}
|
||||
let klass = klass.as_mut();
|
||||
klass.linked = Some(pad_linked::<T>);
|
||||
klass.unlinked = Some(pad_unlinked::<T>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use gst_sys;
|
||||
|
||||
use super::prelude::*;
|
||||
use glib::subclass::prelude::*;
|
||||
|
||||
|
@ -21,9 +19,7 @@ where
|
|||
{
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<::Bin as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let _klass = &mut *(klass.as_mut() as *mut gst_sys::GstPipelineClass);
|
||||
// Nothing to do here
|
||||
}
|
||||
let _klass = klass.as_mut();
|
||||
// Nothing to do here
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use gst_sys;
|
||||
|
||||
use super::prelude::*;
|
||||
use glib::subclass::prelude::*;
|
||||
|
||||
|
@ -18,9 +16,7 @@ pub trait SystemClockImpl: ClockImpl {}
|
|||
unsafe impl<T: SystemClockImpl> IsSubclassable<T> for SystemClock {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
<::Clock as IsSubclassable<T>>::override_vfuncs(klass);
|
||||
unsafe {
|
||||
let _klass = &mut *(klass.as_mut() as *mut gst_sys::GstSystemClockClass);
|
||||
// Nothing to do here
|
||||
}
|
||||
let _klass = klass.as_mut();
|
||||
// Nothing to do here
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue