Trying to create and run vp8enc with temporal scalability props. Stream doesnt flows at all, if flags with temporal scalability are activated. Seems I configured these properties in a wrong way. Could you pls provide examples or show a mistake.
Also I red all docs here GstVPXEnc and cant find any examples for fields like
- temporal-scalability-layer-id
- temporal-scalability-layer-flags
- temporal-scalability-layer-sync-flags
- temporal-scalability-rate-decimator
While setting these properties Im just guessing, cause havent any proper docs and descriptions;
let pipeline = Pipeline::with_name("rtp_pipeline");
let video_test_src = ElementFactory::make_with_name("videotestsrc", Some("videotestsrc_1")).expect("Element is already exist");
let vp8_enc = ElementFactory::make_with_name("vp8enc", Some("vp8enc_1")).expect("Element is already exist");
let fakesink = ElementFactory::make_with_name("fakesink", Some("fakesink_1")).expect("Element is already exist");
vp8_enc.set_property_from_str("deadline", "1");
vp8_enc.set_property_from_str("keyframe-max-dist", "20");
vp8_enc.set_property_from_str("error-resilient", "0x00000002");
vp8_enc.set_property_from_str("temporal-scalability-number-layers", "3");
vp8_enc.set_property_from_str("temporal-scalability-periodicity", "4");
vp8_enc.set_property_from_str("auto-alt-ref", "true");
fakesink.set_property_from_str("dump", "1");
let mut array = glib::ValueArray::new(4);
let value1 = 0.to_value();
let value2 = 2.to_value();
let value3 = 1.to_value();
let value4 = 2.to_value();
array.append(&value1);
array.append(&value2);
array.append(&value3);
array.append(&value4);
vp8_enc.set_property("temporal-scalability-layer-id", array);
let mut array2 = glib::ValueArray::new(3);
let value1 = 4.to_value();
let value2 = 2.to_value();
let value3 = 1.to_value();
array2.append(&value1);
array2.append(&value2);
array2.append(&value3);
vp8_enc.set_property("temporal-scalability-rate-decimator", array2);
let caps = Caps::from_str("video/x-raw,width=480,height=360").expect("Cant create caps");
pipeline.add(&video_test_src).expect("Cant add elements to pipe");
pipeline.add(&vp8_enc).expect("Cant add elements to pipe");
pipeline.add(&fakesink).expect("Cant add elements to pipe");
video_test_src.link_filtered(&vp8_enc, &caps).expect("Cant link video_test_src to vp8_enc");
vp8_enc.link(&fakesink).expect("Cant link vp8_enc to fakesink");
pipeline.set_state(State::Playing).unwrap();`