xref: /OK3568_Linux_fs/debian/overlay/etc/profile.d/gst.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyunexport GST_GL_API=gles2
2*4882a593Smuzhiyunexport GST_GL_PLATFORM=egl
3*4882a593Smuzhiyun
4*4882a593Smuzhiyunexport GST_DEBUG_NO_COLOR=1
5*4882a593Smuzhiyunexport GST_INSPECT_NO_COLORS=1
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun# Skip vstride aligning, which is not required when using RKVENC.
8*4882a593Smuzhiyun# export GST_MPP_ENC_UNALIGNED_VSTRIDE=1
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun# Convert to NV12(using RGA) when output format is NV12_10.
11*4882a593Smuzhiyun# export GST_MPP_DEC_DISABLE_NV12_10=1
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun# Convert to NV12(using RGA) when output format is not NV12.
14*4882a593Smuzhiyun# export GST_MPP_VIDEODEC_DEFAULT_FORMAT=NV12
15*4882a593Smuzhiyun
16*4882a593Smuzhiyun# Try to use ARM AFBC to get better performance, but not work for all sinks.
17*4882a593Smuzhiyun# export GST_MPP_VIDEODEC_DEFAULT_ARM_AFBC=1
18*4882a593Smuzhiyun
19*4882a593Smuzhiyun# Use below env variables to configure kmssink plane ZPOS.
20*4882a593Smuzhiyun# export KMSSINK_PLANE_ZPOS=0
21*4882a593Smuzhiyun# export KMSSINK_PLANE_ON_TOP=1
22*4882a593Smuzhiyun# export KMSSINK_PLANE_ON_BOTTOM=1
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun# There's an extra vsync waiting in kmssink, which is only needed for BSP 4.4
25*4882a593Smuzhiyun# kernel(due to ecac2033831e FROMLIST: drm: skip wait on vblank for set plane).
26*4882a593Smuzhiyun# Skip it would bring better performance with frame dropping.
27*4882a593Smuzhiyun# export KMSSINK_DISABLE_VSYNC=1
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun# The waylandsink is async by default, which allows frame dropping.
30*4882a593Smuzhiyun# export WAYLANDSINK_SYNC_FRAME=1
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun# Put video surface above UI window in waylandsink.
33*4882a593Smuzhiyun# export WAYLANDSINK_PLACE_ABOVE=1
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun# Preferred formats for V4L2
36*4882a593Smuzhiyunexport GST_V4L2_PREFERRED_FOURCC=NV12:YU12:NV16:YUY2
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun# Preferred formats for videoconvert
39*4882a593Smuzhiyunexport GST_VIDEO_CONVERT_PREFERRED_FORMAT=NV12:NV16:I420:YUY2
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun# Using libv4l2 for V4L2
42*4882a593Smuzhiyunexport GST_V4L2_USE_LIBV4L2=1
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun# Default device for v4l2src
45*4882a593Smuzhiyunexport GST_V4L2SRC_DEFAULT_DEVICE=/dev/video-camera0
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun# Available RK devices for v4l2src
48*4882a593Smuzhiyunexport GST_V4L2SRC_RK_DEVICES=_mainpath:_selfpath:_bypass:_scale
49*4882a593Smuzhiyun
50*4882a593Smuzhiyun# Max resolution for v4l2src
51*4882a593Smuzhiyunexport GST_V4L2SRC_MAX_RESOLUTION=3840x2160
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun# Preferred sinks for playbin3(autoaudiosink/autovideosink) and playbin.
54*4882a593Smuzhiyun# export AUTOAUDIOSINK_PREFERRED=alsasink
55*4882a593Smuzhiyun# export AUTOVIDEOSINK_PREFERRED=waylandsink
56*4882a593Smuzhiyun# export PLAYBIN2_PREFERRED_AUDIOSINK=alsasink
57*4882a593Smuzhiyun# export PLAYBIN2_PREFERRED_VIDEOSINK=waylandsink
58*4882a593Smuzhiyunexport AUTOVIDEOSINK_PREFERRED=xvimagesink
59*4882a593Smuzhiyunexport PLAYBIN2_PREFERRED_VIDEOSINK=xvimagesink
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun# Try RGA 2D accel in videoconvert, videoscale and videoflip.
62*4882a593Smuzhiyun# NOTE: Might not success, and might behave different from the official plugin.
63*4882a593Smuzhiyun# export GST_VIDEO_CONVERT_USE_RGA=1
64*4882a593Smuzhiyun# export GST_VIDEO_FLIP_USE_RGA=1
65*4882a593Smuzhiyunexport GST_MPP_NO_RGA=1
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun# Default rotation for camerabin2:
68*4882a593Smuzhiyun# clockwise(90)|rotate-180|counterclockwise(270)|horizontal-flip|vertical-flip
69*4882a593Smuzhiyun# export CAMERA_FLIP=clockwise
70*4882a593Smuzhiyunif [ $CAMERA_FLIP ]; then
71*4882a593Smuzhiyun	CAMERA_FILTER="videoflip method=$CAMERA_FLIP"
72*4882a593Smuzhiyun	export CAMERABIN2_PREVIEW_FILTER=$CAMERA_FILTER
73*4882a593Smuzhiyun	export CAMERABIN2_IMAGE_FILTER=$CAMERA_FILTER
74*4882a593Smuzhiyun	export CAMERABIN2_VIDEO_FILTER=$CAMERA_FILTER
75*4882a593Smuzhiyun	export CAMERABIN2_VIEWFINDER_FILTER=$CAMERA_FILTER
76*4882a593Smuzhiyunfi
77