Forum: Ruby-Gnome 2 Gst::Element.planying?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Detlef R. (Guest)
on 2009-05-24 19:57
(Received via mailing list)
Hi,

the docs for Gst::Element show the methodes
paused?
playing?
ready?

but they are not implemented in the current SVN. Only in
gstreamer/test/tc_element.rb are tests for them.

Were they never implemented or removed? I think, they are handy.

Cheers, detlef

--
http://det.cable.nu
Kouhei S. (Guest)
on 2009-05-26 14:45
(Received via mailing list)
Hi,

2009/5/25 Detlef R. <removed_email_address@domain.invalid>:

> the docs for Gst::Element show the methodes
> paused?
> playing?
> ready?
>
> but they are not implemented in the current SVN. Only in
> gstreamer/test/tc_element.rb are tests for them.
>
> Were they never implemented or removed? I think, they are handy.

They will not be implemeted.
I forgot the detail but the reason why they were removed is that they
are not safe.

GStreamer is a multi threaded library.
In the following code, "element" may not be "paused" in "# something"
even if
"element.paused?" is true:

  if element.paused?
    # something
  end

Element's state may be changed in other thread.
GStreamer provides a signal to handle state change. (Sorry. I forgot
the signal name)
You should use the signal to handle state change safely.

# I'm sorry if the description is not correct.
# I don't have an environment to confirm the case...

P.S. gstreamer/tests/ directory is deprecated. We will remove the
directory
after we implement all methods in gstreamer/test/. We also need help
for the task.


Thanks,
--
kou
This topic is locked and can not be replied to.