Closed makotosato-at closed 6 months ago
I don't remember that, but may I ask you the reason why we should use GST_BUS_DROP
instead?
https://gstreamer.freedesktop.org/documentation/gstreamer/gstbus.html?gi-language=c
typedef enum
{
GST_BUS_DROP = 0,
GST_BUS_PASS = 1,
GST_BUS_ASYNC = 2
} GstBusSyncReply;
GST_BUS_DROP: drop the message
GST_BUS_PASS: pass the message to the async queue
GST_BUS_ASYNC: pass message to async queue, continue if message is handled
Thank you for reply.
"GST_BUS_PASS: pass the message to the async queue" But, nowhere in the current code is "async queue" handled.
If GST_BUS_PASS is used, I think that passed messages should be handled as follows, for example.
while (gst_bus_have_pending(self->gst_.bus)) {
GstMessage *message = gst_bus_pop(self->gst_.bus);
// something
gst_message_unref(message);
}
If GST_BUS_PASS is used, I think that passed messages should be handled as follows, for example.
Is that true? I can see the description below.
If the handler returns [GST_BUS_DROP](https://gstreamer.freedesktop.org/documentation/gstreamer/gstbus.html#GST_BUS_DROP), it should unref the message, else the message should not be unreffed by the sync handler.
Is that true? I can see the description below.
I think it is true.
If GST_BUS_PASS is used, passed messages are pushed to bus->priv->queue
.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gstreamer/gst/gstbus.c?ref_type=heads#L382
I think that the pushed message will remain in queue forever if we don't pop it. https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gstreamer/gst/gstbus.c?ref_type=heads#L675
That makes sense. Would it be possible for you to create a change / pull request?
Closing. Thanks a lot.
Hello.
I have a question about the return value of
GstVideoPlayer::HandleGstMessage()
.Why does
GstVideoPlayer::HandleGstMessage()
returnGST_BUS_PASS
as in the following code? https://github.com/sony/flutter-elinux-plugins/blob/main/packages/video_player/elinux/gst_video_player.cc#L475I think it should return
GST_BUS_DROP
.