Skip to content

Switch from PlaySignalAdapter to message bus sync handler #440

@jdm

Description

@jdm

I started doing this conversion and then discovered something that I'm not sure how to handle:

let error_handler_id = inner.player.connect_error(move |player, error| {
notify!(sender_clone, Err(PlayerError::Backend(error.to_string())));
player.stop();
});

This error handler id is then used here:
glib::signal::signal_handler_disconnect(&inner.lock().unwrap().player, error_handler_id);

Is there any equivalent construct possible? Do I still need to use the PlaySignalAdapter just for this particular case, @sdroege?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions