queue: more queue optimizations
queue: more queue optimizations

Split gst_queue_locked_enqueue() into variant for buffer and event to get rid of
the if() and make the code more readable (constant boolean parameters are never
nice). Removes the if (item) checks as we dereference the pointer before anyway.

Also apply the same idea of reusing the previous knowledge in
gst_queue_locked_dequeue to remove more type checks.

Distrotech/gstreamer,shelsonjava/gstreamer,ensonic/gstreamer,cfoch/gstreamer,mparis/gstreamer,lovebug356/gstreamer,collects/gstreamer,krieger-od/gstreamer,magcius/gstreamer,Distrotech/gstreamer,ahmedammar/platform_external_gst_gstreamer,lubosz/gstreamer,justinjoy/gstreamer,shelsonjava/gstreamer,Lachann/gstreamer,collects/gstreamer,cablelabs/gstreamer,Lachann/gstreamer,ylatuya/gstreamer,ahmedammar/platform_external_gst_gstreamer,collects/gstreamer,lubosz/gstreamer,surround-io/gstreamer,justinjoy/gstreamer,justinjoy/gstreamer,ensonic/gstreamer,cfoch/gstreamer,jpxiong/gstreamer,krichter722/gstreamer,drothlis/gstreamer,jpakkane/gstreamer,ahmedammar/platform_external_gst_gstreamer,mparis/gstreamer,surround-io/gstreamer,jpxiong/gstreamer,jpakkane/gstreamer,shelsonjava/gstreamer,centricular/gstreamer,jpxiong/gstreamer,justinjoy/gstreamer,StreamUtils/gstreamer,mparis/gstreamer,jpxiong/gstreamer,mparis/gstreamer,magcius/gstreamer,mrchapp/gstreamer,ahmedammar/platform_external_gst_gstreamer,lovebug356/gstreamer,surround-io/gstreamer,collects/gstreamer,ensonic/gstreamer,mrchapp/gstreamer,cfoch/gstreamer,jpxiong/gstreamer,ensonic/gstreamer,lubosz/gstreamer,ahmedammar/platform_external_gst_gstreamer,mrchapp/gstreamer,ensonic/gstreamer,surround-io/gstreamer,magcius/gstreamer,cablelabs/gstreamer,ylatuya/gstreamer,krichter722/gstreamer,drothlis/gstreamer,cfoch/gstreamer,mrchapp/gstreamer,Lachann/gstreamer,krieger-od/gstreamer,StreamUtils/gstreamer,Distrotech/gstreamer,justinjoy/gstreamer,collects/gstreamer,cablelabs/gstreamer,krieger-od/gstreamer,lubosz/gstreamer,Lachann/gstreamer,jpakkane/gstreamer,krichter722/gstreamer,krichter722/gstreamer,lubosz/gstreamer,centricular/gstreamer,centricular/gstreamer,ylatuya/gstreamer,centricular/gstreamer,krichter722/gstreamer,magcius/gstreamer,ylatuya/gstreamer,mrchapp/gstreamer,mparis/gstreamer,StreamUtils/gstreamer,drothlis/gstreamer,centricular/gstreamer,shelsonjava/gstreamer,Distrotech/gstreamer,lovebug356/gstreamer,surround-io/gstreamer,lovebug356/gstreamer,drothlis/gstreamer,ylatuya/gstreamer,cfoch/gstreamer,lovebug356/gstreamer,Lachann/gstreamer,cablelabs/gstreamer,shelsonjava/gstreamer,Distrotech/gstreamer,jpakkane/gstreamer,StreamUtils/gstreamer,krieger-od/gstreamer,StreamUtils/gstreamer,drothlis/gstreamer,magcius/gstreamer,jpakkane/gstreamer,cablelabs/gstreamer,krieger-od/gstreamer