mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
API: unset needs_info_update when stopped
This commit is contained in:
10
lib/gst/clapper/gstclapper.c
vendored
10
lib/gst/clapper/gstclapper.c
vendored
@@ -880,9 +880,9 @@ static void
|
|||||||
emit_media_info_updated (GstClapper * self)
|
emit_media_info_updated (GstClapper * self)
|
||||||
{
|
{
|
||||||
MediaInfoUpdatedSignalData *data = g_new (MediaInfoUpdatedSignalData, 1);
|
MediaInfoUpdatedSignalData *data = g_new (MediaInfoUpdatedSignalData, 1);
|
||||||
|
self->needs_info_update = FALSE;
|
||||||
data->clapper = g_object_ref (self);
|
data->clapper = g_object_ref (self);
|
||||||
g_mutex_lock (&self->lock);
|
g_mutex_lock (&self->lock);
|
||||||
self->needs_info_update = FALSE;
|
|
||||||
data->info = gst_clapper_media_info_copy (self->media_info);
|
data->info = gst_clapper_media_info_copy (self->media_info);
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
|
|
||||||
@@ -946,10 +946,13 @@ change_state (GstClapper * self, GstClapperState state)
|
|||||||
gst_clapper_state_get_name (state));
|
gst_clapper_state_get_name (state));
|
||||||
self->app_state = state;
|
self->app_state = state;
|
||||||
|
|
||||||
if (state == GST_CLAPPER_STATE_STOPPED && self->rate != 1.0) {
|
if (state == GST_CLAPPER_STATE_STOPPED) {
|
||||||
|
self->needs_info_update = FALSE;
|
||||||
|
if (self->rate != 1.0) {
|
||||||
self->rate = 1.0;
|
self->rate = 1.0;
|
||||||
emit_rate_notify (self);
|
emit_rate_notify (self);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
|
if (g_signal_handler_find (self, G_SIGNAL_MATCH_ID,
|
||||||
signals[SIGNAL_STATE_CHANGED], 0, NULL, NULL, NULL) != 0) {
|
signals[SIGNAL_STATE_CHANGED], 0, NULL, NULL, NULL) != 0) {
|
||||||
@@ -2343,9 +2346,10 @@ stream_notify_cb (GstStreamCollection * collection, GstStream * stream,
|
|||||||
g_mutex_lock (&self->lock);
|
g_mutex_lock (&self->lock);
|
||||||
info =
|
info =
|
||||||
gst_clapper_stream_info_find_from_stream_id (self->media_info, stream_id);
|
gst_clapper_stream_info_find_from_stream_id (self->media_info, stream_id);
|
||||||
if (info)
|
if (info) {
|
||||||
gst_clapper_stream_info_update_from_stream (self, info, stream);
|
gst_clapper_stream_info_update_from_stream (self, info, stream);
|
||||||
emit_update = (self->needs_info_update && GST_IS_CLAPPER_VIDEO_INFO (info));
|
emit_update = (self->needs_info_update && GST_IS_CLAPPER_VIDEO_INFO (info));
|
||||||
|
}
|
||||||
g_mutex_unlock (&self->lock);
|
g_mutex_unlock (&self->lock);
|
||||||
|
|
||||||
if (emit_update)
|
if (emit_update)
|
||||||
|
Reference in New Issue
Block a user