Commit 854bc55a authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

gst/gstelement.h: Add casts to the correct return type to state <=> state transition macros.

Original commit message from CVS:
* gst/gstelement.h:
Add casts to the correct return type to state <=> state transition
macros.
parent 272e7dc8
2006-10-16 Tim-Philipp Müller <tim at centricular dot net>
* gst/gstelement.h:
Add casts to the correct return type to state <=> state transition
macros.
2006-10-16 Stefan Kost <ensonic@users.sf.net> 2006-10-16 Stefan Kost <ensonic@users.sf.net>
* docs/design/part-live-source.txt: * docs/design/part-live-source.txt:
......
...@@ -145,21 +145,21 @@ typedef enum { ...@@ -145,21 +145,21 @@ typedef enum {
* Given a current state @cur and a next state @next, calculate the associated * Given a current state @cur and a next state @next, calculate the associated
* #GstStateChange transition. * #GstStateChange transition.
*/ */
#define GST_STATE_TRANSITION(cur,next) (((cur)<<3)|(next)) #define GST_STATE_TRANSITION(cur,next) ((GstStateChange)(((cur)<<3)|(next)))
/** /**
* GST_STATE_TRANSITION_CURRENT: * GST_STATE_TRANSITION_CURRENT:
* @trans: A #GstStateChange * @trans: A #GstStateChange
* *
* Given a state transition @trans, extract the current #GstState. * Given a state transition @trans, extract the current #GstState.
*/ */
#define GST_STATE_TRANSITION_CURRENT(trans) ((trans)>>3) #define GST_STATE_TRANSITION_CURRENT(trans) ((GstState)((trans)>>3))
/** /**
* GST_STATE_TRANSITION_NEXT: * GST_STATE_TRANSITION_NEXT:
* @trans: A #GstStateChange * @trans: A #GstStateChange
* *
* Given a state transition @trans, extract the next #GstState. * Given a state transition @trans, extract the next #GstState.
*/ */
#define GST_STATE_TRANSITION_NEXT(trans) ((trans)&0x7) #define GST_STATE_TRANSITION_NEXT(trans) ((GstState)((trans)&0x7))
/** /**
* GstStateChange: * GstStateChange:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment