

alias L='gst-launch-0.10 -vvv -m'

# L videotestsrc pattern=11 is-live=1 do-timestamp=1 ! ffmpegcolorspace ! xvimagesink

# gst-launch-0.10  videotestsrc ! video/x-raw-yuv, framerate=\(fraction\)6/1, width=100, height=100 ! videobox border-alpha=0  top=-240 left=-320  ! videomixer name=mix ! ffmpegcolorspace ! xvimagesink v4l2src !  videorate ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, framerate=\(fraction\)6/1, width=640, height=480  ! mix.

# L  videotestsrc ! video/x-raw-yuv, framerate=\(fraction\)6/1, width=100, height=100 ! videobox border-alpha=0  top=-240 left=-320  ! videomixer name=mix ! ffmpegcolorspace ! xvimagesink \

if false; then
L  videotestsrc ! video/x-raw-yuv, framerate=\(fraction\)6/1, width=100, height=100 ! videobox fill=2 border-alpha=0.5  top=-240 left=-320  ! videomixer name=mix ! ffmpegcolorspace ! xvimagesink \
  v4l2src !  videorate ! videoscale ! ffmpegcolorspace ! video/x-raw-yuv, framerate=\(fraction\)6/1, width=640, height=480  ! mix.
fi


### L textoverlay text=Xyzzy name=Overlay  ! ffmpegcolorspace ! xvimagesink      videotestsrc ! Overlay.

RATE=6

set -x
CAM() {
  echo \
  v4l2src ! \
  videorate ! \
  video/x-raw-yuv, framerate=\(fraction\)$RATE/1, width=640, height=480 ! \
  ffmpegcolorspace ! \
  videobox fill=2 border-alpha=0.5 left=-16 top=-16
}
T1() {
  echo \
  videotestsrc ! \
  video/x-raw-yuv, framerate=\(fraction\)$RATE/1, width=100, height=100 ! \
  videobox border-alpha=0.0 left=-$1 top=-$2
  #videobox fill=2 border-alpha=0.5 left=-$1 top=-$2
}

R1() {
  echo \
  v4l2src ! videoscale ! videorate ! \
  video/x-raw-yuv, framerate=\(fraction\)$RATE/1, width=640, height=480 ! \
  videoscale ! videorate ! \
  video/x-raw-yuv, framerate=\(fraction\)$RATE/1, width=320, height=240 ! \
  videobox border-alpha=0.0 left=-$1 top=-$2
}
N1() {
  echo \
  udpsrc port=$3 buffer-size=65536 ! smokedec ! \
  videobox border-alpha=0.0 left=-$1 top=-$2
}

  

#L  `CAM` ! mix. \
#   `T1` ! videomixer name=mix ! ffmpegcolorspace ! xvimagesink


#L \
#  `CAM` ! mix. \
#  `T1 320 240` ! videomixer name=mix ! ffmpegcolorspace ! xvimagesink

L \
  `CAM` ! mix. \
  `T1 100 100` ! videomixer name=mix ! mix2. \
  `T1 0 0 ` ! videomixer name=mix2 ! mix3. \
  `T1 320 240` ! videomixer name=mix3 ! ffmpegcolorspace ! xvimagesink

#L \
#  `CAM` ! mix. \
#  `N1 0 0 9009` ! videomixer name=mix ! ffmpegcolorspace ! xvimagesink

