mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
Update for pango API changes
pango::Language::from_string() can fail and also can accept None as argument.
This commit is contained in:
parent
1981ffbea0
commit
6e54d3cea9
2 changed files with 2 additions and 2 deletions
|
@ -295,7 +295,7 @@ impl OnvifMetadataOverlay {
|
||||||
if state.layout.is_none() {
|
if state.layout.is_none() {
|
||||||
let fontmap = pangocairo::FontMap::new();
|
let fontmap = pangocairo::FontMap::new();
|
||||||
let context = fontmap.create_context();
|
let context = fontmap.create_context();
|
||||||
context.set_language(Some(&pango::Language::from_string("en_US")));
|
context.set_language(Some(&pango::Language::from_string(Some("en_US")).unwrap()));
|
||||||
context.set_base_dir(pango::Direction::Ltr);
|
context.set_base_dir(pango::Direction::Ltr);
|
||||||
let layout = pango::Layout::new(&context);
|
let layout = pango::Layout::new(&context);
|
||||||
layout.set_alignment(pango::Alignment::Left);
|
layout.set_alignment(pango::Alignment::Left);
|
||||||
|
|
|
@ -100,7 +100,7 @@ impl Cea608Overlay {
|
||||||
let video_info = state.video_info.as_ref().unwrap();
|
let video_info = state.video_info.as_ref().unwrap();
|
||||||
let fontmap = pangocairo::FontMap::new();
|
let fontmap = pangocairo::FontMap::new();
|
||||||
let context = fontmap.create_context();
|
let context = fontmap.create_context();
|
||||||
context.set_language(Some(&pango::Language::from_string("en_US")));
|
context.set_language(Some(&pango::Language::from_string(Some("en_US")).unwrap()));
|
||||||
context.set_base_dir(pango::Direction::Ltr);
|
context.set_base_dir(pango::Direction::Ltr);
|
||||||
let layout = pango::Layout::new(&context);
|
let layout = pango::Layout::new(&context);
|
||||||
layout.set_alignment(pango::Alignment::Left);
|
layout.set_alignment(pango::Alignment::Left);
|
||||||
|
|
Loading…
Reference in a new issue