static VALUE segment_done_parse(VALUE self) { GstFormat format; gint64 position; gst_message_parse_segment_done(SELF(self), &format, &position); return rb_ary_new3(2, GST_FORMAT2RVAL(format), LL2NUM(position)); }
static void test_event_message_received (GstBus * bus, GstMessage * message, GstPipeline * bin) { GST_INFO ("bus message from \"%" GST_PTR_FORMAT "\": %" GST_PTR_FORMAT, GST_MESSAGE_SRC (message), message); switch (message->type) { case GST_MESSAGE_SEGMENT_DONE: gst_message_parse_segment_done (message, &format, &position); GST_INFO ("received segment_done : %" G_GINT64_FORMAT, position); g_main_loop_quit (main_loop); break; default: g_assert_not_reached (); break; } }
qint64 SegmentDoneMessage::position() const { gint64 p; gst_message_parse_segment_done(object<GstMessage>(), NULL, &p); return p; }
Format SegmentDoneMessage::format() const { GstFormat f; gst_message_parse_segment_done(object<GstMessage>(), &f, NULL); return static_cast<Format>(f); }