<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hey Pablo<div class=""><br class=""></div><div class="">Python will return the current and pending states along with the return in a tuple as the following:</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">(ret, state, pending) = pipeline.get_state()</font></div><div class=""><br class=""></div><div class="">Then you can compare as usual:</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">if state == gst.STATE_PLAYING:</font></div><div class=""><font face="Courier" class="">  pass</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class="">You can pass in a timeout to the state query as in <span style="font-family: Courier;" class="">pipeline</span><span style="font-family: Courier;" class="">.</span><span style="font-family: Courier;" class="">get_state(</span><span class="pl-s1" style="box-sizing: border-box; caret-color: rgb(36, 41, 47); color: rgb(36, 41, 47); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.000000953674316px; white-space: pre;">timeout</span><span class="pl-c1" style="box-sizing: border-box; color: var(--color-prettylights-syntax-constant); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.000000953674316px; white-space: pre;">=</span><span class="pl-s1" style="box-sizing: border-box; caret-color: rgb(36, 41, 47); color: rgb(36, 41, 47); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.000000953674316px; white-space: pre;">gst</span><span style="caret-color: rgb(36, 41, 47); color: rgb(36, 41, 47); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.000000953674316px; white-space: pre; background-color: rgb(255, 255, 255);" class="">.</span><span class="pl-v" style="box-sizing: border-box; color: var(--color-prettylights-syntax-variable); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.000000953674316px; white-space: pre;">SECOND).</span></div><div class=""><span class="pl-v" style="box-sizing: border-box; color: var(--color-prettylights-syntax-variable); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 12.000000953674316px; white-space: pre;"><br class=""></span></div><div class=""><span class="pl-v" style="box-sizing: border-box; color: var(--color-prettylights-syntax-variable); font-size: 12.000000953674316px; white-space: pre;">Michael</span></div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 28 Nov 2021, at 11:58, Pablo RodrĂ­guez via gstreamer-devel <<a href="mailto:gstreamer-devel@lists.freedesktop.org" class="">gstreamer-devel@lists.freedesktop.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Dear list,<br class=""><br class="">is there a way to check whether a player is in playing state?<br class=""><br class="">I mean, something similar to Python pseudocode:<br class=""><br class=""> if self.player.get_state(0)[1] == "GST_STATE_PLAYING":<br class=""><br class="">Sorry, but I couldn’t find any reference for that.<br class=""><br class="">Many thanks for your help,<br class=""><br class="">Pablo<br class=""></div></div></blockquote></div><br class=""></div></body></html>