mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-09-22 20:10:03 +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() {
|
if state.layout.is_none() {
|
||||||
let fontmap = match pangocairo::FontMap::new() {
|
let fontmap = 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 context = match fontmap.create_context() {
|
let context = match fontmap.create_context() {
|
||||||
Some(context) => Ok(context),
|
Some(context) => Ok(context),
|
||||||
None => {
|
None => {
|
||||||
|
|
|
@ -98,17 +98,7 @@ impl Cea608Overlay {
|
||||||
// TODO: switch to the API presented in this post once it's been exposed
|
// 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> {
|
fn recalculate_layout(&self, state: &mut State) -> Result<gst::FlowSuccess, gst::FlowError> {
|
||||||
let video_info = state.video_info.as_ref().unwrap();
|
let video_info = state.video_info.as_ref().unwrap();
|
||||||
let fontmap = match pangocairo::FontMap::new() {
|
let fontmap = 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 context = match fontmap.create_context() {
|
let context = match fontmap.create_context() {
|
||||||
Some(context) => Ok(context),
|
Some(context) => Ok(context),
|
||||||
None => {
|
None => {
|
||||||
|
|
Loading…
Reference in a new issue