<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
I answer to myself<br><br>It was quite easy to find... <br>In the 'testrtpool.c' file, in the 'default-push' function, I just had to replace "SCHED_RR" by "SCHED_FIFO"<br>On the other hand, 'param.sched_priority' is set to to 50, which can be changed also according to the priority one wants to give to the process;<br><br>Victor<br><br><hr id="stopSpelling">From: nadaeck@hotmail.com<br>To: gstreamer-devel@lists.freedesktop.org<br>Subject: real time question : RR vs FF?<br>Date: Thu, 28 Apr 2011 04:34:39 +0200<br><br>
<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>
Hello<br><br>I have made an app that displays the harmonics in 3d.<br><br>I want to be able to run it in real-time; I have used the 'rtpool-test' code from the gstreamer core examples (streams->rtpool-test.c) and it works. However, I have seen that this grants me a priority of 90 with a 'RR' policy. Is it possible to change the code code to get 'FIFO' policy? If yes, please how could I do this? I have tied to use the set_schedparam code, but I got the <span>'Invalid argument' during 'pthread_attr_setschedparam (&attr, &sched)' error... (as well as starting the app with 'chrt -r -p my-pid')</span><br><br>Another question : this code grants real time for Gstreamer code, but what about other code code (not Gstreamer) that follows it? The app is written like this : GTK GUI with a 'Play" button, that starts playing the sound with Gstreamer, and the 'spectrum' element send messages to the bus; everytime the "message handler" function retrives the values of the spectrum, there is a call to a function that display the values of the spectrum in a SDL/OpenGL window. My question is : is the display in the SDL/OpenGL window done also with the RR policy or back with TS policy?<br><br>When I run the app (its name is 'spectrum3d', then when I run 'ps -cLe' in a terminal to see all the threads of the app, I see this :<br><br> 5265 5265 TS 19 pts/0 00:00:01 spectrum3d<br> 5265 5267 TS 19 pts/0 00:00:00 threaded-ml<br> 5265 5268 TS 19 pts/0 00:00:00 threaded-ml<br> 5265 5270 TS 19 pts/0 00:00:00 task0<br> 5265 5271 TS 19 pts/0 00:00:00 spectrum3d<br> 5265 5272 RR 90 pts/0 00:00:01 alsasrc:src<br><br>The 1st pid is the Gtk GUI; the last one must be the gstreamer sound reading, since its policy is RR; but I don't know what the other pid represent...<br><br>thanks for your help<br><br>Victor<br>                                           
<br>_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel                                            </body>
</html>