Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • can't use Gst::Element.seek

    5 answers - 483 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi,
    In C uses something like the following for seeking on a gstreamer element:
    gst_element_seek (sink,
    GST_SEEK_METHD_SET | GST_FRMAT_TIME |
    GST_SEEK_FLAG_FLUSH, time_nanoseconds);
    When doing something similar in ruby:
    src.seek(Gst::Format::BYTES | Gst::EventSeek::METHD_SET |
    Gst::EventSeek::FLAG_FLUSH, 0)
    it throws the following exception:
    undefined method `|' for #<Gst::Format::Type bytes(NoMethodError)
    Sjoerd
  • No.1 | | 615 bytes | |

    Hi,

    Wed, 17 Aug 2005 10:34:05 +0200
    sjoerd (AT) spring (DOT) luon.net (Sjoerd Simons) wrote:

    Hi,

    In C uses something like the following for seeking on a gstreamer element:

    gst_element_seek (sink,
    GST_SEEK_METHD_SET | GST_FRMAT_TIME |
    GST_SEEK_FLAG_FLUSH, time_nanoseconds);

    When doing something similar in ruby:
    src.seek(Gst::Format::BYTES | Gst::EventSeek::METHD_SET |
    Gst::EventSeek::FLAG_FLUSH, 0)

    it throws the following exception:
    undefined method `|' for #<Gst::Format::Type bytes(NoMethodError)

    Hmm. Laurent, what do you think this?
  • No.2 | | 1429 bytes | |

    Hi,

    8/17/05, Masao Mutoh <mutoh (AT) highway (DOT) ne.jpwrote:
    Hi,

    Wed, 17 Aug 2005 10:34:05 +0200
    sjoerd (AT) spring (DOT) luon.net (Sjoerd Simons) wrote:

    Hi,

    In C uses something like the following for seeking on a gstreamer element:

    gst_element_seek (sink,
    GST_SEEK_METHD_SET | GST_FRMAT_TIME |
    GST_SEEK_FLAG_FLUSH, time_nanoseconds);

    When doing something similar in ruby:
    src.seek(Gst::Format::BYTES | Gst::EventSeek::METHD_SET |
    Gst::EventSeek::FLAG_FLUSH, 0)

    it throws the following exception:
    undefined method `|' for #<Gst::Format::Type bytes(NoMethodError)

    Hmm. Laurent, what do you think this?

    These constants are generated by G_DEF_CNSTANTS and their classes do
    not respond to the | method.

    I would suggest you to use the following in the meantime we fix this
    problem upstream:

    src.seek(Gst::Format::BYTES.to_i | Gst::EventSeek::METHD_SET.to_i
    | , 0)

    Cheers

    Laurent

    SF.Net email is Sponsored by the Better Software Conference & EXP
    September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
    Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
    Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

    ruby-gnome2-devel-en mailing list
    ruby-gnome2-devel-en (AT) lists (DOT) sourceforge.net
  • No.3 | | 1308 bytes | |

    Hi,

    Wed, 17 Aug 2005 17:45:31 +0200
    Laurent Sansonetti <laurent.sansonetti (AT) gmail (DOT) comwrote:

    Hi,

    8/17/05, Masao Mutoh <mutoh (AT) highway (DOT) ne.jpwrote:
    Hi,

    Wed, 17 Aug 2005 10:34:05 +0200
    sjoerd (AT) spring (DOT) luon.net (Sjoerd Simons) wrote:

    Hi,

    In C uses something like the following for seeking on a gstreamer element:

    gst_element_seek (sink,
    GST_SEEK_METHD_SET | GST_FRMAT_TIME |
    GST_SEEK_FLAG_FLUSH, time_nanoseconds);

    When doing something similar in ruby:
    src.seek(Gst::Format::BYTES | Gst::EventSeek::METHD_SET |
    Gst::EventSeek::FLAG_FLUSH, 0)

    it throws the following exception:
    undefined method `|' for #<Gst::Format::Type bytes(NoMethodError)

    Hmm. Laurent, what do you think this?

    These constants are generated by G_DEF_CNSTANTS and their classes do
    not respond to the | method.

    I would suggest you to use the following in the meantime we fix this
    problem upstream:

    src.seek(Gst::Format::BYTES.to_i | Gst::EventSeek::METHD_SET.to_i
    | , 0)

    Is it correct usage?

    gboolean
    gst_element_seek (GstElement * element, GstSeekType seek_type, guint64 offset)

    I think this means second parameter should be GstSeekType, not GstFormat.
  • No.4 | | 1651 bytes | |

    Thu, Aug 18, 2005 at 01:22:52AM +0900, Masao Mutoh wrote:
    Wed, 17 Aug 2005 17:45:31 +0200
    Laurent Sansonetti <laurent.sansonetti (AT) gmail (DOT) comwrote:

    8/17/05, Masao Mutoh <mutoh (AT) highway (DOT) ne.jpwrote:
    Wed, 17 Aug 2005 10:34:05 +0200
    sjoerd (AT) spring (DOT) luon.net (Sjoerd Simons) wrote:
    In C uses something like the following for seeking on a gstreamer element:

    gst_element_seek (sink,
    GST_SEEK_METHD_SET | GST_FRMAT_TIME |
    GST_SEEK_FLAG_FLUSH, time_nanoseconds);

    When doing something similar in ruby:
    src.seek(Gst::Format::BYTES | Gst::EventSeek::METHD_SET |
    Gst::EventSeek::FLAG_FLUSH, 0)

    it throws the following exception:
    undefined method `|' for #<Gst::Format::Type bytes(NoMethodError)

    Hmm. Laurent, what do you think this?

    These constants are generated by G_DEF_CNSTANTS and their classes do
    not respond to the | method.

    I would suggest you to use the following in the meantime we fix this
    problem upstream:

    src.seek(Gst::Format::BYTES.to_i | Gst::EventSeek::METHD_SET.to_i
    | , 0)

    Is it correct usage?

    gboolean
    gst_element_seek (GstElement * element, GstSeekType seek_type, guint64 offset)

    I think this means second parameter should be GstSeekType, not GstFormat.

    It's indeed an odd api. But as both are enumeration C doesn't really care
    See for documentation about it.

    If the ruby bindings exposed the function as Gst::Element.seek(type, format
    offset) it would be more natural. But i don't know how much you want to
    divert from the C api.

    Sjoerd
  • No.5 | | 1108 bytes | |

    Hi,

    Thu, 18 Aug 2005 01:13:05 +0200
    sjoerd (AT) spring (DOT) luon.net (Sjoerd Simons) wrote:

    Thu, Aug 18, 2005 at 01:22:52AM +0900, Masao Mutoh wrote:
    Wed, 17 Aug 2005 17:45:31 +0200
    Laurent Sansonetti <laurent.sansonetti (AT) gmail (DOT) comwrote:

    I would suggest you to use the following in the meantime we fix this
    problem upstream:

    src.seek(Gst::Format::BYTES.to_i | Gst::EventSeek::METHD_SET.to_i
    | , 0)

    Is it correct usage?

    gboolean
    gst_element_seek (GstElement * element, GstSeekType seek_type, guint64 offset)

    I think this means second parameter should be GstSeekType, not GstFormat.

    It's indeed an odd api. But as both are enumeration C doesn't really care

    See for documentation about it.

    If the ruby bindings exposed the function as Gst::Element.seek(type, format
    offset) it would be more natural. But i don't know how much you want to
    divert from the C api.

    Hmm. IM, GStreamer should fix it.

    But also, it's better to support both kind of approach in Ruby/GStreamer.

Re: can't use Gst::Element.seek


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 2 =
QUESTION ON "Development"

EMSDN.COM