mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-22 00:48:17 +00:00
onvifmetadataoverlay, cea608overlay: Fix pangocairo::FontMap::new()
It doesn't return an Option anymore.
This commit is contained in:
parent
f11b0fa5eb
commit
0ab965335f
2 changed files with 2 additions and 23 deletions
|
@ -293,18 +293,7 @@ impl OnvifMetadataOverlay {
|
|||
}
|
||||
|
||||
if state.layout.is_none() {
|
||||
let fontmap = match pangocairo::FontMap::new() {
|
||||
Some(fontmap) => Ok(fontmap),
|
||||
None => {
|
||||
gst::element_imp_error!(
|
||||
self,
|
||||
gst::LibraryError::Failed,
|
||||
["Failed to create pangocairo font map"]
|
||||
);
|
||||
Err(gst::FlowError::Error)
|
||||
}
|
||||
}
|
||||
.unwrap();
|
||||
let fontmap = pangocairo::FontMap::new();
|
||||
let context = match fontmap.create_context() {
|
||||
Some(context) => Ok(context),
|
||||
None => {
|
||||
|
|
|
@ -98,17 +98,7 @@ impl Cea608Overlay {
|
|||
// TODO: switch to the API presented in this post once it's been exposed
|
||||
fn recalculate_layout(&self, state: &mut State) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||
let video_info = state.video_info.as_ref().unwrap();
|
||||
let fontmap = match pangocairo::FontMap::new() {
|
||||
Some(fontmap) => Ok(fontmap),
|
||||
None => {
|
||||
gst::element_imp_error!(
|
||||
self,
|
||||
gst::LibraryError::Failed,
|
||||
["Failed to create pangocairo font map"]
|
||||
);
|
||||
Err(gst::FlowError::Error)
|
||||
}
|
||||
}?;
|
||||
let fontmap = pangocairo::FontMap::new();
|
||||
let context = match fontmap.create_context() {
|
||||
Some(context) => Ok(context),
|
||||
None => {
|
||||
|
|
Loading…
Reference in a new issue