AgeCommit message (Collapse)AuthorFilesLines
2021-08-06v4l2: Fix critical warning "passed '0' as denominator for `GstFraction'"lf-5.10.52-2.1.0MM_04.06.02_2108_L5.10.yHou Qi1-3/+5
Amphion v4l2 driver doesn't have capability to change framerate which makes fps info to be 0. Need to refine last commit to add protection when set decoder capture fps according to output fps.
2021-08-03v4l2: Keep decoder capture fps same as output fps if it's not setHou Qi2-0/+32
Part-of: <>
2021-06-03v4l2videodec: always apply amphion tile modifier for amphion vpuHaihua Hu1-2/+5
imxvideoconvert_g2d and glimagesink will not propose dmabuf modifier meta upstream. On 8qm qxp, vpu will always output tile format, so no need to change modifier for amphion platform
2021-05-28v4l2videoenc: Set default latency if the frame duration is invalidHou Qi1-0/+4
If the duration of the v4l2object is invalid, use default 25fps instead. Part-of: <>
2021-04-30v4l2object: Improve colorspace handling to support uvc deviceHou Qi1-1/+12
v4l2 encoder won't probe all colorspace, range, matrix and transfer combination to save initialization time for low-speed devices. Unfortunately uvc driver default colorimetry is not in the colorimetry list of v4l2 encoder and it causes not-negotiated. If desired colorspace is 1:4:7:1, uvc driver will produce 1:4:5:1. To fix this, need to allow colorimetry 1:4:5:1 produced by uvc driver if desired colorspace is 1:4:7:1. This workaround should be removed later like discussion in
2021-04-28v4l2object: Add interlace-mode back to caps for cameraHou Qi1-8/+19
skip_try_fmt_probes is set to TRUE for v4l2src to skip interlace-mode and colorimetry when probe caps. gst_v4l2_object_set_format_full() will add colorimetry back to caps when iterating over the negotiated caps. There is one case that v4l2src is first in preview state then starts recording. v4l2src caps will change with an additional interlace-mode structure after renegotiation, then v4l2src needs to reset. But this camera driver can't orphan buffer pool, it causes require buffer failed as streaming is still in active state. To fix this, also need to add interlace-mode back to caps for camera to avoid reset. Part-of: <>
2021-04-06MMFMWK-8950 v4l2object: Fix 10bit stream play abnormal on 8MM/8MPHou Qi1-0/+3
Change output pixelformat from NVX2 to NV12 for 10 bit stream on 8MM/8MP.
2021-03-31v4l2object: Use default colorimetry if that in caps is unknownHou Qi1-0/+10
Some streams have unknown colorimetry in caps, but v4l2object sets default values for each primaries. It will cause check colorimetry fail when do gst_v4l2_video_colorimetry_matches(). To fix this, need to keep the unknown colorimetry in caps same as the default value set by v4l2object. Part-of: <>
2021-03-30Apply 1 suggestion(s) to 1 file(s)Kevin Song1-1/+2
Part-of: <>
2021-03-30Apply 1 suggestion(s) to 1 file(s)Kevin Song1-1/+1
Part-of: <>
2021-03-30v4l2videoenc: support resolution change stream encode.Bing Song1-2/+4
Resolution change stream transcoding will drain before send new video frame buffer. Need encode video frame after process EOS. Part-of: <>
2021-03-25v4l2: Add v4l2 plugin print informationHou Qi2-0/+4
Below information will be printed before v4l2 decoding and encoding. ====== V4L2DEC: 1.18.0 build on Mar 25 2021 04:14:21. ====== ====== V4L2ENC: 1.18.0 build on Mar 25 2021 04:14:21. ======
2021-03-24v4l2object: Avoid colorimetry mismatch for streams with invalid colorimetryHou Qi1-7/+6
video-info sets gst colorimetry to default value when colorimetry in caps is unparsable or invalid. Then v4l2object uses this gst colorimetry to do mapping with v4l2 colorimetry. This may cause colorimetry mismatch when check mapped gst colorimetry with that read from caps directly. To fix this, need to correct gst colorimetry as that parsed from video-info when check gst_v4l2_video_colorimetry_matches(). Part-of: <>
2021-03-19v4l2object: Refine last commit to support hdr10 video playbackHou Qi1-1/+5
Colorimetry of hdr10 video is bt2100-pq with transfer as GST_VIDEO_TRANSFER_SMPTE2084. So map GST_VIDEO_TRANSFER_SMPTE2084 to V4L2_XFER_FUNC_SMPTE2084 to support this kind of video.
2021-03-10v4l2videodec: Add hdr metadata into src capsHou Qi5-4/+107
2021-03-10v4l2videodec: Add hantro tiled output supportHou Qi5-2/+102
2021-03-04v4l2videodec: Do not expose profiles/levels in vp8/vp9 template capsHou Qi1-1/+2
Vp8/vp9 supported profiles/levels are listed in decoder sink caps, but there is no parser for these two formats and the demuxers also don't have these information. It causes negotiation fail between demuxers and decoder when check caps "accept = gst_caps_is_subset (caps, template_caps);". To fix this, need to remove profiles/levels for vp8/vp9 formats in decoder sink caps. UpStream Status: Accepted
2021-02-23MMFMWK-8941 [hantro] playback fail for VC1_GBing Song1-0/+19
Hantro VC1_G need user space dequeue event after process codec data. So start output task after queue codec data. Signed-off-by: Bing Song <>
2021-02-05v4l2object: Fix hantro 10bit stream display is blackHou Qi1-0/+1
Set right stride for NV12_10LE output format.
2021-01-29v4l2videodec: Add hantro 10bit supportHou Qi2-1/+9
2021-01-28v4l2videoenc: Add BGR16 format support.Hou Qi2-0/+11
Signed-off-by: Hou Qi <>
2021-01-28v4l2h265codec: fix HEVC profile string issue.Bing Song1-4/+4
Keep HEVC profile compatible with other module. Part-of: <>
2021-01-28v4l2object: Need keep same transfer as input caps.Bing Song2-6/+13
GST_VIDEO_TRANSFER_BT2020_12 and GST_VIDEO_TRANSFER_BT2020_10 will be mapped to V4L2_XFER_FUNC_709. Need check input caps when map V4L2_XFER_FUNC_709 back to GST_VIDEO_TRANSFER_BT2020_12 and GST_VIDEO_TRANSFER_BT2020_10 Fixes: Part-of: <>
2021-01-18MMFMWK-8930 v4l2videodec: exchange V4L2_PIX_FMT_VC1_ANNEX_G and ↵Hou Qi1-2/+2
V4L2_PIX_FMT_VC1_ANNEX_L VC1_L and VC1_G are reversed in driver and v4l2 plugin for amphion. Driver has exchanged them, so we also need to modify accordingly here.
2021-01-14v4l2object: Map correct video format for RGBAHou Qi1-1/+1
Map V4L2_PIX_FMT_RGBA32 pixel format to GST_VIDEO_FORMAT_RGBA instead of GST_VIDEO_FORMAT_RGB video format to support RGBA. UpStream Status: Accepted
2021-01-13MMFMWK-8930 v4l2videodec: exchange V4L2_PIX_FMT_VC1_ANNEX_G and ↵Hou Qi1-2/+2
V4L2_PIX_FMT_VC1_ANNEX_L VC1_L and VC1_G are reversed in driver and v4l2 plugin for amphion. Driver has exchanged them, so we also need to modify accordingly here.
2020-12-18Revert "matroska-mux: Fix incorrect rounding of timestamps"Haihua Hu1-27/+5
this commit will cause our mkv parser dead loop while seeking keyframe This reverts commit ce802f033c8cee4f923c0d893dda0efd0d003689.
2020-12-15v4l2object: Use active resolution during fallback colorspace probeHou Qi1-1/+11
For legacy drivers that don't implement ENUM_FRAMESIZE, use active resolution to probe colorspace. This can improve the accuracy of the result when the colorspace depends on the resolution. This fixes a wrong colorspace issue on board with vendor bsp at resolution 2560x1440. UpStream Status: Accepted
2020-11-27v4l2videodec: Add hantro to use v4l2 buffer pool when link videodecoder to ↵Hou Qi3-1/+8
fakesink. UpStream Status: Pending Signed-off-by: Hou Qi <>
2020-11-17v4l2: caps negotiate wrong as interlace featureBing Song1-4/+10
gst_caps_simplify() will move interlace format before normal video format. It will cause caps negotiate prefer interlaced caps which isn't expected. Seperate normal caps and interlaced caps and then merge it will keep prefer progress video format. Add ARGB/BGRA for interlaced caps. Fixes Part-of <>
2020-10-28v4l2videodec: make a copy of input caps. Or will have critical warningBing Song1-1/+4
when remove colorimetry. Signed-off-by: Bing Song <>
2020-10-21v4l2videodec: Add lock for queue and stream offSong Bing1-6/+17
Add lock for queue and stream off, or v4l2 core will complain it. UpStream Status: Pending Signed-off-by: Song Bing<>
2020-10-21v4l2videodec: set max buffer count with min count.Bing Song1-6/+6
Output buffer pool set configure will fail if max diff with min count.
2020-09-30v4l2videodec: remove sleep 300 ms workaround.Bing Song1-3/+0
Needn't the work around now. v4l2 support orphon buffer. Signed-off-by: Bing Song <> (cherry picked from commit 6005e8199ea19878f269b058ffbbbcaa314472d8)
2020-09-30v4l2: remove video frame buffer size and buffer pool size limitation.Bing Song2-19/+0
Hantro video frame buffer size is larger than video frame content size. Signed-off-by: Bing Song <> (cherry picked from commit 3299cee5389a52207368f26edfe31ae89728a81d)
2020-09-30v4l2videodec: Add NV12 10bit support.Bing Song2-0/+10
Signed-off-by: Bing Song <> (cherry picked from commit 37bd402004def20b89dbad10086f71bbf8ab363e)
2020-09-30MMFMWK-8625 amrparse: fix AMR audio exit directly with eos after fast seekHou Qi1-2/+5
Need to skip one byte when not find valid frame in gst_amr_parse_handle_frame(). Otherwise, scan frame size will be bigger after each scan and finally return GST_FLOW_EOS, which cause audio exit directly after fast seek. UpStream Status: Pending Signed-off-by: Hou Qi <> (cherry picked from commit 929181c5b3162e31684c54fa2197d04541a87925)
2020-09-30v4l2videodec: Support seek for resolution change stream.Song Bing2-21/+39
Signed-off-by: Song Bing <> (cherry picked from commit f434ad2d0996c740eac8f72aa27353a0656e4f1c)
2020-09-30v4l2src: don't use export dmabuf for UVC as it use vmalloc for videoSong Bing3-0/+6
Signed-off-by: Song Bing <> (cherry picked from commit 7ff3e63025b72c3191dba8730a395b5958896098)
2020-09-30v4l2videodec: Add xvid support.Song Bing2-1/+7
Signed-off-by: Song Bing <> (cherry picked from commit 4678e89898a8e813097aeb95f1a9bacf94650995)
2020-09-30v4l2videodec: Add divx 4/5/6 support.Song Bing2-2/+21
Signed-off-by: Song Bing <> (cherry picked from commit f7daa25b3e20068b427db5b0404670672f9602cf)
2020-09-30v4l2videodec: Change divx 3 fourcc acording to driver changes.Song Bing2-4/+5
Signed-off-by: Song Bing <> (cherry picked from commit 3bce9e12f6e052fcd5e914adfdf8e7891743f271)
2020-09-30v4l2allocator: avoid map/unmap every frame as GstVideoFilter map/unmap video ↵Song Bing1-1/+1
frame every frame. Signed-off-by: Song Bing <> (cherry picked from commit 3a440db1dabb9c7f453a1b1bb860e2ce9dae3cf0)
2020-09-30v4l2videodec: enable multi-track selection.Song Bing2-1/+8
Signed-off-by: Song Bing <> (cherry picked from commit 1eae5b95a4d9a7038d32412fdaeb8f9a42ea0ad6)
2020-09-30v4l2videodec: Add decode error event.Song Bing4-0/+10
Signed-off-by: Song Bing <> (cherry picked from commit f4054ca5af068b13e767186e26672e17cd3fc5ed)
2020-09-30v4l2videodec: extend YUV 24 bit for IMG JPG decoder.Song Bing2-0/+10
Signed-off-by: Song Bing <> (cherry picked from commit 91e6fd685e7a1344880a391e4a672f51bf2234f3)
2020-09-30v4l2videodec: respect driver report formatSong Bing1-4/+1
jpeg dec only can output fixed format. Signed-off-by: Song Bing <> (cherry picked from commit af7ee9cbfdbac3f1dc72002d6e49bd8321434726)
2020-09-30v4l2videodec: Use driver report time stamp.Song Bing1-0/+3
Signed-off-by: Song Bing <> (cherry picked from commit 2b093259dd9f7f9dd22474b8a037437b4acec1b7)
2020-09-30v4l2videodec: Driver need know invalid timestamp.Song Bing1-0/+2
Signed-off-by: Song Bing <> (cherry picked from commit 420cbb5a961d32df5786597dced0ac2ba08ae5da)
2020-09-30v4l2videodec: support resolution changeSong Bing1-29/+0
Signed-off-by: Song Bing <> (cherry picked from commit 73303a125ebd2067ae22ef88018bef38417ebb11)