mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-30 14:00:29 +00:00
fix-getters-def 0.3.0 pass
This commit is contained in:
parent
e0b577fe1d
commit
27bc5c89ca
47 changed files with 77 additions and 85 deletions
|
@ -166,7 +166,7 @@ impl ObjectImpl for AudioEcho {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"max-delay" => {
|
"max-delay" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -1831,7 +1831,7 @@ impl ObjectImpl for AudioLoudNorm {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"loudness-target" => {
|
"loudness-target" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -223,7 +223,7 @@ impl ObjectImpl for EbuR128Level {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"mode" => settings.mode.to_value(),
|
"mode" => settings.mode.to_value(),
|
||||||
|
|
|
@ -375,7 +375,7 @@ impl AudioDepth {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_claxon_streaminfo(indata: &[u8]) -> Result<claxon::metadata::StreamInfo, &'static str> {
|
fn claxon_streaminfo(indata: &[u8]) -> Result<claxon::metadata::StreamInfo, &'static str> {
|
||||||
let mut cursor = Cursor::new(indata);
|
let mut cursor = Cursor::new(indata);
|
||||||
let mut metadata_iter = claxon::metadata::MetadataBlockReader::new(&mut cursor);
|
let mut metadata_iter = claxon::metadata::MetadataBlockReader::new(&mut cursor);
|
||||||
let streaminfo = match metadata_iter.next() {
|
let streaminfo = match metadata_iter.next() {
|
||||||
|
@ -388,9 +388,7 @@ fn get_claxon_streaminfo(indata: &[u8]) -> Result<claxon::metadata::StreamInfo,
|
||||||
Ok(streaminfo)
|
Ok(streaminfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_gstaudioinfo(
|
fn gstaudioinfo(streaminfo: claxon::metadata::StreamInfo) -> Result<gst_audio::AudioInfo, String> {
|
||||||
streaminfo: claxon::metadata::StreamInfo,
|
|
||||||
) -> Result<gst_audio::AudioInfo, String> {
|
|
||||||
let format = match streaminfo.bits_per_sample {
|
let format = match streaminfo.bits_per_sample {
|
||||||
8 => gst_audio::AudioFormat::S8,
|
8 => gst_audio::AudioFormat::S8,
|
||||||
16 => gst_audio::AUDIO_FORMAT_S16,
|
16 => gst_audio::AUDIO_FORMAT_S16,
|
||||||
|
|
|
@ -88,7 +88,7 @@ impl State {
|
||||||
in_process_samples * self.out_info.bpf() as usize
|
in_process_samples * self.out_info.bpf() as usize
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_bytes_to_read(&mut self, output_size: usize) -> usize {
|
fn bytes_to_read(&mut self, output_size: usize) -> usize {
|
||||||
// The max amount of bytes at the input that We would need
|
// The max amount of bytes at the input that We would need
|
||||||
// for filling an output buffer of size *output_size*
|
// for filling an output buffer of size *output_size*
|
||||||
(output_size / self.out_info.bpf() as usize) * self.in_info.bpf() as usize
|
(output_size / self.out_info.bpf() as usize) * self.in_info.bpf() as usize
|
||||||
|
@ -418,7 +418,7 @@ impl ObjectImpl for CsoundFilter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"loop" => {
|
"loop" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -153,7 +153,7 @@ impl ObjectImpl for FileSink {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"location" => {
|
"location" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -292,11 +292,11 @@ impl BaseSinkImpl for FileSink {
|
||||||
impl URIHandlerImpl for FileSink {
|
impl URIHandlerImpl for FileSink {
|
||||||
const URI_TYPE: gst::URIType = gst::URIType::Sink;
|
const URI_TYPE: gst::URIType = gst::URIType::Sink;
|
||||||
|
|
||||||
fn get_protocols() -> &'static [&'static str] {
|
fn protocols() -> &'static [&'static str] {
|
||||||
&["file"]
|
&["file"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_uri(&self, _element: &Self::Type) -> Option<String> {
|
fn uri(&self, _element: &Self::Type) -> Option<String> {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
||||||
// Conversion to Url already checked while building the `FileLocation`
|
// Conversion to Url already checked while building the `FileLocation`
|
||||||
|
|
|
@ -167,7 +167,7 @@ impl ObjectImpl for FileSrc {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"location" => {
|
"location" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -226,7 +226,7 @@ impl BaseSrcImpl for FileSrc {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_size(&self, _src: &Self::Type) -> Option<u64> {
|
fn size(&self, _src: &Self::Type) -> Option<u64> {
|
||||||
let state = self.state.lock().unwrap();
|
let state = self.state.lock().unwrap();
|
||||||
if let State::Started { ref file, .. } = *state {
|
if let State::Started { ref file, .. } = *state {
|
||||||
file.metadata().ok().map(|m| m.len())
|
file.metadata().ok().map(|m| m.len())
|
||||||
|
@ -345,11 +345,11 @@ impl BaseSrcImpl for FileSrc {
|
||||||
impl URIHandlerImpl for FileSrc {
|
impl URIHandlerImpl for FileSrc {
|
||||||
const URI_TYPE: gst::URIType = gst::URIType::Src;
|
const URI_TYPE: gst::URIType = gst::URIType::Src;
|
||||||
|
|
||||||
fn get_protocols() -> &'static [&'static str] {
|
fn protocols() -> &'static [&'static str] {
|
||||||
&["file"]
|
&["file"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_uri(&self, _element: &Self::Type) -> Option<String> {
|
fn uri(&self, _element: &Self::Type) -> Option<String> {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
||||||
// Conversion to Url already checked while building the `FileLocation`
|
// Conversion to Url already checked while building the `FileLocation`
|
||||||
|
|
|
@ -141,7 +141,7 @@ impl State {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Retrieve the requested buffer out of the adapter.
|
// Retrieve the requested buffer out of the adapter.
|
||||||
fn get_requested_buffer(
|
fn requested_buffer(
|
||||||
&mut self,
|
&mut self,
|
||||||
pad: &gst::Pad,
|
pad: &gst::Pad,
|
||||||
buffer: Option<&mut gst::BufferRef>,
|
buffer: Option<&mut gst::BufferRef>,
|
||||||
|
@ -496,7 +496,7 @@ impl Decrypter {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_range(
|
fn range(
|
||||||
&self,
|
&self,
|
||||||
pad: &gst::Pad,
|
pad: &gst::Pad,
|
||||||
element: &super::Decrypter,
|
element: &super::Decrypter,
|
||||||
|
@ -651,7 +651,7 @@ impl ObjectImpl for Decrypter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"receiver-key" => {
|
"receiver-key" => {
|
||||||
let props = self.props.lock().unwrap();
|
let props = self.props.lock().unwrap();
|
||||||
|
|
|
@ -456,7 +456,7 @@ impl ObjectImpl for Encrypter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"receiver-key" => {
|
"receiver-key" => {
|
||||||
let props = self.props.lock().unwrap();
|
let props = self.props.lock().unwrap();
|
||||||
|
|
|
@ -646,7 +646,7 @@ impl ObjectImpl for AppSrc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"context" => settings.context.to_value(),
|
"context" => settings.context.to_value(),
|
||||||
|
|
|
@ -493,7 +493,7 @@ impl ObjectImpl for InputSelector {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"context" => {
|
"context" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -847,7 +847,7 @@ impl SrcHandler {
|
||||||
jb.src_pad.push(buffer).await
|
jb.src_pad.push(buffer).await
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_next_wakeup(
|
fn next_wakeup(
|
||||||
&self,
|
&self,
|
||||||
element: &super::JitterBuffer,
|
element: &super::JitterBuffer,
|
||||||
state: &State,
|
state: &State,
|
||||||
|
@ -1495,7 +1495,7 @@ impl ObjectImpl for JitterBuffer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"latency" => {
|
"latency" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -192,12 +192,12 @@ impl RTPPacketRateCtx {
|
||||||
unsafe { ffi::gst_rtp_packet_rate_ctx_update(&mut *self.0, seqnum, ts) }
|
unsafe { ffi::gst_rtp_packet_rate_ctx_update(&mut *self.0, seqnum, ts) }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_max_dropout(&mut self, time_ms: i32) -> u32 {
|
pub fn max_dropout(&mut self, time_ms: i32) -> u32 {
|
||||||
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_dropout(&mut *self.0, time_ms) }
|
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_dropout(&mut *self.0, time_ms) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
pub fn get_max_disorder(&mut self, time_ms: i32) -> u32 {
|
pub fn max_disorder(&mut self, time_ms: i32) -> u32 {
|
||||||
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_disorder(&mut *self.0, time_ms) }
|
unsafe { ffi::gst_rtp_packet_rate_ctx_get_max_disorder(&mut *self.0, time_ms) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -621,7 +621,7 @@ impl ObjectImpl for ProxySink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"proxy-context" => settings.proxy_context.to_value(),
|
"proxy-context" => settings.proxy_context.to_value(),
|
||||||
|
@ -1223,7 +1223,7 @@ impl ObjectImpl for ProxySrc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"max-size-buffers" => settings.max_size_buffers.to_value(),
|
"max-size-buffers" => settings.max_size_buffers.to_value(),
|
||||||
|
|
|
@ -798,7 +798,7 @@ impl ObjectImpl for Queue {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"max-size-buffers" => settings.max_size_buffers.to_value(),
|
"max-size-buffers" => settings.max_size_buffers.to_value(),
|
||||||
|
|
|
@ -657,7 +657,7 @@ impl ObjectImpl for TcpClientSrc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"host" => settings.host.to_value(),
|
"host" => settings.host.to_value(),
|
||||||
|
|
|
@ -1286,7 +1286,7 @@ impl ObjectImpl for UdpSink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"sync" => settings.sync.to_value(),
|
"sync" => settings.sync.to_value(),
|
||||||
|
|
|
@ -847,7 +847,7 @@ impl ObjectImpl for UdpSrc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"address" => settings.address.to_value(),
|
"address" => settings.address.to_value(),
|
||||||
|
|
|
@ -739,7 +739,7 @@ impl ObjectImpl for ReqwestHttpSrc {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"location" => {
|
"location" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -860,7 +860,7 @@ impl BaseSrcImpl for ReqwestHttpSrc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_size(&self, _src: &Self::Type) -> Option<u64> {
|
fn size(&self, _src: &Self::Type) -> Option<u64> {
|
||||||
match *self.state.lock().unwrap() {
|
match *self.state.lock().unwrap() {
|
||||||
State::Started { size, .. } => size,
|
State::Started { size, .. } => size,
|
||||||
_ => None,
|
_ => None,
|
||||||
|
@ -1096,11 +1096,11 @@ impl PushSrcImpl for ReqwestHttpSrc {
|
||||||
impl URIHandlerImpl for ReqwestHttpSrc {
|
impl URIHandlerImpl for ReqwestHttpSrc {
|
||||||
const URI_TYPE: gst::URIType = gst::URIType::Src;
|
const URI_TYPE: gst::URIType = gst::URIType::Src;
|
||||||
|
|
||||||
fn get_protocols() -> &'static [&'static str] {
|
fn protocols() -> &'static [&'static str] {
|
||||||
&["http", "https"]
|
&["http", "https"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_uri(&self, _element: &Self::Type) -> Option<String> {
|
fn uri(&self, _element: &Self::Type) -> Option<String> {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
||||||
settings.location.as_ref().map(Url::to_string)
|
settings.location.as_ref().map(Url::to_string)
|
||||||
|
|
|
@ -1091,7 +1091,7 @@ impl ObjectImpl for Transcriber {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"language-code" => {
|
"language-code" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -420,7 +420,7 @@ impl ObjectImpl for S3Sink {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
|
|
|
@ -240,7 +240,7 @@ impl ObjectImpl for S3Src {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"uri" => {
|
"uri" => {
|
||||||
let url = match *self.url.lock().unwrap() {
|
let url = match *self.url.lock().unwrap() {
|
||||||
|
@ -298,11 +298,11 @@ impl ElementImpl for S3Src {
|
||||||
impl URIHandlerImpl for S3Src {
|
impl URIHandlerImpl for S3Src {
|
||||||
const URI_TYPE: gst::URIType = gst::URIType::Src;
|
const URI_TYPE: gst::URIType = gst::URIType::Src;
|
||||||
|
|
||||||
fn get_protocols() -> &'static [&'static str] {
|
fn protocols() -> &'static [&'static str] {
|
||||||
&["s3"]
|
&["s3"]
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_uri(&self, _: &Self::Type) -> Option<String> {
|
fn uri(&self, _: &Self::Type) -> Option<String> {
|
||||||
self.url.lock().unwrap().as_ref().map(|s| s.to_string())
|
self.url.lock().unwrap().as_ref().map(|s| s.to_string())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ impl BaseSrcImpl for S3Src {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_size(&self, _: &Self::Type) -> Option<u64> {
|
fn size(&self, _: &Self::Type) -> Option<u64> {
|
||||||
match *self.state.lock().unwrap() {
|
match *self.state.lock().unwrap() {
|
||||||
StreamingState::Stopped => None,
|
StreamingState::Stopped => None,
|
||||||
StreamingState::Started { size, .. } => Some(size),
|
StreamingState::Started { size, .. } => Some(size),
|
||||||
|
|
|
@ -115,7 +115,7 @@ enum Line<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl State {
|
impl State {
|
||||||
fn get_line(&mut self, drain: bool) -> Result<Option<Line>, (&[u8], serde_json::Error)> {
|
fn line(&mut self, drain: bool) -> Result<Option<Line>, (&[u8], serde_json::Error)> {
|
||||||
let line = if self.replay_last_line {
|
let line = if self.replay_last_line {
|
||||||
self.replay_last_line = false;
|
self.replay_last_line = false;
|
||||||
&self.last_raw_line
|
&self.last_raw_line
|
||||||
|
|
|
@ -248,7 +248,7 @@ impl ObjectImpl for RegEx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"commands" => {
|
"commands" => {
|
||||||
let state = self.state.lock().unwrap();
|
let state = self.state.lock().unwrap();
|
||||||
|
|
|
@ -569,7 +569,7 @@ impl ObjectImpl for TextWrap {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"dictionary" => {
|
"dictionary" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -125,7 +125,7 @@ impl ObjectImpl for ProgressBin {
|
||||||
|
|
||||||
// Called whenever a value of a property is read. It can be called
|
// Called whenever a value of a property is read. It can be called
|
||||||
// at any time from any thread.
|
// at any time from any thread.
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"output" => {
|
"output" => {
|
||||||
let output_type = self.output_type.lock().unwrap();
|
let output_type = self.output_type.lock().unwrap();
|
||||||
|
|
|
@ -165,7 +165,7 @@ impl ObjectImpl for Rgb2Gray {
|
||||||
|
|
||||||
// Called whenever a value of a property is read. It can be called
|
// Called whenever a value of a property is read. It can be called
|
||||||
// at any time from any thread.
|
// at any time from any thread.
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"invert" => {
|
"invert" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -351,7 +351,7 @@ impl BaseTransformImpl for Rgb2Gray {
|
||||||
// Returns the size of one processing unit (i.e. a frame in our case) corresponding
|
// Returns the size of one processing unit (i.e. a frame in our case) corresponding
|
||||||
// to the given caps. This is used for allocating a big enough output buffer and
|
// to the given caps. This is used for allocating a big enough output buffer and
|
||||||
// sanity checking the input buffer size, among other things.
|
// sanity checking the input buffer size, among other things.
|
||||||
fn get_unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
|
fn unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
|
||||||
gst_video::VideoInfo::from_caps(caps)
|
gst_video::VideoInfo::from_caps(caps)
|
||||||
.map(|info| info.size())
|
.map(|info| info.size())
|
||||||
.ok()
|
.ok()
|
||||||
|
|
|
@ -303,7 +303,7 @@ impl ObjectImpl for SineSrc {
|
||||||
|
|
||||||
// Called whenever a value of a property is read. It can be called
|
// Called whenever a value of a property is read. It can be called
|
||||||
// at any time from any thread.
|
// at any time from any thread.
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"samples-per-buffer" => {
|
"samples-per-buffer" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -110,7 +110,7 @@ pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
|
||||||
self.parent_stop(aggregator)
|
self.parent_stop(aggregator)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_next_time(&self, aggregator: &Self::Type) -> gst::ClockTime {
|
fn next_time(&self, aggregator: &Self::Type) -> gst::ClockTime {
|
||||||
self.parent_get_next_time(aggregator)
|
self.parent_get_next_time(aggregator)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -439,7 +439,7 @@ impl ObjectImpl for FallbackSrc {
|
||||||
// Called whenever a value of a property is read. It can be called
|
// Called whenever a value of a property is read. It can be called
|
||||||
// at any time from any thread.
|
// at any time from any thread.
|
||||||
#[allow(clippy::blocks_in_if_conditions)]
|
#[allow(clippy::blocks_in_if_conditions)]
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"enable-audio" => {
|
"enable-audio" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -142,7 +142,7 @@ impl ObjectImpl for VideoFallbackSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"uri" => {
|
"uri" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -235,7 +235,7 @@ impl BinImpl for VideoFallbackSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl VideoFallbackSource {
|
impl VideoFallbackSource {
|
||||||
fn get_file_src_for_uri(
|
fn file_src_for_uri(
|
||||||
&self,
|
&self,
|
||||||
element: &super::VideoFallbackSource,
|
element: &super::VideoFallbackSource,
|
||||||
uri: Option<&str>,
|
uri: Option<&str>,
|
||||||
|
|
|
@ -123,7 +123,7 @@ impl Default for Settings {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl OutputState {
|
impl OutputState {
|
||||||
fn get_health(
|
fn health(
|
||||||
&self,
|
&self,
|
||||||
settings: &Settings,
|
settings: &Settings,
|
||||||
check_primary_pad: bool,
|
check_primary_pad: bool,
|
||||||
|
@ -360,7 +360,7 @@ impl FallbackSwitch {
|
||||||
Ok(Some((buffer, active_caps, pad_change)))
|
Ok(Some((buffer, active_caps, pad_change)))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_backup_buffer(
|
fn backup_buffer(
|
||||||
&self,
|
&self,
|
||||||
state: &mut OutputState,
|
state: &mut OutputState,
|
||||||
settings: &Settings,
|
settings: &Settings,
|
||||||
|
@ -477,7 +477,7 @@ impl FallbackSwitch {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::type_complexity)]
|
#[allow(clippy::type_complexity)]
|
||||||
fn get_next_buffer(
|
fn next_buffer(
|
||||||
&self,
|
&self,
|
||||||
agg: &super::FallbackSwitch,
|
agg: &super::FallbackSwitch,
|
||||||
timeout: bool,
|
timeout: bool,
|
||||||
|
@ -769,7 +769,7 @@ impl ObjectImpl for FallbackSwitch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"timeout" => {
|
"timeout" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -980,7 +980,7 @@ impl AggregatorImpl for FallbackSwitch {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_next_time(&self, agg: &Self::Type) -> gst::ClockTime {
|
fn next_time(&self, agg: &Self::Type) -> gst::ClockTime {
|
||||||
/* At each iteration, we have a preferred pad and a backup pad. If autoswitch is true,
|
/* At each iteration, we have a preferred pad and a backup pad. If autoswitch is true,
|
||||||
* the sinkpad is always preferred, otherwise it's the active sinkpad as set by the app.
|
* the sinkpad is always preferred, otherwise it's the active sinkpad as set by the app.
|
||||||
* The backup pad is the other one (may be None if there's no fallback pad yet).
|
* The backup pad is the other one (may be None if there's no fallback pad yet).
|
||||||
|
|
|
@ -168,7 +168,7 @@ trait HandleData: Sized {
|
||||||
self.pts()
|
self.pts()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fn get_duration(&self, state: &StreamState) -> gst::ClockTime;
|
fn duration(&self, state: &StreamState) -> gst::ClockTime;
|
||||||
fn is_keyframe(&self) -> bool;
|
fn is_keyframe(&self) -> bool;
|
||||||
fn can_clip(&self, state: &StreamState) -> bool;
|
fn can_clip(&self, state: &StreamState) -> bool;
|
||||||
fn clip(
|
fn clip(
|
||||||
|
@ -187,7 +187,7 @@ impl HandleData for (gst::ClockTime, gst::ClockTime) {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_duration(&self, _state: &StreamState) -> gst::ClockTime {
|
fn duration(&self, _state: &StreamState) -> gst::ClockTime {
|
||||||
self.1
|
self.1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ impl HandleData for gst::Buffer {
|
||||||
gst::BufferRef::dts(self)
|
gst::BufferRef::dts(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_duration(&self, state: &StreamState) -> gst::ClockTime {
|
fn duration(&self, state: &StreamState) -> gst::ClockTime {
|
||||||
let duration = gst::BufferRef::duration(self);
|
let duration = gst::BufferRef::duration(self);
|
||||||
|
|
||||||
if duration.is_some() {
|
if duration.is_some() {
|
||||||
|
@ -1743,7 +1743,7 @@ impl ObjectImpl for ToggleRecord {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"record" => {
|
"record" => {
|
||||||
let settings = self.settings.lock();
|
let settings = self.settings.lock();
|
||||||
|
|
|
@ -53,7 +53,7 @@ use std::{env, fs, path};
|
||||||
/// - If neither is possible, `COMMIT_ID` is set to the string `UNKNOWN` and `BUILD_REL_DATE` to the
|
/// - If neither is possible, `COMMIT_ID` is set to the string `UNKNOWN` and `BUILD_REL_DATE` to the
|
||||||
/// current date.
|
/// current date.
|
||||||
///
|
///
|
||||||
pub fn get_info() {
|
pub fn info() {
|
||||||
let crate_dir =
|
let crate_dir =
|
||||||
path::PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set"));
|
path::PathBuf::from(env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR not set"));
|
||||||
let mut repo_dir = crate_dir.clone();
|
let mut repo_dir = crate_dir.clone();
|
||||||
|
|
|
@ -270,7 +270,7 @@ impl ObjectImpl for CCDetect {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"window" => {
|
"window" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -614,7 +614,7 @@ impl ObjectImpl for Cea608Overlay {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"field" => {
|
"field" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -152,7 +152,7 @@ impl<T: AsRef<[u8]>> LineReader<T> {
|
||||||
assert_eq!(self.buf.len(), len);
|
assert_eq!(self.buf.len(), len);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_line_with_drain(&mut self, drain: bool) -> Option<&[u8]> {
|
pub fn line_with_drain(&mut self, drain: bool) -> Option<&[u8]> {
|
||||||
// Drop all data from the previous line
|
// Drop all data from the previous line
|
||||||
self.drop_previous_line();
|
self.drop_previous_line();
|
||||||
|
|
||||||
|
|
|
@ -540,7 +540,7 @@ impl ObjectImpl for MccEnc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"uuid" => {
|
"uuid" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -156,10 +156,7 @@ fn parse_timecode_rate(
|
||||||
|
|
||||||
impl State {
|
impl State {
|
||||||
#[allow(clippy::type_complexity)]
|
#[allow(clippy::type_complexity)]
|
||||||
fn get_line(
|
fn line(&mut self, drain: bool) -> Result<Option<MccLine>, (&[u8], nom::error::Error<&[u8]>)> {
|
||||||
&mut self,
|
|
||||||
drain: bool,
|
|
||||||
) -> Result<Option<MccLine>, (&[u8], nom::error::Error<&[u8]>)> {
|
|
||||||
let line = if self.replay_last_line {
|
let line = if self.replay_last_line {
|
||||||
self.replay_last_line = false;
|
self.replay_last_line = false;
|
||||||
&self.last_raw_line
|
&self.last_raw_line
|
||||||
|
|
|
@ -139,10 +139,7 @@ fn parse_timecode(
|
||||||
|
|
||||||
impl State {
|
impl State {
|
||||||
#[allow(clippy::type_complexity)]
|
#[allow(clippy::type_complexity)]
|
||||||
fn get_line(
|
fn line(&mut self, drain: bool) -> Result<Option<SccLine>, (&[u8], nom::error::Error<&[u8]>)> {
|
||||||
&mut self,
|
|
||||||
drain: bool,
|
|
||||||
) -> Result<Option<SccLine>, (&[u8], nom::error::Error<&[u8]>)> {
|
|
||||||
let line = match self.reader.get_line_with_drain(drain) {
|
let line = match self.reader.get_line_with_drain(drain) {
|
||||||
None => {
|
None => {
|
||||||
return Ok(None);
|
return Ok(None);
|
||||||
|
|
|
@ -1094,7 +1094,7 @@ impl ObjectImpl for TtToCea608 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"mode" => {
|
"mode" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -264,7 +264,7 @@ impl ObjectImpl for TtToJson {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"mode" => {
|
"mode" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -170,7 +170,7 @@ impl ObjectImpl for GifEnc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"repeat" => {
|
"repeat" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -424,7 +424,7 @@ impl GifEnc {
|
||||||
|
|
||||||
/// Helper method that takes a gstreamer video-frame and copies it into a
|
/// Helper method that takes a gstreamer video-frame and copies it into a
|
||||||
/// tightly packed rgb(a) buffer, ready for consumption by the gif encoder.
|
/// tightly packed rgb(a) buffer, ready for consumption by the gif encoder.
|
||||||
fn get_tightly_packed_framebuffer(frame: &gst_video::VideoFrameRef<&gst::BufferRef>) -> Vec<u8> {
|
fn tightly_packed_framebuffer(frame: &gst_video::VideoFrameRef<&gst::BufferRef>) -> Vec<u8> {
|
||||||
assert_eq!(frame.n_planes(), 1); // RGB and RGBA are tightly packed
|
assert_eq!(frame.n_planes(), 1); // RGB and RGBA are tightly packed
|
||||||
let line_size = (frame.info().width() * frame.n_components()) as usize;
|
let line_size = (frame.info().width() * frame.n_components()) as usize;
|
||||||
let line_stride = frame.info().stride()[0] as usize;
|
let line_stride = frame.info().stride()[0] as usize;
|
||||||
|
|
|
@ -232,7 +232,7 @@ impl ObjectImpl for HsvDetector {
|
||||||
|
|
||||||
// Called whenever a value of a property is read. It can be called
|
// Called whenever a value of a property is read. It can be called
|
||||||
// at any time from any thread.
|
// at any time from any thread.
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"hue-ref" => {
|
"hue-ref" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -390,7 +390,7 @@ impl BaseTransformImpl for HsvDetector {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
|
fn unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
|
||||||
gst_video::VideoInfo::from_caps(caps)
|
gst_video::VideoInfo::from_caps(caps)
|
||||||
.map(|info| info.size())
|
.map(|info| info.size())
|
||||||
.ok()
|
.ok()
|
||||||
|
|
|
@ -206,7 +206,7 @@ impl ObjectImpl for HsvFilter {
|
||||||
|
|
||||||
// Called whenever a value of a property is read. It can be called
|
// Called whenever a value of a property is read. It can be called
|
||||||
// at any time from any thread.
|
// at any time from any thread.
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"hue-shift" => {
|
"hue-shift" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
@ -298,7 +298,7 @@ impl BaseTransformImpl for HsvFilter {
|
||||||
const PASSTHROUGH_ON_SAME_CAPS: bool = false;
|
const PASSTHROUGH_ON_SAME_CAPS: bool = false;
|
||||||
const TRANSFORM_IP_ON_PASSTHROUGH: bool = false;
|
const TRANSFORM_IP_ON_PASSTHROUGH: bool = false;
|
||||||
|
|
||||||
fn get_unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
|
fn unit_size(&self, _element: &Self::Type, caps: &gst::Caps) -> Option<usize> {
|
||||||
gst_video::VideoInfo::from_caps(caps)
|
gst_video::VideoInfo::from_caps(caps)
|
||||||
.map(|info| info.size())
|
.map(|info| info.size())
|
||||||
.ok()
|
.ok()
|
||||||
|
|
|
@ -364,7 +364,7 @@ impl ObjectImpl for Rav1Enc {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"speed-preset" => {
|
"speed-preset" => {
|
||||||
let settings = self.settings.lock().unwrap();
|
let settings = self.settings.lock().unwrap();
|
||||||
|
|
|
@ -222,7 +222,7 @@ impl ObjectImpl for PngEncoder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
fn property(&self, _obj: &Self::Type, _id: usize, pspec: &glib::ParamSpec) -> glib::Value {
|
||||||
match pspec.name() {
|
match pspec.name() {
|
||||||
"compression-level" => {
|
"compression-level" => {
|
||||||
let settings = self.settings.lock();
|
let settings = self.settings.lock();
|
||||||
|
|
Loading…
Reference in a new issue