mirror of
https://github.com/albfan/miraclecast.git
synced 2025-02-12 17:51:55 +00:00
miracle-dispd: add hardware accelection video encoding back to gstencoder
Change-Id: I577082a70da61b6266e67c0b8611662ae9bc316c
This commit is contained in:
parent
64d94b6017
commit
ef0532f29b
1 changed files with 13 additions and 6 deletions
|
@ -132,11 +132,19 @@ internal class GstEncoder : DispdEncoder, GLib.Object
|
|||
"ximagesrc name=vsrc use-damage=false show-pointer=false " +
|
||||
"startx=%u starty=%u endx=%u endy=%u " +
|
||||
"! video/x-raw, framerate=%u/1 " +
|
||||
"! videoscale method=0 " +
|
||||
"! video/x-raw, width=1920, height=1080 " +
|
||||
"! videoconvert dither=0 " +
|
||||
"! video/x-raw, format=YV12 " +
|
||||
"! x264enc pass=4 b-adapt=false key-int-max=%u speed-preset=4 tune=4 " +
|
||||
"! vaapipostproc " +
|
||||
"scale-method=2 " + /* high quality scaling mode */
|
||||
/* "format=3 " + */ /* yv12" */
|
||||
"! video/x-raw, format=YV12, width=1920, height=1080 " +
|
||||
"! vaapih264enc " +
|
||||
"rate-control=1 " +
|
||||
"num-slices=1 " + /* in WFD spec, one slice per frame */
|
||||
"max-bframes=0 " + /* in H264 CHP, no bframe supporting */
|
||||
"cabac=true " + /* in H264 CHP, CABAC entropy codeing is supported, but need more processing to decode */
|
||||
"dct8x8=true " + /* in H264 CHP, DTC is supported */
|
||||
"cpb-length=50 " + /* shortent buffer in order to decrease latency */
|
||||
"keyframe-period=30 " +
|
||||
/* "bitrate=62500 " + *//* the max bitrate of H264 level 4.2, crashing my dongle, let codec decide */
|
||||
"! h264parse " +
|
||||
"! video/x-h264, alignment=nal, stream-format=byte-stream " +
|
||||
"%s " +
|
||||
|
@ -160,7 +168,6 @@ internal class GstEncoder : DispdEncoder, GLib.Object
|
|||
? configs.get(DispdEncoderConfig.HEIGHT).get_uint32() - 1
|
||||
: 1079,
|
||||
framerate,
|
||||
framerate,
|
||||
configs.contains(DispdEncoderConfig.AUDIO_TYPE)
|
||||
? "! queue max-size-buffers=0 max-size-bytes=0"
|
||||
: "",
|
||||
|
|
Loading…
Reference in a new issue