aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native/libav/ffmpeg_tool.h
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-27 07:36:07 +0100
committerSven Göthel <[email protected]>2024-01-27 07:36:07 +0100
commit7fe9da9d2b5b7475ea3878b0a8d23f485bb19dff (patch)
tree754038a85a573ce1ea682bfa2f5407071e12b500 /src/jogl/native/libav/ffmpeg_tool.h
parenta8e382bf6ebc7d405ef2479dae97762d9b7e2967 (diff)
GLMediaPlayer: Add initial subtitle support, track audio/video/subtitle streams and languages and add convenient switchStream(..) entry.
audio/video/subtitle streams and language metadata is maintained by arrays holding the stream-IDs and language string identifier. Implementation added in FFMPEGPlayer for these data-sets.
Diffstat (limited to 'src/jogl/native/libav/ffmpeg_tool.h')
-rw-r--r--src/jogl/native/libav/ffmpeg_tool.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jogl/native/libav/ffmpeg_tool.h b/src/jogl/native/libav/ffmpeg_tool.h
index 02a297f73..5e23ca882 100644
--- a/src/jogl/native/libav/ffmpeg_tool.h
+++ b/src/jogl/native/libav/ffmpeg_tool.h
@@ -134,6 +134,8 @@ typedef struct {
int64_t dtsLast; // DTS of the last frame
} PTSStats;
+#define MAX_STREAM_COUNT 64
+
typedef struct {
jobject ffmpegMediaPlayer;
int32_t verbose;
@@ -151,6 +153,8 @@ typedef struct {
AVPacket* packet;
AVFormatContext* pFormatCtx;
+ uint32_t v_stream_count;
+ int32_t v_streams[MAX_STREAM_COUNT];
int32_t vid;
AVStream* pVStream;
AVCodecParameters* pVCodecPar;
@@ -168,6 +172,8 @@ typedef struct {
int32_t vHeight;
jboolean vFlipped; // false: !GL-Orientation, true: GL-Orientation
+ uint32_t a_stream_count;
+ int32_t a_streams[MAX_STREAM_COUNT];
int32_t aid;
AVStream* pAStream;
AVCodecParameters* pACodecPar;
@@ -190,6 +196,11 @@ typedef struct {
int32_t aPTS; // msec - overall last audio PTS
PTSStats aPTSStats;
+ uint32_t s_stream_count;
+ int32_t s_streams[MAX_STREAM_COUNT];
+ int32_t sid;
+ AVStream* pSStream;
+
float fps; // frames per seconds
int32_t bps_stream; // bits per seconds
int32_t bps_video; // bits per seconds