gstreamer/sys/mediafoundation
Seungha Yang ba26a5aea8 mfvideoenc: Enhance B-frame timestamp handling
When B-frame is enabled, encoder seems to adjust PTS of encoded sample
by using frame duration.

For instance, one observed timestamp pattern by using B-frame enabled
and 30fps stream is:
* Frame-1: MF pts 0:00.033333300 MF dts 0:00.000000000
* Frame-2: MF pts 0:00.133333300 MF dts 0:00.033333300
* Frame-3: MF pts 0:00.066666600 MF dts 0:00.066666600
* Frame-4: MF pts 0:00.099999900 MF dts 0:00.100000000

We can notice that the amount of PTS shift is frame duration and
Frame-4 exhibits PTS < DTS.

To compensate shifted timestamp, we should
calculate the timestamp offset and re-calculate DTS correspondingly.
Otherwise, total timeline of output stream will be shifted, and that
can cause time sync issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2354>
2021-06-23 14:12:22 +00:00
..
AsyncOperations.h mediafoundation: Add support video capture on UWP app 2020-05-25 15:09:20 +00:00
gstmfaacenc.cpp mediafoundation: Add support for AAC encoding 2020-05-27 10:34:47 +00:00
gstmfaacenc.h mediafoundation: Add support for AAC encoding 2020-05-27 10:34:47 +00:00
gstmfaudioenc.cpp plugins: Update for documentation of Windows plugins 2020-07-02 17:21:29 +02:00
gstmfaudioenc.h mediafoundation: Add support for AAC encoding 2020-05-27 10:34:47 +00:00
gstmfcapturewinrt.cpp mfvideosrc: Set timestamp on buffer when it's captured 2020-09-10 10:21:00 +00:00
gstmfcapturewinrt.h mfvideosrc: Add a new property for ICoreDispatcher setting 2020-07-26 12:52:15 +00:00
gstmfdevice.c mfvideosrc: Add a new property for ICoreDispatcher setting 2020-07-26 12:52:15 +00:00
gstmfdevice.h mediafoundation: Fix redefinition of variables. 2020-12-16 18:48:12 +00:00
gstmfh264enc.cpp mfvideoenc: Enhance B-frame timestamp handling 2021-06-23 14:12:22 +00:00
gstmfh264enc.h mfvideoenc: Add support for Direct3D11 texture 2021-01-13 20:15:04 +00:00
gstmfh265enc.cpp mfvideoenc: Enhance B-frame timestamp handling 2021-06-23 14:12:22 +00:00
gstmfh265enc.h mfvideoenc: Add support for Direct3D11 texture 2021-01-13 20:15:04 +00:00
gstmfmp3enc.cpp mediafoundation: Add support MP3 audio encoding 2020-05-27 10:34:47 +00:00
gstmfmp3enc.h mediafoundation: Add support MP3 audio encoding 2020-05-27 10:34:47 +00:00
gstmfsourceobject.c mfvideosrc: Set timestamp on buffer when it's captured 2020-09-10 10:21:00 +00:00
gstmfsourceobject.h mfvideosrc: Set timestamp on buffer when it's captured 2020-09-10 10:21:00 +00:00
gstmfsourcereader.cpp mediafoundation: Fix resource leak 2021-03-16 09:47:41 +00:00
gstmfsourcereader.h
gstmftransform.cpp gst: don't use volatile to mean atomic 2021-03-22 14:34:36 +11:00
gstmftransform.h mfvideoenc: Add support for Direct3D11 texture 2021-01-13 20:15:04 +00:00
gstmfutils.cpp mediafoundation: Correct wrong raw video format mapping 2020-08-17 21:39:13 +09:00
gstmfutils.h mfutils: Move IMediaType release function to common utility 2020-05-27 10:34:47 +00:00
gstmfvideobuffer.cpp mfvideoenc: Add support for zero-copy encoding 2020-09-09 07:25:52 +00:00
gstmfvideobuffer.h gst: don't use volatile to mean atomic 2021-03-22 14:34:36 +11:00
gstmfvideoenc.cpp mfvideoenc: Enhance B-frame timestamp handling 2021-06-23 14:12:22 +00:00
gstmfvideoenc.h mfvideoenc: Enhance B-frame timestamp handling 2021-06-23 14:12:22 +00:00
gstmfvideosrc.c mfvideosrc: Set timestamp on buffer when it's captured 2020-09-10 10:21:00 +00:00
gstmfvideosrc.h
gstmfvp9enc.cpp mfvideoenc: Add support for Direct3D11 texture 2021-01-13 20:15:04 +00:00
gstmfvp9enc.h mfvideoenc: Add support for Direct3D11 texture 2021-01-13 20:15:04 +00:00
gststrmif.h
mediacapturewrapper.cpp mfvideosrc: Set timestamp on buffer when it's captured 2020-09-10 10:21:00 +00:00
mediacapturewrapper.h mfvideosrc: Set timestamp on buffer when it's captured 2020-09-10 10:21:00 +00:00
meson.build mfvideoenc: Enable Direct3D multi-thread protection 2021-03-20 17:54:04 +09:00
plugin.c mfvideoenc: Add support for Direct3D11 texture 2021-01-13 20:15:04 +00:00