Are Bus Messages Queued?

Ian Davidson id012c3076 at blueyonder.co.uk
Sun Nov 6 15:39:01 UTC 2016


Hi Nastooh,

I think I would work on the assumption that all the messages DO get 
created and passed through one at a time.  I would suspect that there is 
still an error in your code.  What I would do first would be to have a 
g_print to report the 'failures' in your checking - for example, a 'Life 
is Bad' if the counts do not match (and print out the actual and 
expected counts), and some other message if/when the message source is 
not in your list - it may be that you are ignoring a valid message.

Ian


On 05/11/2016 21:07, Nastooh Avessta wrote:
> Indeed, I do. (The same goes for array pointer messagePlug and messageCnt.)
> Right now, the only way that I get all  of the messages, is to put artificial delay between consecutive calls, in Step 1, below. This; however, causes other problems.
> Cheers,
>
> -----Original Message-----
> From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Ian Davidson
> Sent: Saturday, November 05, 2016 12:26 PM
> To: Discussion of the development of and with GStreamer
> Subject: Re: Are Bus Messages Queued?
>
> In the code that you show, I do not see you initialising 'noMessage'.  I assume that you DO initialise it and just have not shown the code.
>
> Ian
>
>
> On 04/11/2016 17:07, Nastooh Avessta wrote:
>> Hi Tim
>> Thank you for your reply. Here is my use case:
>> 1-	Application solicits plugins for messages, in a serialized ordered manner
>> 2-	Plugins reply in an asynchronous manner
>> 3-	Upon receiving messages from all targeted plugins, an action is taken
>> Part 3, is coded inside the bus message handler:
>>>> case GST_MESSAGE_ELEMENT:
>> 	    g_print("Got message from %s\n",gst_object_get_name (GST_MESSAGE_SRC(msg)));
>>        int i;
>> 	        for(i=0;i<messageCnt;i++){
>> 	            if(!strcmp(messagePlug[i],gst_object_get_name (GST_MESSAGE_SRC(msg)))){
>> 	                noMessage++;
>> 	                if(noMessages==messageCnt){
>> 	                    g_print("Life is good\n");
>> 	
>> 	                }
>> 	            }
>> 	        }
>> 	    break;
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org



More information about the gstreamer-devel mailing list