Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

24 lines
1.8 KiB
ReStructuredText

.. meta::
:description: The rocDecode VideoDemuxer utility class
:keywords: video demuxing, video demultiplexing, rocDecode, core APIs, AMD, ROCm, utility class
********************************************************************
The rocDecode VideoDemuxer utility class
********************************************************************
The rocDecode FFMpeg demuxer utility class, `VideoDemuxer <https://github.com/ROCm/rocm-systems/tree/develop/projects/rocdecode/utils/video_demuxer.h>`_, is used to demultiplex (demux) frames that can then be consumed by the :doc:`FFMpeg decoder <./rocDecode-ffmpeg-decoder>` or the :doc:`hardware decoder <./rocDecode-hw-decoder>`.
The ``VideoDemuxer()`` constructor takes either a file path or a StreamProvider object. The StreamProvider class is an abstract class that feeds a stream of packets to the demuxer. The StreamProvider ``GetData()`` and ``GetBufferSize()`` functions must be implemented to use a StreamProvider.
The VideoDemuxer ``Demux()`` function extracts the next video packet from the stream, and returns a pointer to the packet data, the packet size, and optionally the presentation timestamp.
``Demux()`` demuxes frames sequentially starting at the beginning of the stream. The ``seek()`` function is used to start demuxing from a different frame.
A ``VideoSeekContext`` is passed to ``seek()``. The seek context specifies a seek criteria and a seek mode. The seek criteria describe whether the demuxer needs to seek to a specific frame or seek to a specific timestamp. The seek mode indicates whether the demuxer should seek to the exact frame or to the previous keyframe.
.. note::
The FFmpeg development libraries must be installed to use the FFMpeg demuxer:
``sudo apt install libavcodec-dev libavformat-dev libavutil-dev``