iOS GstPlay - Can't receive any signal
I would like to use GstPlay
to play some audio file from a remote URL. I can play
, pause
, seek
..
I want to listen some event: state_changed
(see doc)
I don't understand why don't receive any signal:
My code:
static GstPlaySignalAdapter *adapter;
-(instancetype)init {
self = [super init];
if (!monoPlayer) {
[self configurePlayer];
}
return self;
}
-(void)configurePlayer {
GstreamerConfiguration(); // Like gst_ios_init
player = gst_play_new(NULL);
adapter = gst_play_signal_adapter_new(player);
gst_play_config_set_seek_accurate(gst_play_get_config(player), true);
[self configureCallBacks];
}
-(void)configureCallBacks {
NSLog(@"---- callllled");
g_signal_connect (adapter, "state-changed", G_CALLBACK(stateChangedCb), NULL);
}
void stateChangedCb (GstPlaySignalAdapter *adapter, GstPlayState *state, void *data) {
NSLog(@"---- NEW STATE");
// gst_print ("State changed: %s\n", gst_play_state_get_name (state));
}
I use GStreamer 1.20.2