How yuan631111976/qtavplayer works
This repository is a Qt/QML multimedia player using FFmpeg for playback and OpenGL for video rendering. The documented workflow is to set a media source on AVPlayer, control playback or seek, and connect one or more AVOutput components to display video; audio uses Qt Multimedia. The graph includes the decoder’s packet/frame buffering and the bundled FFmpeg API boundaries. Source excerpts are partial, so some internal calls and the exact audio/render handoff are not verified; those relationships are omitted or marked unverified.
Main entry points: AVPlayer.cpp AVPlayer · AVDecoder.cpp AVDecoder · AVOutput.cpp AVOutput · AVDefine.h Playback states
Components 11
Playback control
- Playback states
AVDefine.h
Media processing
- AVDecoder
AVDecoder.cpp - Packet and frame queues
AVDecoder.h - FFmpeg demuxing
libs/include/libavformat/avformat.h - FFmpeg codecs
libs/include/libavcodec/avcodec.h - FFmpeg frame formats
libs/include/libavutil/frame.h
Media output
- OpenGL video rendering
AVOutput.cpp - Qt audio output
AVPlayer.cpp
Other components
- QML application
Connections 11
- QML application → AVPlayer: creates and controls
- QML application → AVOutput: connects source
- AVPlayer → Playback states: reports status
- AVPlayer → AVDecoder: delegates playback
- AVDecoder → FFmpeg demuxing: demuxes media
- AVDecoder → FFmpeg codecs: decodes streams
- AVDecoder → Packet and frame queues: buffers packets and frames
AVDecoder.h - AVDecoder → FFmpeg frame formats: produces decoded frames
- AVOutput → OpenGL video rendering: renders video
AVOutput.cpp - AVPlayer → Qt audio output: plays audio
AVPlayer.cpp - AVPlayer → AVOutput: supplies video source