[gst-devel] macro naming

Andy Wingo wingo at pobox.com
Fri Oct 21 04:05:35 CEST 2005


Hi Stefan,

I will tell you what I think :)

For the record I created #319388 to track API changes during the freeze
for applying on 14 November.

On Thu, 2005-10-13 at 09:38 +0200, Stefan Kost wrote:
> GST_CALL_*

There are two: GST_CALL_PARENT and GST_CALL_PARENT_WITH_DEFAULT. I think
they are confusing macros and don't save very much anyway, so I could do
without them, but some people like them I think. They are not object
methods though. So they don't have normal first arguments.

> GST_EVDIR_*

The event types are a bit of a mess I think. For bindings it would be
good to know if a given type of message is upstream, downstream,
serialized etc, which requires the event type to have flags, but now
they are wrapped as enums. Which makes sense ("eos" is a better answer
to "which kind of event is this" than "eos | serialized | downstream"),
but lacks something. I suspect that we need to tweak the types a bit, so
that EventType remains an enum, but there is a function or macro
gst_event_type_get_flags, which returns a EventTypeFlags.

Created bug #319392 about this issue.

> GST_LIVE_*

Probably should make these private to basesrc.

> GST_GET_LOCK, GST_LOCK, GST_UNLOCK

Should be GST_OBJECT_GET_LOCK, but GST_LOCK and GST_UNLOCK should stay
like they are because they're used all the time. I could be wrong on
this though.

> GST_PREROLL_*

Should be private to basesink

> GST_STATE_*

Should be private to GstElement now

> GST_STREAM_*

Should be renamed. How unfortunate, I rather liked these names and don't
like the alternatives.

> GST_IS_PAD_FAST -> GST_PAD_IS_FAST

This defies the rules of english, sorry. But this macro should go; it's
not used at all.

I rolled all these into #319395.

Regards,
-- 
Andy Wingo
http://wingolog.org/





More information about the gstreamer-devel mailing list