Clapper.Reactable.get_player

### Method

# Clapper Reactableget_player

since: 0.10

#### Declaration [src]

    ClapperPlayer*
    clapper_reactable_get_player (
      ClapperReactable* reactable
    )

#### Description [src]

Get the `ClapperPlayer` that this reactable is reacting to.

This is meant to be used in implementations where reaction goes the other way around (from enhancer plugin to the player). For example some external event needs to influence parent player object like changing its state, seeking, etc.

Note that enhancers are working in a non-main application thread, thus if you need to do operations on a `ClapperQueue` such as adding/removing items, you need to switch thread first. Otherwise this will not be thread safe for applications that use single threaded toolkits such as `GTK`. You can do this manually or use provided reactable convenience functions.

Due to the threaded nature, you should also avoid comparisons to the current properties values in the player or its queue. While these are thread safe, there is no guarantee that values/objects between threads are still the same in both (or still exist). For example, instead of using `ClapperQueue:current-item`, monitor it with implemented `Clapper.ReactableInterface.played_item_changed` instead, as these functions are all serialized into your implementation thread.

Available since: 0.10

#### Return value

Type: `ClapperPlayer`

A reference to the parent `ClapperPlayer`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.