From 7fee647c84fab993fc7ba7df7747d6238e41193b Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Tue, 3 Sep 2024 09:44:53 +0100
Subject: [PATCH 01/32] Update to bug report form
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 9b3f25f37..c2fc74cb2 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -1,6 +1,6 @@
name: Bug report
-description: Create a report to help us improve
-title: "[ bug Report ]"
+description: Create a report to help the development team understand and replicate the issue you are facing.
+title: "[ Bug Report ]"
labels: Awaiting Triage
body:
@@ -16,10 +16,9 @@ body:
description: |
Please select the TombEngine Version from the dropdown list.
options:
+ - v1.5 (development build)
- v1.4
- v1.3
- - v1.2
- - v1.1
validations:
required: true
@@ -29,6 +28,7 @@ body:
description: |
Please select the Tomb Editor version used from the dropdown list.
options:
+ - v1.7.2 (development build)
- v1.7.1
- v1.7.0
- v1.6.9
@@ -58,16 +58,6 @@ body:
validations:
required: true
-- type: textarea
- attributes:
- label: Expected Behaviour
- description: |
- A clear and concise description of what you expected to happen.
- placeholder: |
- A description of what should happen here.
- validations:
- required: true
-
- type: textarea
attributes:
label: Screenshots
@@ -80,14 +70,14 @@ body:
validations:
required: true
-- type: textarea
+- type: checkboxes
attributes:
label: Additional Content
description: |
Add any other context about the problem here.
* Are you testing an build of a TombEngine that has not yet been released? If so please give some context.
- * Did you get any asset from the TombEngine website that has presented a bug?
+ * Did you get any asset from the TombEngine website that has presented a bug?
placeholder: |
A description of any additional content here.
validations:
From eca79130a0acef2c4371054ef0ef40367a1c905a Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Tue, 3 Sep 2024 09:45:21 +0100
Subject: [PATCH 02/32] Update bug_report.yaml
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index c2fc74cb2..3f31d49cc 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -1,6 +1,6 @@
name: Bug report
-description: Create a report to help the development team understand and replicate the issue you are facing.
-title: "[ Bug Report ]"
+description: Create a report to help us understand and diagnose your issue. Your contribution is welcomed and valued!
+title: "[ bug Report ]"
labels: Awaiting Triage
body:
@@ -18,7 +18,6 @@ body:
options:
- v1.5 (development build)
- v1.4
- - v1.3
validations:
required: true
@@ -28,11 +27,9 @@ body:
description: |
Please select the Tomb Editor version used from the dropdown list.
options:
- - v1.7.2 (development build)
+ - v1.7.2 (development version)
- v1.7.1
- v1.7.0
- - v1.6.9
- - v1.6.8
validations:
required: true
@@ -60,24 +57,22 @@ body:
- type: textarea
attributes:
- label: Screenshots
+ label: Expected Behaviour
description: |
- Please check this box if you have provided screenshots or any other media for this issue
- **note** If you do not provide screenshots or anything else, it may be hard for devs to investigate
- provide a link to your screenshot here or simply drag and drop your screenshot into this textbox
+ A clear and concise description of what you expected to happen.
placeholder: |
- A description of any additional content here.
+ A description of what should happen here.
validations:
required: true
-- type: checkboxes
+- type: textarea
attributes:
label: Additional Content
description: |
Add any other context about the problem here.
* Are you testing an build of a TombEngine that has not yet been released? If so please give some context.
- * Did you get any asset from the TombEngine website that has presented a bug?
+ * Did you get any asset from the TombEngine website that has presented a bug?
placeholder: |
A description of any additional content here.
validations:
From 30e053dc935646a3c8d900b2adbd90b107995048 Mon Sep 17 00:00:00 2001
From: Nemoel-Tomo
Date: Wed, 30 Oct 2024 18:00:21 +0100
Subject: [PATCH 03/32] Update AUTHORS.md
- Tomo (general coding, special FX coding, bug fixing)
---
AUTHORS.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/AUTHORS.md b/AUTHORS.md
index d7122440f..096d4944c 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -18,7 +18,7 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- Squidshire (Hispidence) (Lua implementation, bug fixing)
- Stranger1992 (sound asset refactoring and organisation, assets)
- TokyoSU (entity and vehicle decompilation)
-- Tomo (general coding, bug fixing)
+- Tomo (general coding, special FX coding, bug fixing)
- Troye (general coding, refactoring)
- Nickelony (general coding)
- JesseG, aka WolfCheese (general coding)
From fae8744e4bc950f962a4824e8a6e1ff485a08be7 Mon Sep 17 00:00:00 2001
From: Jakub <80340234+Jakub768@users.noreply.github.com>
Date: Sun, 3 Nov 2024 14:16:05 +0000
Subject: [PATCH 04/32] Update CHANGELOG.md
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ee74d0abb..bffb81bb0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
The dates are in European standard format where date is presented as **YYYY-MM-DD**.
TombEngine releases are located in this repository (alongside with Tomb Editor): https://github.com/TombEngine/TombEditorReleases
-## Version 1.5 - xxxx-xx-xx
+## Version 1.5 - 2024-11-03
### Bug fixes
From 1affcce9b95727ab110e77e55538835465442cba Mon Sep 17 00:00:00 2001
From: Jakub <80340234+Jakub768@users.noreply.github.com>
Date: Sun, 3 Nov 2024 14:18:34 +0000
Subject: [PATCH 05/32] Update CHANGELOG.md
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bffb81bb0..499dcefc4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
The dates are in European standard format where date is presented as **YYYY-MM-DD**.
TombEngine releases are located in this repository (alongside with Tomb Editor): https://github.com/TombEngine/TombEditorReleases
-## Version 1.5 - 2024-11-03
+## [Version 1.5](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.2) - 2024-11-03
### Bug fixes
From d256fe1efe9474bac52620d21d26c15a53c23efc Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Sun, 3 Nov 2024 22:19:11 +0000
Subject: [PATCH 06/32] Update bug_report.yaml
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 3f31d49cc..30aa5c96d 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -16,7 +16,8 @@ body:
description: |
Please select the TombEngine Version from the dropdown list.
options:
- - v1.5 (development build)
+ - Development Build
+ - v1.5.0.2 (Latest Release)
- v1.4
validations:
required: true
@@ -27,7 +28,8 @@ body:
description: |
Please select the Tomb Editor version used from the dropdown list.
options:
- - v1.7.2 (development version)
+ - Development Build
+ - v1.7.2
- v1.7.1
- v1.7.0
validations:
From b27ba26b6b48cdec79a2340b9f189c3c7e78c312 Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Fri, 27 Dec 2024 21:22:13 +0000
Subject: [PATCH 07/32] Update bug_report.yaml
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 30aa5c96d..f0e368c77 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -17,8 +17,8 @@ body:
Please select the TombEngine Version from the dropdown list.
options:
- Development Build
- - v1.5.0.2 (Latest Release)
- - v1.4
+ - v1.7 (Latest release)
+ - v1.6
validations:
required: true
@@ -29,6 +29,7 @@ body:
Please select the Tomb Editor version used from the dropdown list.
options:
- Development Build
+ - v1.7.3 (Latest release)
- v1.7.2
- v1.7.1
- v1.7.0
@@ -74,7 +75,7 @@ body:
Add any other context about the problem here.
* Are you testing an build of a TombEngine that has not yet been released? If so please give some context.
- * Did you get any asset from the TombEngine website that has presented a bug?
+ * Did you get any asset from the TombEngine website that has presented a bug?
placeholder: |
A description of any additional content here.
validations:
From f61c9cf4fff4ffcb6e5317998b5b2caf6ecf1796 Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Sat, 4 Jan 2025 18:32:12 +0000
Subject: [PATCH 08/32] Release cleanup
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 6 ++++--
CHANGELOG.md | 2 +-
TombEngine/version.h | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index f0e368c77..540bfcbd3 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -17,7 +17,8 @@ body:
Please select the TombEngine Version from the dropdown list.
options:
- Development Build
- - v1.7 (Latest release)
+ - v1.7.1 (Latest release)
+ - v1.7
- v1.6
validations:
required: true
@@ -29,7 +30,8 @@ body:
Please select the Tomb Editor version used from the dropdown list.
options:
- Development Build
- - v1.7.3 (Latest release)
+ - v1.7.4 (Latest release)
+ - v1.7.3
- v1.7.2
- v1.7.1
- v1.7.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1c3ab55f8..b81eedcc2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
The dates are in European standard format where date is presented as **YYYY-MM-DD**.
TombEngine releases are located in this repository (alongside with Tomb Editor): https://github.com/TombEngine/TombEditorReleases
-## Version 1.7.1 - xxxx-xx-xx
+## [Version 1.7.1] (https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.7.4) - 2025-04-01
### Bug fixes
* Fixed static meshes with dynamic light mode not accepting room lights.
diff --git a/TombEngine/version.h b/TombEngine/version.h
index 81b6bde52..bc0f103cf 100644
--- a/TombEngine/version.h
+++ b/TombEngine/version.h
@@ -10,7 +10,7 @@
#define TEN_BUILD_NUMBER 1
#define TEN_REVISION_NUMBER 0
-#define TEST_BUILD 1
+#define TEST_BUILD 0
#define TOSTR(x) #x
#define MAKE_VERSION_STRING(major, minor, build, revision) TOSTR(major) "." TOSTR(minor) "." TOSTR(build) "." TOSTR(revision)
From 75144d877e037b107dde78e1e339dcf38eb2adad Mon Sep 17 00:00:00 2001
From: Jakub <80340234+Jakub768@users.noreply.github.com>
Date: Sat, 1 Feb 2025 12:06:42 +0000
Subject: [PATCH 09/32] Update LICENSE
---
LICENSE | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
index a49810cf6..350616db7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2024 TombEngine Team
+Copyright (c) 2025 TombEngine Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
From 9a08c05a19b546b129f839fabdd50c8bc50e4dfe Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Sun, 16 Mar 2025 10:41:23 +0000
Subject: [PATCH 10/32] Update bug_report.yaml
---
.github/ISSUE_TEMPLATE/bug_report.yaml | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml
index 30aa5c96d..e123eab74 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yaml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yaml
@@ -1,5 +1,5 @@
name: Bug report
-description: Create a report to help us understand and diagnose your issue. Your contribution is welcomed and valued!
+description: Create a report to help us understand and diagnose your issue. Your contribution is welcomed and valued! It is highly recommended that you are using the latest version before submitting a bug report.
title: "[ bug Report ]"
labels: Awaiting Triage
@@ -8,17 +8,19 @@ body:
- type: markdown
attributes:
value: |
- Please follow this document in order to report a bug
+ Please follow this document in order to report a bug. It is highly recommended that you are using the latest version before submitting a bug report.
- type: dropdown
attributes:
label: TombEngine version
description: |
- Please select the TombEngine Version from the dropdown list.
+ Please select the TombEngine Version from the dropdown list.
options:
- Development Build
- - v1.5.0.2 (Latest Release)
- - v1.4
+ - v1.8.0 (latest version)
+ - v1.7.1
+ - v1.7.0
+ - v1.5
validations:
required: true
@@ -29,6 +31,7 @@ body:
Please select the Tomb Editor version used from the dropdown list.
options:
- Development Build
+ - v1.8.0 (latest version)
- v1.7.2
- v1.7.1
- v1.7.0
From a4b3019ce9832d6cd92e66cae3e5efe5c4b4abf0 Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Sun, 16 Mar 2025 10:56:18 +0000
Subject: [PATCH 11/32] Update changelog for 1.8 release
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4a0b7ac08..8fe88a532 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,7 +3,7 @@
The dates are in European standard format where date is presented as **YYYY-MM-DD**.
TombEngine releases are located in this repository (alongside with Tomb Editor): https://github.com/TombEngine/TombEditorReleases
-## [Version 1.8](link to release) - yyyy-mm-dd
+## [Version 1.8](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.8) - 2025-03-16
### Bug fixes
* Improved engine performance up to 20%.
From 6e5d23db6a06ea2b67abefed527a54b0c862e85c Mon Sep 17 00:00:00 2001
From: Jakub <80340234+Jakub768@users.noreply.github.com>
Date: Sun, 30 Mar 2025 23:55:16 +0100
Subject: [PATCH 12/32] Update AUTHORS.md
Update AUTHORS.md
Add TrainWreck to AUTHORS.md
Update AUTHORS.md
---
AUTHORS.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/AUTHORS.md b/AUTHORS.md
index 096d4944c..87c738cfa 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -6,7 +6,7 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- MontyTRC (Project Leader)
-- Gancian (general coding)
+- Gancian (general coding
- Krystian (general coding)
- Kubsy (Some cleanups and fixes)
- l.m. (general coding, Lua enhancements, bug fixing)
@@ -17,6 +17,7 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- Sezz (player state refactoring, general coding, code cleanups, bug fixing, assets)
- Squidshire (Hispidence) (Lua implementation, bug fixing)
- Stranger1992 (sound asset refactoring and organisation, assets)
+- TrainWreck (asset coding and Lua enhancements
- TokyoSU (entity and vehicle decompilation)
- Tomo (general coding, special FX coding, bug fixing)
- Troye (general coding, refactoring)
@@ -49,5 +50,5 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- JoeyQuint (Standing 180° turn, monkey swing 180° turn)
### TombEngine Marketing
-- Kubsy (Twitter and forum posts)
-- Stranger1992 (This website, Facebook, Instagram, Youtube and Twitch.
+- Stranger1992 (Tomb Engine website, Discord, Facebook, Instagram, Youtube, X, and Twitch)
+- Kubsy (X and Reddit)
From 8fbf10b362f94ba8998330f593047e8a514cfb78 Mon Sep 17 00:00:00 2001
From: Lwmte <3331699+Lwmte@users.noreply.github.com>
Date: Mon, 31 Mar 2025 08:59:27 +0300
Subject: [PATCH 13/32] Update README.md
---
README.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 557b222d6..c5e824255 100644
--- a/README.md
+++ b/README.md
@@ -8,9 +8,7 @@
- Support for high framerate, antialiasing, mipmapping, and SSAO.
- Full diagonal geometry support.
- Uncapped map size.
-- A streamlined player control scheme..
-
-Contributions are welcome. If you would like to participate in development to any degree, whether that be through suggestions, bug reports, or code, join our [Discord server](https://discord.gg/h5tUYFmres).
+- A streamlined player control scheme.
*Tomb Engine* is used in conjunction with *Tomb Editor*. The repository can be found [here](https://github.com/MontyTRC89/Tomb-Editor).
@@ -36,6 +34,9 @@ Steps:
Once done, you should be able to build a level with *Tomb Editor* and run it in *TEN*.
+# Contributions
+Contributions are welcome. If you would like to participate in development to any degree, whether that be through suggestions, bug reports, or code, join our [Discord server](https://discord.gg/h5tUYFmres).
+
# Disclaimer
This community project is unaffiliated with Core Design, Eidos Interactive, or Embracer Group AB. *Tomb Raider* is a registered trademark of Embracer Group AB. *Tomb Engine* is not for sale. The code is open-source to encourage contributions and for study purposes. We are not responsible for illegal uses of this source code. This source code is released as-is and continues to be maintained by non-paid contributors in their free time.
From 84a74a80579c49c0e5e6d17839c53a57f6bb3085 Mon Sep 17 00:00:00 2001
From: Jakub <80340234+Jakub768@users.noreply.github.com>
Date: Mon, 31 Mar 2025 12:33:57 +0100
Subject: [PATCH 14/32] Update AUTHORS.md
---
AUTHORS.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/AUTHORS.md b/AUTHORS.md
index 87c738cfa..d74b91990 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -51,4 +51,3 @@ This is the credit list of **all** the people who contributed to TombEngine in a
### TombEngine Marketing
- Stranger1992 (Tomb Engine website, Discord, Facebook, Instagram, Youtube, X, and Twitch)
-- Kubsy (X and Reddit)
From ef9ba4a40dc2dd3395726eee32f2ca1e8997e46b Mon Sep 17 00:00:00 2001
From: Stranger1992 <84292688+Stranger1992@users.noreply.github.com>
Date: Sun, 13 Apr 2025 21:02:49 +0100
Subject: [PATCH 15/32] Updated Diary docs
---
Scripts/Engine/CustomDiary.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Scripts/Engine/CustomDiary.lua b/Scripts/Engine/CustomDiary.lua
index e62e2424d..20b029c37 100644
--- a/Scripts/Engine/CustomDiary.lua
+++ b/Scripts/Engine/CustomDiary.lua
@@ -531,9 +531,9 @@ end
-- @tparam Objects.ObjID objectIdBg Object ID for the diary's sprite.
-- @tparam int spriteIdBg SpriteID from the specified object for the diary's sprite.
-- @tparam Color colorBg Color of diary's sprite.
--- @tparam Vec2 pos X,Y position of the bar's background in screen percent (0-100).
+-- @tparam Vec2 pos X,Y position of the diary background sprite in screen percent (0-100).
-- @tparam float rot rotation of the diary's sprite (0-360).
--- @tparam Vec2 scale X,Y Scaling factor for the bar's background sprite.
+-- @tparam Vec2 scale X,Y Scaling factor for the diary background sprite.
-- @tparam View.AlignMode alignMode Alignment for the diary's sprite.
-- @tparam View.ScaleMode scaleMode Scaling for the diary's sprite.
-- @tparam Effects.BlendID blendMode Blending modes for the diary's sprite.
From ae7e38a9da26a181d9ce90fb8edc48dba85cce6d Mon Sep 17 00:00:00 2001
From: Lwmte <3331699+Lwmte@users.noreply.github.com>
Date: Fri, 18 Apr 2025 12:16:46 +0200
Subject: [PATCH 16/32] Update license
---
LICENSE | 23 +++++++++++++++--------
README.md | 2 +-
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/LICENSE b/LICENSE
index 350616db7..1010c5693 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,16 +1,23 @@
-MIT License
+Modified MIT License (for non-commercial use only)
Copyright (c) 2025 TombEngine Team
Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
+of this software and associated documentation files (the “Software”), to use,
+copy, modify, merge, publish, and distribute copies of the Software, and to
+permit persons to whom the Software is furnished to do so, for non-commercial
+purposes only, subject to the following conditions:
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
+1. Commercial use of the Software — including, but not limited to, selling,
+renting, leasing, or using it in a product or service for which you receive
+compensation (monetary or otherwise) — is strictly prohibited.
+
+2. The Software may be combined with proprietary or closed-source third-party
+components, provided those components are available for non-commercial use,
+and the resulting product is not used for commercial purposes.
+
+3. The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
diff --git a/README.md b/README.md
index c5e824255..cbc224c3e 100644
--- a/README.md
+++ b/README.md
@@ -38,5 +38,5 @@ Once done, you should be able to build a level with *Tomb Editor* and run it in
Contributions are welcome. If you would like to participate in development to any degree, whether that be through suggestions, bug reports, or code, join our [Discord server](https://discord.gg/h5tUYFmres).
# Disclaimer
-This community project is unaffiliated with Core Design, Eidos Interactive, or Embracer Group AB. *Tomb Raider* is a registered trademark of Embracer Group AB. *Tomb Engine* is not for sale. The code is open-source to encourage contributions and for study purposes. We are not responsible for illegal uses of this source code. This source code is released as-is and continues to be maintained by non-paid contributors in their free time.
+Tomb Engine uses modified MIT license for non-commercial use only. For more information, see [license](LICENSE). Tomb Engine is unaffiliated with Core Design, Eidos Interactive, or Embracer Group AB. *Tomb Raider* is a registered trademark of Embracer Group AB. Tomb Engine source code is open to encourage contributions and for study purposes. Tomb Engine team is not responsible for illegal use of this source code alone or in combination with third-party assets or components. This source code is released as-is and continues to be maintained by non-paid contributors in their free time.
From 4e9a3b62b998b53d2f5f160ea252ecaed188671f Mon Sep 17 00:00:00 2001
From: Lwmte <3331699+Lwmte@users.noreply.github.com>
Date: Fri, 18 Apr 2025 12:20:25 +0200
Subject: [PATCH 17/32] Fix merge conflicts, additional legal cleanup
---
AUTHORS.md | 4 ++--
TombEngine/Objects/game_object_ids.h | 2 +-
TombEngine/Scripting/Internal/TEN/Objects/ObjectIDs.h | 6 +++---
TombEngine/version.h | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/AUTHORS.md b/AUTHORS.md
index d74b91990..d25ba84fa 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -6,7 +6,7 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- MontyTRC (Project Leader)
-- Gancian (general coding
+- Gancian (general coding)
- Krystian (general coding)
- Kubsy (Some cleanups and fixes)
- l.m. (general coding, Lua enhancements, bug fixing)
@@ -17,7 +17,7 @@ This is the credit list of **all** the people who contributed to TombEngine in a
- Sezz (player state refactoring, general coding, code cleanups, bug fixing, assets)
- Squidshire (Hispidence) (Lua implementation, bug fixing)
- Stranger1992 (sound asset refactoring and organisation, assets)
-- TrainWreck (asset coding and Lua enhancements
+- TrainWreck (asset coding and Lua enhancements)
- TokyoSU (entity and vehicle decompilation)
- Tomo (general coding, special FX coding, bug fixing)
- Troye (general coding, refactoring)
diff --git a/TombEngine/Objects/game_object_ids.h b/TombEngine/Objects/game_object_ids.h
index 18c64a25b..a70404f76 100644
--- a/TombEngine/Objects/game_object_ids.h
+++ b/TombEngine/Objects/game_object_ids.h
@@ -746,7 +746,7 @@ enum GAME_OBJECT_ID : short
ID_INVENTORY_SUNGLASSES,
ID_INVENTORY_KEYS,
ID_INVENTORY_HEADPHONES,
- ID_INVENTORY_POLAROID,
+ ID_INVENTORY_PHOTO,
ID_SMOKE_EMITTER_WHITE = 1020,
ID_SMOKE_EMITTER_BLACK,
diff --git a/TombEngine/Scripting/Internal/TEN/Objects/ObjectIDs.h b/TombEngine/Scripting/Internal/TEN/Objects/ObjectIDs.h
index 04e5732a8..f7dbb1a31 100644
--- a/TombEngine/Scripting/Internal/TEN/Objects/ObjectIDs.h
+++ b/TombEngine/Scripting/Internal/TEN/Objects/ObjectIDs.h
@@ -1,7 +1,7 @@
#pragma once
// This file is generated automatically, do not edit it.
-// Last generated on 17/03/2025.
+// Last generated on 18/04/2025.
#include
#include
@@ -746,7 +746,7 @@ The following constants are inside ObjID.
INVENTORY_SUNGLASSES
INVENTORY_KEYS
INVENTORY_HEADPHONES
- INVENTORY_POLAROID
+ INVENTORY_PHOTO
SMOKE_EMITTER_WHITE
SMOKE_EMITTER_BLACK
SMOKE_EMITTER
@@ -1986,7 +1986,7 @@ static const std::unordered_map GAME_OBJECT_IDS {
{ "INVENTORY_SUNGLASSES", ID_INVENTORY_SUNGLASSES },
{ "INVENTORY_KEYS", ID_INVENTORY_KEYS },
{ "INVENTORY_HEADPHONES", ID_INVENTORY_HEADPHONES },
- { "INVENTORY_POLAROID", ID_INVENTORY_POLAROID },
+ { "INVENTORY_PHOTO", ID_INVENTORY_PHOTO },
{ "SMOKE_EMITTER_WHITE", ID_SMOKE_EMITTER_WHITE },
{ "SMOKE_EMITTER_BLACK", ID_SMOKE_EMITTER_BLACK },
{ "SMOKE_EMITTER", ID_SMOKE_EMITTER },
diff --git a/TombEngine/version.h b/TombEngine/version.h
index fd0d8bd9b..a7bbed0aa 100644
--- a/TombEngine/version.h
+++ b/TombEngine/version.h
@@ -5,7 +5,7 @@
#define TEN_BUILD_NUMBER 2
#define TEN_REVISION_NUMBER 0
-#define TEST_BUILD 0
+#define TEST_BUILD 1
#define TOSTR(x) #x
#define MAKE_VERSION_STRING(major, minor, build, revision) TOSTR(major) "." TOSTR(minor) "." TOSTR(build) "." TOSTR(revision)
From 299509dd47f25bf140695fd02bafbaf453ad87dd Mon Sep 17 00:00:00 2001
From: Lwmte <3331699+Lwmte@users.noreply.github.com>
Date: Sun, 20 Apr 2025 07:21:07 +0200
Subject: [PATCH 18/32] Correct default revolver muzzle offset
---
TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp b/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp
index cb65ca8d7..9db67dc64 100644
--- a/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp
+++ b/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp
@@ -26,7 +26,7 @@ namespace TEN::Scripting
// NOTE: Since Weapons array is bound to Lua directly and Lua accesses this array by native enum, where 0 is NONE, and 1 is PISTOLS,
// 0 index is omitted due to Lua indexing arrays starting from 1. 1 must be subtracted from initializer index.
Weapons[(int)LaraWeaponType::Pistol - 1] = { 8.0f, BLOCK(8), 9, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 3, true, true, true, true, false, Vec3( 0, 120, 30) };
- Weapons[(int)LaraWeaponType::Revolver - 1] = { 4.0f, BLOCK(8), 16, (int)BLOCK(0.65f), 21, 21, 6, ScriptColor(192, 128, 0), 9, 3, true, false, true, true, false, Vec3(-10, 130, 45) };
+ Weapons[(int)LaraWeaponType::Revolver - 1] = { 4.0f, BLOCK(8), 16, (int)BLOCK(0.65f), 21, 21, 6, ScriptColor(192, 128, 0), 9, 3, true, false, true, true, false, Vec3(-10, 130, 65) };
Weapons[(int)LaraWeaponType::Uzi - 1] = { 8.0f, BLOCK(8), 3, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 2, true, true, true, true, false, Vec3( 0, 110, 40) };
Weapons[(int)LaraWeaponType::Shotgun - 1] = { 10.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 3, 3, 6, ScriptColor(192, 128, 0), 12, 3, true, true, false, false, false, Vec3( 0, 210, 42) };
Weapons[(int)LaraWeaponType::HK - 1] = { 4.0f, BLOCK(12), 0, (int)BLOCK(0.50f), 4, 4, 30, ScriptColor(192, 128, 0), 12, 2, true, true, true, true, false, Vec3( 0, 220, 102) };
From 387f8a9ae1b2fdbe96d492dcac61d0b9ee3336c2 Mon Sep 17 00:00:00 2001
From: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Date: Sun, 20 Apr 2025 14:55:35 -0400
Subject: [PATCH 19/32] Expose player object interaction (#1617)
* First
* WIP
* WIP
* Move function to Lara. Add optional key input.
* Cleanup references
* Finished
* Update CHANGELOG.md
* Cleanup
* ExposeTestPosition
* Update LaraObject.cpp
* Update Lua moveable interaction functions
* Fix offset and constraint box
* Update interaction function names; tidy up doc comments
* Restore newline
* Two things
* Use const references
* Damagic
* Floats
* Move action to end
* Docs update
* Update CHANGELOG.md
---------
Co-authored-by: Sezz
---
CHANGELOG.md | 3 +
.../Scripting/Internal/ReservedScriptNames.h | 6 +-
.../Internal/TEN/Objects/Lara/LaraObject.cpp | 250 +++++++++++++-----
.../Internal/TEN/Objects/Lara/LaraObject.h | 15 +-
4 files changed, 204 insertions(+), 70 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5898fb6fe..2ea93e749 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,9 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Added `muzzleGlow` and `muzzleOffset` parameters to weapon settings.
* Fixed `Moveable.GetJointPosition` not returning correct results if moveable is invisible or not rendered.
+### Lua API changes
+* Added Interact function to `Lara` to allow alignment with moveables.
+
## [Version 1.8.1](https://github.com/TombEngine/TombEditorReleases/releases/tag/v1.8.1) - 2025-03-29
### Bug fixes
diff --git a/TombEngine/Scripting/Internal/ReservedScriptNames.h b/TombEngine/Scripting/Internal/ReservedScriptNames.h
index c21c3f3e3..3789116fa 100644
--- a/TombEngine/Scripting/Internal/ReservedScriptNames.h
+++ b/TombEngine/Scripting/Internal/ReservedScriptNames.h
@@ -361,15 +361,17 @@ static constexpr char ScriptReserved_ResetObjCamera[] = "ResetObjCamera";
static constexpr char ScriptReserved_UndrawWeapon[] = "UndrawWeapon";
static constexpr char ScriptReserved_GetHandStatus[] = "GetHandStatus";
static constexpr char ScriptReserved_GetWeaponType[] = "GetWeaponType";
-static constexpr char ScriptReserved_ThrowAwayTorch[] = "ThrowAwayTorch";
+static constexpr char ScriptReserved_PlayerDiscardTorch[] = "DiscardTorch";
static constexpr char ScriptReserved_SetWeaponType[] = "SetWeaponType";
-static constexpr char ScriptReserved_TorchIsLit[] = "TorchIsLit";
+static constexpr char ScriptReserved_PlayerIsTorchLit[] = "IsTorchLit";
static constexpr char ScriptReserved_PrintLog[] = "PrintLog";
static constexpr char ScriptReserved_PickMoveable[] = "PickMoveableByDisplayPosition";
static constexpr char ScriptReserved_PickStatic[] = "PickStaticByDisplayPosition";
static constexpr char ScriptReserved_GetDisplayPosition[] = "GetDisplayPosition";
static constexpr char ScriptReserved_GetCursorDisplayPosition[] = "GetCursorDisplayPosition"; // Deprecated
static constexpr char ScriptReserved_GetMouseDisplayPosition[] = "GetMouseDisplayPosition";
+static constexpr char ScriptReserved_PlayerInteract[] = "Interact";
+static constexpr char ScriptReserved_PlayerTestInteraction[] = "TestInteraction";
// Tables
static constexpr char ScriptReserved_ObjID[] = "ObjID";
diff --git a/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.cpp b/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.cpp
index 01516a829..087e6f10c 100644
--- a/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.cpp
+++ b/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.cpp
@@ -2,6 +2,7 @@
#include "LaraObject.h"
#include "Game/camera.h"
+#include "Game/collision/collide_item.h"
#include "Game/effects/item_fx.h"
#include "Game/Lara/lara.h"
#include "Game/Lara/lara_fire.h"
@@ -9,10 +10,18 @@
#include "Game/Lara/lara_struct.h"
#include "Objects/Generic/Object/burning_torch.h"
#include "Scripting/Internal/ReservedScriptNames.h"
+#include "Scripting/Internal/TEN/Input/ActionIDs.h"
#include "Scripting/Internal/TEN/Objects/Lara/AmmoTypes.h"
+#include "Scripting/Internal/TEN/Types/Color/Color.h"
+#include "Scripting/Internal/TEN/Types/Rotation/Rotation.h"
+#include "Scripting/Internal/TEN/Types/Vec3/Vec3.h"
+#include "Specific/Input/Input.h"
+#include "Specific/Input/InputAction.h"
#include "Specific/level.h"
-/// Class for extra player-only functions.
+using namespace TEN::Input;
+
+/// Class for player-only functions.
// Do not try to create an object of this type. Use the built-in *Lara* variable instead.
// LaraObject inherits all the functions of @{Objects.Moveable|Moveable}.
//
@@ -22,9 +31,9 @@
constexpr auto LUA_CLASS_NAME{ ScriptReserved_LaraObject };
using namespace TEN::Entities::Generic;
-/// Set player poison.
+/// Set the player's poison value.
// @function LaraObject:SetPoison
-// @tparam[opt] int poison Poison strength. Maximum value is 128 (default 0)
+// @tparam[opt] int poison New poison value. __default: 0, max: 128__
// @usage
// Lara:SetPoison(10)
void LaraObject::SetPoison(sol::optional potency)
@@ -41,9 +50,9 @@ void LaraObject::SetPoison(sol::optional potency)
}
}
-/// Get poison potency of Lara.
+/// Get the player's poison value.
// @function LaraObject:GetPoison
-// @treturn int Current poison potency.
+// @treturn int Poison value.
// @usage
// local poisonPotency = Lara:GetPoison()
int LaraObject::GetPoison() const
@@ -52,9 +61,9 @@ int LaraObject::GetPoison() const
return lara->Status.Poison;
}
-/// Set air value of Lara.
+/// Set the player's air value.
// @function LaraObject:SetAir
-// @tparam int air Air value to give Lara. Maximum value is 1800.
+// @tparam int air New air value. __max: 1800__
// @usage
// Lara:SetAir(100)
void LaraObject::SetAir(sol::optional air)
@@ -67,9 +76,9 @@ void LaraObject::SetAir(sol::optional air)
lara->Status.Air = LARA_AIR_MAX;
}
-/// Get air value of Lara.
+/// Get the player's air value.
// @function LaraObject:GetAir
-// @treturn int Current air value.
+// @treturn int Air value.
// @usage
// local currentAir = Lara:GetAir()
int LaraObject::GetAir() const
@@ -78,9 +87,9 @@ int LaraObject::GetAir() const
return lara->Status.Air;
}
-/// Set wetness value of Lara (causes dripping).
+/// Set the player's wetness value, causing drips.
// @function LaraObject:SetWet
-// @tparam int wetness Wetness value. Maximum value is 255.
+// @tparam int wetness New wetness value. __max: 255__
// @usage
// Lara:SetWet(100)
void LaraObject::SetWet(sol::optional wetness)
@@ -92,9 +101,9 @@ void LaraObject::SetWet(sol::optional wetness)
i = value;
}
-/// Get wetness value of Lara.
+/// Get the player's wetness value.
// @function LaraObject:GetWet
-// @treturn int Current wetness value.
+// @treturn int Wetness value.
// @usage
// local dripAmount = Lara:GetWet()
int LaraObject::GetWet() const
@@ -103,9 +112,9 @@ int LaraObject::GetWet() const
return lara->Effect.DripNodes[0];
}
-/// Set sprint energy value of Lara.
+/// Set the player's stamina value.
// @function LaraObject:SetStamina
-// @tparam int stamina Stamina to give to Lara. Maximum value is 120.
+// @tparam int New stamina value. __max: 120__
// @usage
// Lara:SetStamina(120)
void LaraObject::SetStamina(sol::optional value)
@@ -113,14 +122,18 @@ void LaraObject::SetStamina(sol::optional value)
auto* lara = GetLaraInfo(_moveable);
if (value.has_value())
+ {
lara->Status.Stamina = std::clamp(value.value(), 0, (int)LARA_STAMINA_MAX);
+ }
else
+ {
lara->Status.Stamina = LARA_STAMINA_MAX;
+ }
}
-/// Get stamina value of Lara.
+/// Get the player's stamina value.
// @function LaraObject:GetStamina
-// @treturn int Current sprint value.
+// @treturn int Stamina value.
// @usage
// local sprintEnergy = Lara:GetStamina()
int LaraObject::GetStamina() const
@@ -129,23 +142,23 @@ int LaraObject::GetStamina() const
return lara->Status.Stamina;
}
-/// Get the moveable's airborne status.
+/// Get the player's airborne status (set when jumping and falling).
// @function Moveable:GetAirborne
-// @treturn bool True if Lara state must react to aerial forces.
+// @treturn bool True if airborne, otherwise false.
bool LaraObject::GetAirborne() const
{
return _moveable->Animation.IsAirborne;
}
-/// Set the moveable's airborne status.
+/// Set the player's airborne status.
// @function Moveable:SetAirborne
-// @tparam bool airborne New airborne status for Lara.
+// @tparam bool airborne New airborne status.
void LaraObject::SetAirborne(bool newAirborne)
{
_moveable->Animation.IsAirborne = newAirborne;
}
-/// Lara will undraw her weapon if it is drawn and throw away a flare if she is currently holding one.
+/// Undraw a weapon if it is drawn and throw away a flare if currently holding one.
// @function LaraObject:UndrawWeapon
// @usage
// Lara:UndrawWeapon()
@@ -160,32 +173,30 @@ void LaraObject::UndrawWeapon()
}
}
-/// Lara will throw away the torch if she currently holds one in her hand.
-// @function LaraObject:ThrowAwayTorch
+/// Discard a held torch.
+// @function LaraObject:DiscardTorch
// @usage
-// Lara:ThrowAwayTorch()
-void LaraObject::ThrowAwayTorch()
+// Lara:DiscardTorch()
+void LaraObject::DiscardTorch()
{
- auto* lara = GetLaraInfo(_moveable);
+ auto& player = GetLaraInfo(*_moveable);
- if (lara->Control.Weapon.GunType == LaraWeaponType::Torch)
- {
- Lara.Torch.State = TorchState::Dropping;
- }
+ if (player.Control.Weapon.GunType == LaraWeaponType::Torch)
+ player.Torch.State = TorchState::Dropping;
}
-/// Get actual hand status of Lara.
+/// Get the player's hand status.
// @function LaraObject:GetHandStatus
// @usage
// local handStatus = Lara:GetHandStatus()
-// @treturn Objects.HandStatus Current hand status.
+// @treturn Objects.HandStatus Hand status.
HandStatus LaraObject::GetHandStatus() const
{
auto* lara = GetLaraInfo(_moveable);
return HandStatus{ lara->Control.HandStatus };
}
-/// Get actual weapon type of Lara.
+/// Get the player's weapon type.
// @function LaraObject:GetWeaponType
// @usage
// local weaponType = Lara:GetWeaponType()
@@ -196,7 +207,7 @@ LaraWeaponType LaraObject::GetWeaponType() const
return LaraWeaponType{ lara->Control.Weapon.GunType };
}
-/// Set Lara weapon type.
+/// Set the player's weapon type.
// @function LaraObject:SetWeaponType
// @usage
// Lara:SetWeaponType(WeaponType.PISTOLS, false)
@@ -377,41 +388,148 @@ std::unique_ptr LaraObject::GetPlayerInteractedMoveable() const
return std::make_unique(player.Context.InteractedItem);
}
-/// Get current light state of the torch, if it exists
-// @function LaraObject:TorchIsLit
-// @treturn bool is torch currently lit or not? (false if no torch exists)
+/// Check if a held torch is lit.
+// @function LaraObject:IsTorchLit
+// @treturn bool True if lit, otherwise false.
// @usage
-// local torchIsLit = Lara:TorchIsLit()
-bool LaraObject::TorchIsLit() const
+// local isTorchLit = Lara:IsTorchLit()
+bool LaraObject::IsTorchLit() const
{
- auto* lara = GetLaraInfo(_moveable);
- return lara->Torch.IsLit;
+ const auto& player = GetLaraInfo(*_moveable);
+ return player.Torch.IsLit;
+}
+
+/// Align the player with a moveable object for interaction.
+// @function LaraObject:Interact
+// @tparam Moveable mov Moveable object to align the player with.
+// @tparam[opt=197 (BUTTON_PUSH)] int animNumber The animation to play after alignment is complete.
+// @tparam[opt=Vec3(0, 0, 312)] Vec3 offset Relative position offset from the moveable.
+// @tparam[opt=Vec3(-256, -512, 0)] Vec3 minOffsetConstraint Minimum relative offset constraint.
+// @tparam[opt=Vec3(256, 0, 512)] Vec3 maxOffsetConstraint Maximum relative offset constraint.
+// @tparam[opt=Rotation(-10, -40, -10)] Rotation minRotConstraint Minimum relative rotation constraint.
+// @tparam[opt=Rotation(10, 40, 10)] Rotation maxRotConstraint Maximum relative rotation constraint.
+// @tparam[opt=Input.ActionID.ACTION] Input.ActionID actionID Input action ID to trigger the alignment.
+// @usage
+// local Lara:Interact(
+// moveable, 197,
+// Vec3(0, 0, 312), Vec3(-256, -512, -256), Vec3(256, 0, 512),
+// Rotation(-10, -30, -10), Rotation(10, 30, 10), TEN.Input.ActionID.ACTION)
+void LaraObject::Interact(const Moveable& mov, TypeOrNil animNumber,
+ const TypeOrNil& offset, const TypeOrNil& offsetConstraintMin, const TypeOrNil& offsetConstraintMax,
+ const TypeOrNil& rotConstraintMin, const TypeOrNil& rotConstraintMax, TypeOrNil actionID) const
+{
+ auto convertedOffset = ValueOr(offset, Vec3(0.0f, 0.0f, BLOCK(0.305f))).ToVector3i();
+ auto convertedOffsetConstraintMin = ValueOr(offsetConstraintMin, Vec3(-BLOCK(0.25f), -BLOCK(0.5f), 0.0f));
+ auto convertedOffsetConstraintMax = ValueOr(offsetConstraintMax, Vec3(BLOCK(0.25f), 0.0f, BLOCK(0.5f)));
+ auto convertedRotConstraintMin = ValueOr(rotConstraintMin, Rotation(-10.0f, -40.0f, -10.0f)).ToEulerAngles();
+ auto convertedRotConstraintMax = ValueOr(rotConstraintMax, Rotation(10.0f, 40.0f, 10.0f)).ToEulerAngles();
+ int convertedAnimNumber = ValueOr(animNumber, LA_BUTTON_SMALL_PUSH);
+ auto convertedActionID = ValueOr(actionID, In::Action);
+
+ auto interactionBasis = ObjectCollisionBounds
+ {
+ GameBoundingBox(
+ convertedOffsetConstraintMin.x, convertedOffsetConstraintMax.x,
+ convertedOffsetConstraintMin.y, convertedOffsetConstraintMax.y,
+ convertedOffsetConstraintMin.z, convertedOffsetConstraintMax.z),
+ std::pair(
+ convertedRotConstraintMin,
+ convertedRotConstraintMax)
+ };
+
+ auto& player = GetLaraInfo(*_moveable);
+ auto& interactedItem = g_Level.Items[mov.GetIndex()];
+
+ bool isUnderwater = (player.Control.WaterStatus == WaterStatus::Underwater);
+ bool isPlayerIdle = ((!isUnderwater && _moveable->Animation.ActiveState == LS_IDLE && _moveable->Animation.AnimNumber == LA_STAND_IDLE) ||
+ (isUnderwater && _moveable->Animation.ActiveState == LS_UNDERWATER_IDLE && _moveable->Animation.AnimNumber == LA_UNDERWATER_IDLE));
+
+ if ((player.Control.IsMoving && player.Context.InteractedItem == interactedItem.Index) ||
+ (IsHeld(convertedActionID) && player.Control.HandStatus == HandStatus::Free && isPlayerIdle))
+ {
+ if (TestLaraPosition(interactionBasis, &interactedItem, _moveable))
+ {
+ if (MoveLaraPosition(convertedOffset, &interactedItem, _moveable))
+ {
+ ResetPlayerFlex(_moveable);
+ SetAnimation(_moveable, convertedAnimNumber);
+
+ _moveable->Animation.FrameNumber = GetAnimData(_moveable).frameBase;
+ player.Control.IsMoving = false;
+ player.Control.HandStatus = HandStatus::Busy;
+ }
+ else
+ {
+ player.Context.InteractedItem = interactedItem.Index;
+ }
+ }
+ }
+}
+
+/// Test the player against a moveable object for interaction.
+// @function LaraObject:TestInteraction
+// @tparam Moveable mov Moveable object to align the player with.
+// @tparam[opt=Vec3(-256, -512, 0)] Vec3 minOffsetConstraint Minimum relative offset constraint.
+// @tparam[opt=Vec3(256, 0, 512)] Vec3 maxOffsetConstraint Maximum relative offset constraint.
+// @tparam[opt=Rotation(-10, -40, -10)] Rotation minRotConstraint Minimum relative rotation constraint.
+// @tparam[opt=Rotation(10, 40, 10)] Rotation maxRotConstraint Maximum relative rotation constraint.
+bool LaraObject::TestInteraction(const Moveable& mov,
+ const TypeOrNil& offsetConstraintMin, const TypeOrNil& offsetConstraintMax,
+ const TypeOrNil& rotConstraintMin, const TypeOrNil& rotConstraintMax) const
+{
+ auto convertedOffsetConstraintMin = ValueOr(offsetConstraintMin, Vec3(-BLOCK(0.25f), -BLOCK(0.5f), 0));
+ auto convertedOffsetConstraintMax = ValueOr(offsetConstraintMax, Vec3(BLOCK(0.25f), 0, BLOCK(0.5f)));
+ auto convertedRotConstraintMin = ValueOr(rotConstraintMin, Rotation(-10.0f, -40.0f, -10.0f)).ToEulerAngles();
+ auto convertedRotConstraintMax = ValueOr(rotConstraintMax, Rotation(10.0f, 40.0f, 10.0f)).ToEulerAngles();
+
+ auto interactionBasis = ObjectCollisionBounds
+ {
+ GameBoundingBox(
+ convertedOffsetConstraintMin.x, convertedOffsetConstraintMax.x,
+ convertedOffsetConstraintMin.y, convertedOffsetConstraintMax.y,
+ convertedOffsetConstraintMin.z, convertedOffsetConstraintMax.z),
+ std::pair(
+ convertedRotConstraintMin,
+ convertedRotConstraintMax)
+ };
+
+ auto& item = g_Level.Items[mov.GetIndex()];
+ return (TestLaraPosition(interactionBasis, &item, _moveable));
}
void LaraObject::Register(sol::table& parent)
{
- parent.new_usertype(LUA_CLASS_NAME,
- ScriptReserved_SetPoison, &LaraObject::SetPoison,
- ScriptReserved_GetPoison, &LaraObject::GetPoison,
- ScriptReserved_SetAir, &LaraObject::SetAir,
- ScriptReserved_GetAir, &LaraObject::GetAir,
- ScriptReserved_SetWet, &LaraObject::SetWet,
- ScriptReserved_GetWet, &LaraObject::GetWet,
- ScriptReserved_SetStamina, &LaraObject::SetStamina,
- ScriptReserved_GetStamina, &LaraObject::GetStamina,
- ScriptReserved_GetAirborne, &LaraObject::GetAirborne,
- ScriptReserved_SetAirborne, &LaraObject::SetAirborne,
- ScriptReserved_UndrawWeapon, &LaraObject::UndrawWeapon,
- ScriptReserved_ThrowAwayTorch, &LaraObject::ThrowAwayTorch,
- ScriptReserved_GetHandStatus, &LaraObject::GetHandStatus,
- ScriptReserved_GetWeaponType, &LaraObject::GetWeaponType,
- ScriptReserved_SetWeaponType, &LaraObject::SetWeaponType,
- ScriptReserved_GetAmmoType, &LaraObject::GetAmmoType,
- ScriptReserved_GetAmmoCount, &LaraObject::GetAmmoCount,
- ScriptReserved_GetVehicle, &LaraObject::GetVehicle,
- ScriptReserved_GetTarget, &LaraObject::GetTarget,
- ScriptReserved_GetPlayerInteractedMoveable, &LaraObject::GetPlayerInteractedMoveable,
- ScriptReserved_TorchIsLit, &LaraObject::TorchIsLit,
- sol::base_classes, sol::bases()
- );
+ parent.new_usertype(
+ LUA_CLASS_NAME,
+
+ ScriptReserved_SetPoison, &LaraObject::SetPoison,
+ ScriptReserved_GetPoison, &LaraObject::GetPoison,
+ ScriptReserved_SetAir, &LaraObject::SetAir,
+ ScriptReserved_GetAir, &LaraObject::GetAir,
+ ScriptReserved_SetWet, &LaraObject::SetWet,
+ ScriptReserved_GetWet, &LaraObject::GetWet,
+ ScriptReserved_SetStamina, &LaraObject::SetStamina,
+ ScriptReserved_GetStamina, &LaraObject::GetStamina,
+ ScriptReserved_GetAirborne, &LaraObject::GetAirborne,
+ ScriptReserved_SetAirborne, &LaraObject::SetAirborne,
+ ScriptReserved_UndrawWeapon, &LaraObject::UndrawWeapon,
+ ScriptReserved_PlayerDiscardTorch, &LaraObject::DiscardTorch,
+ ScriptReserved_GetHandStatus, &LaraObject::GetHandStatus,
+ ScriptReserved_GetWeaponType, &LaraObject::GetWeaponType,
+ ScriptReserved_SetWeaponType, &LaraObject::SetWeaponType,
+ ScriptReserved_GetAmmoType, &LaraObject::GetAmmoType,
+ ScriptReserved_GetAmmoCount, &LaraObject::GetAmmoCount,
+ ScriptReserved_GetVehicle, &LaraObject::GetVehicle,
+ ScriptReserved_GetTarget, &LaraObject::GetTarget,
+ ScriptReserved_GetPlayerInteractedMoveable, &LaraObject::GetPlayerInteractedMoveable,
+ ScriptReserved_PlayerIsTorchLit, &LaraObject::IsTorchLit,
+
+ ScriptReserved_PlayerInteract, &LaraObject::Interact,
+ ScriptReserved_PlayerTestInteraction, &LaraObject::TestInteraction,
+
+ // COMPATIBILITY
+ "TorchIsLit", &LaraObject::IsTorchLit,
+ "ThrowAwayTorch", &LaraObject::DiscardTorch,
+
+ sol::base_classes, sol::bases());
}
diff --git a/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.h b/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.h
index 4b519bece..4ab00914e 100644
--- a/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.h
+++ b/TombEngine/Scripting/Internal/TEN/Objects/Lara/LaraObject.h
@@ -1,6 +1,7 @@
#pragma once
#include "Game/Lara/lara_struct.h"
+#include "Scripting/Internal/TEN/Input/ActionIDs.h"
#include "Scripting/Internal/TEN/Objects/Moveable/MoveableObject.h"
// TODO: Organise.
@@ -19,6 +20,7 @@ public:
int GetWet() const;
bool GetAirborne() const;
void SetAirborne(bool newAirborne);
+
std::unique_ptr GetVehicle() const;
std::unique_ptr GetTarget() const;
std::unique_ptr GetPlayerInteractedMoveable() const;
@@ -27,8 +29,17 @@ public:
void SetWeaponType(LaraWeaponType weaponType, bool activate);
int GetAmmoType() const;
int GetAmmoCount() const;
+
void UndrawWeapon();
- void ThrowAwayTorch();
- bool TorchIsLit() const;
+ void DiscardTorch();
+ bool IsTorchLit() const;
+
+ void Interact(const Moveable& mov, TypeOrNil animNumber,
+ const TypeOrNil& offset, const TypeOrNil& offsetConstraintMin, const TypeOrNil& offsetConstraintMax,
+ const TypeOrNil& rotConstraintMin, const TypeOrNil& rotConstraintMax, TypeOrNil actionID) const;
+ bool TestInteraction(const Moveable& mov,
+ const TypeOrNil& offsetConstraintMin, const TypeOrNil& offsetConstraintMax,
+ const TypeOrNil& rotConstraintMin, const TypeOrNil& rotConstraintMax) const;
+
using Moveable::Moveable;
};
From 9b6bf198bbbb9168c580dd76a56b335669ba17cc Mon Sep 17 00:00:00 2001
From: Lwmte <3331699+Lwmte@users.noreply.github.com>
Date: Sun, 20 Apr 2025 21:59:23 +0300
Subject: [PATCH 20/32] Gunflashes for all weapons (#1631)
* Initial commit
* Update CHANGELOG.md
* Remove duplicate field
---
CHANGELOG.md | 4 +-
.../doc/2 classes/Flow.Settings.html | 16 +--
TombEngine/Game/Lara/lara_fire.cpp | 1 -
TombEngine/Game/Lara/lara_one_gun.cpp | 112 +++++++--------
TombEngine/Game/Lara/lara_one_gun.h | 11 +-
TombEngine/Game/Lara/lara_struct.h | 1 -
TombEngine/Game/control/los.cpp | 1 -
TombEngine/Game/savegame.cpp | 2 -
TombEngine/Renderer/RendererDrawEffect.cpp | 134 +++++++++---------
.../Internal/TEN/Flow/Settings/Settings.cpp | 34 ++---
.../flatbuffers/ten_savegame_generated.h | 32 ++---
.../Specific/savegame/schema/ten_savegame.fbs | 1 -
12 files changed, 163 insertions(+), 186 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2ea93e749..273123e04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,14 +12,16 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Fixed lensflare enabled status not saved in a savegame.
* Fixed caustics not rendered correctly if texture compression was enabled.
* Fixed exclusion blend mode not working correctly.
-* Fixed SSAO incorrectly applied through alpha blended textures.
+* Fixed HK shots not being registered in statistics.
* Fixed HK sound effects.
+* Fixed SSAO incorrectly applied through alpha blended textures.
### New features
* Added muzzle glow effect for firearms.
### Lua API changes
* Added `muzzleGlow` and `muzzleOffset` parameters to weapon settings.
+* Added ability to use gunflash parameters for all weapons in weapon settings.
* Fixed `Moveable.GetJointPosition` not returning correct results if moveable is invisible or not rendered.
### Lua API changes
diff --git a/Documentation/doc/2 classes/Flow.Settings.html b/Documentation/doc/2 classes/Flow.Settings.html
index c59098a2a..1c4f98914 100644
--- a/Documentation/doc/2 classes/Flow.Settings.html
+++ b/Documentation/doc/2 classes/Flow.Settings.html
@@ -1109,7 +1109,7 @@
- flashColor
Color
- specifies the color of the gunflash. Applicable only for firearms.
+ specifies the color of the gunflash.
@@ -1130,7 +1130,7 @@
- flashRange
Color
- specifies the range of the gunflash. Applicable only for firearms.
+ specifies the range of the gunflash.
@@ -1151,7 +1151,7 @@
- flashDuration
int
- specifies the duration of a gunflash effect. Applicable only for firearms.
+ specifies the duration of a gunflash effect.
@@ -1172,7 +1172,7 @@
- smoke
bool
- if set to true, indicates that weapon emits gun smoke. Not applicable for crossbow and harpoon gun.
+ if set to true, indicates that weapon emits gun smoke.
@@ -1214,7 +1214,7 @@
- muzzleFlash
bool
- specifies whether muzzle flash should be displayed or not. Applicable only for firearms.
+ specifies whether muzzle flash should be displayed or not.
@@ -1235,7 +1235,7 @@
- muzzleGlow
bool
- specifies whether muzzle glow should be displayed or not. Applicable only for firearms.
+ specifies whether muzzle glow should be displayed or not.
@@ -1256,7 +1256,7 @@
- colorizeMuzzleFlash
bool
- specifies whether muzzle flash should be tinted with the same color as gunflash color. Applicable only for firearms.
+ specifies whether muzzle flash should be tinted with the same color as gunflash color.
@@ -1277,7 +1277,7 @@
- muzzleOffset
Vec3
- specifies offset for spawning muzzle gunflash effects. Applicable only for firearms.
+ specifies offset for spawning muzzle gunflash effects.
diff --git a/TombEngine/Game/Lara/lara_fire.cpp b/TombEngine/Game/Lara/lara_fire.cpp
index 2e4597bb1..2ab074e1e 100644
--- a/TombEngine/Game/Lara/lara_fire.cpp
+++ b/TombEngine/Game/Lara/lara_fire.cpp
@@ -871,7 +871,6 @@ FireWeaponType FireWeapon(LaraWeaponType weaponType, ItemInfo* targetEntity, Ite
auto ray = Ray(origin, directionNorm);
player.Control.Weapon.HasFired = true;
- player.Control.Weapon.Fired = true;
auto vOrigin = GameVector(pos);
short roomNumber = laraItem.RoomNumber;
diff --git a/TombEngine/Game/Lara/lara_one_gun.cpp b/TombEngine/Game/Lara/lara_one_gun.cpp
index 3dcefb301..ede45b080 100644
--- a/TombEngine/Game/Lara/lara_one_gun.cpp
+++ b/TombEngine/Game/Lara/lara_one_gun.cpp
@@ -94,6 +94,8 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
player.Control.Weapon.Timer = 0.0f;
}
+ bool hasFired = false;
+
switch (item.Animation.ActiveState)
{
case WEAPON_STATE_AIM:
@@ -168,11 +170,11 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
switch (weaponType)
{
default:
- FireShotgun(laraItem);
+ hasFired = FireShotgun(laraItem);
break;
case LaraWeaponType::HarpoonGun:
- FireHarpoon(laraItem);
+ hasFired = FireHarpoon(laraItem);
if (!(player.Weapons[(int)LaraWeaponType::HarpoonGun].Ammo->GetCount() % 4) &&
!player.Weapons[(int)weaponType].Ammo->HasInfinite())
@@ -183,15 +185,15 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
break;
case LaraWeaponType::RocketLauncher:
- FireRocket(laraItem);
+ hasFired = FireRocket(laraItem);
break;
case LaraWeaponType::GrenadeLauncher:
- FireGrenade(laraItem);
+ hasFired = FireGrenade(laraItem);
break;
case LaraWeaponType::Crossbow:
- FireCrossbow(laraItem);
+ hasFired = FireCrossbow(laraItem);
break;
case LaraWeaponType::HK:
@@ -203,7 +205,7 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
}
else
{
- FireHK(laraItem, false);
+ hasFired = FireHK(laraItem, false);
player.Control.Weapon.Timer = 1.0f;
item.Animation.TargetState = WEAPON_STATE_RECOIL;
@@ -264,7 +266,7 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
break;
case LaraWeaponType::HarpoonGun:
- FireHarpoon(laraItem);
+ hasFired = FireHarpoon(laraItem);
if (!(player.Weapons[(int)LaraWeaponType::HarpoonGun].Ammo->GetCount() % 4) &&
!player.Weapons[(int)weaponType].Ammo->HasInfinite())
@@ -276,14 +278,14 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
case LaraWeaponType::HK:
if ((weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_2 ||
- weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_3) &&
+ weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_3) &&
player.Control.Weapon.Interval != 0.0f)
{
item.Animation.TargetState = WEAPON_STATE_UNDERWATER_AIM;
}
else
{
- FireHK(laraItem, true);
+ hasFired = FireHK(laraItem, true);
player.Control.Weapon.Timer = 1.0f;
item.Animation.TargetState = WEAPON_STATE_UNDERWATER_RECOIL;
@@ -322,6 +324,18 @@ void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
break;
}
+ if (hasFired)
+ {
+ player.Control.Weapon.HasFired = true;
+
+ player.RightArm.GunFlash = Weapons[(int)weaponType].FlashTime;
+ if (weaponType != LaraWeaponType::GrenadeLauncher && weaponType != LaraWeaponType::RocketLauncher)
+ player.LeftArm.GunSmoke = 20;
+
+ SaveGame::Statistics.Level.AmmoUsed++;
+ SaveGame::Statistics.Game.AmmoUsed++;
+ }
+
item.Pose.Position = laraItem.Pose.Position;
item.RoomNumber = laraItem.RoomNumber;
@@ -348,13 +362,13 @@ void ReadyShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
player.RightArm.FrameBase = Objects[GetWeaponObjectID(weaponType)].frameBase;
}
-void FireShotgun(ItemInfo& laraItem)
+bool FireShotgun(ItemInfo& laraItem)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::Shotgun);
if (!ammo.HasInfinite() && !ammo.GetCount())
- return;
+ return false;
auto armOrient = EulerAngles(
player.LeftArm.Orientation.x,
@@ -393,8 +407,6 @@ void FireShotgun(ItemInfo& laraItem)
auto pos = GetJointPosition(&laraItem, LM_RHAND, offset + Vector3::UnitY * CLICK(2));
auto pos2 = GetJointPosition(&laraItem, LM_RHAND, offset);
- player.LeftArm.GunSmoke = 32;
-
if (laraItem.MeshBits != 0)
{
for (int i = 0; i < 7; i++)
@@ -406,16 +418,13 @@ void FireShotgun(ItemInfo& laraItem)
}
}
- player.RightArm.GunFlash = Weapons[(int)LaraWeaponType::Shotgun].FlashTime;
-
SoundEffect(SFX_TR4_EXPLOSION1, &laraItem.Pose, TestEnvironment(ENV_FLAG_WATER, &laraItem) ? SoundEnvironment::Underwater : SoundEnvironment::Land);
SoundEffect(Weapons[(int)LaraWeaponType::Shotgun].SampleNum, &laraItem.Pose);
Rumble(0.5f, 0.2f);
-
- SaveGame::Statistics.Level.AmmoUsed++;
- SaveGame::Statistics.Game.AmmoUsed++;
}
+
+ return hasFired;
}
void DrawShotgun(ItemInfo& laraItem, LaraWeaponType weaponType)
@@ -552,8 +561,6 @@ bool FireHarpoon(ItemInfo& laraItem, const std::optional& pose)
if (!ammo)
return false;
- player.Control.Weapon.HasFired = true;
-
int itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
return false;
@@ -608,14 +615,10 @@ bool FireHarpoon(ItemInfo& laraItem, const std::optional& pose)
harpoonItem.HitPoints = HARPOON_TIME;
AddActiveItem(itemNumber);
-
harpoonItem.ItemFlags[0] = (int)ProjectileType::Harpoon;
Rumble(0.2f, 0.1f);
- SaveGame::Statistics.Level.AmmoUsed++;
- SaveGame::Statistics.Game.AmmoUsed++;
-
return true;
}
@@ -652,19 +655,17 @@ void HarpoonBoltControl(short itemNumber)
HandleProjectile(harpoonItem, *LaraItem, prevPos, (ProjectileType)harpoonItem.ItemFlags[0], damage);
}
-void FireGrenade(ItemInfo& laraItem)
+bool FireGrenade(ItemInfo& laraItem)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::GrenadeLauncher);
if (!ammo)
- return;
-
- player.Control.Weapon.HasFired = true;
+ return false;
short itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
- return;
+ return false;
auto& grenadeItem = g_Level.Items[itemNumber];
@@ -743,8 +744,7 @@ void FireGrenade(ItemInfo& laraItem)
break;
}
- SaveGame::Statistics.Level.AmmoUsed++;
- SaveGame::Statistics.Game.AmmoUsed++;
+ return true;
}
void GrenadeControl(short itemNumber)
@@ -835,19 +835,17 @@ void GrenadeControl(short itemNumber)
HandleProjectile(grenadeItem, *LaraItem, prevPos, (ProjectileType)grenadeItem.ItemFlags[0], Weapons[(int)LaraWeaponType::GrenadeLauncher].Damage);
}
-void FireRocket(ItemInfo& laraItem)
+bool FireRocket(ItemInfo& laraItem)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::RocketLauncher);
if (!ammo)
- return;
-
- player.Control.Weapon.HasFired = true;
+ return false;
short itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
- return;
+ return false;
auto& rocketItem = g_Level.Items[itemNumber];
rocketItem.ObjectNumber = ID_ROCKET;
@@ -905,8 +903,7 @@ void FireRocket(ItemInfo& laraItem)
Rumble(0.4f, 0.3f);
SoundEffect(SFX_TR4_EXPLOSION1, &laraItem.Pose);
- SaveGame::Statistics.Level.AmmoUsed++;
- SaveGame::Statistics.Game.AmmoUsed++;
+ return true;
}
void RocketControl(short itemNumber)
@@ -974,19 +971,17 @@ void RocketControl(short itemNumber)
HandleProjectile(rocketItem, *LaraItem, prevPos, ProjectileType::Explosive, Weapons[(int)LaraWeaponType::RocketLauncher].Damage);
}
-void FireCrossbow(ItemInfo& laraItem, const std::optional& pose)
+bool FireCrossbow(ItemInfo& laraItem, const std::optional& pose)
{
auto& player = *GetLaraInfo(&laraItem);
auto& ammo = GetAmmo(player, LaraWeaponType::Crossbow);
if (!ammo)
- return;
-
- player.Control.Weapon.HasFired = true;
+ return false;
short itemNumber = CreateItem();
if (itemNumber == NO_VALUE)
- return;
+ return false;
auto& boltItem = g_Level.Items[itemNumber];
boltItem.ObjectNumber = ID_CROSSBOW_BOLT;
@@ -1059,8 +1054,7 @@ void FireCrossbow(ItemInfo& laraItem, const std::optional& pose)
Rumble(0.2f, 0.1f);
SoundEffect(SFX_TR4_CROSSBOW_FIRE, &laraItem.Pose);
- SaveGame::Statistics.Level.AmmoUsed++;
- SaveGame::Statistics.Game.AmmoUsed++;
+ return true;
}
void FireCrossBowFromLaserSight(ItemInfo& laraItem, GameVector* origin, GameVector* target)
@@ -1092,7 +1086,7 @@ void CrossbowBoltControl(short itemNumber)
HandleProjectile(boltItem, *LaraItem, prevPos, (ProjectileType)boltItem.ItemFlags[0], damage);
}
-void FireHK(ItemInfo& laraItem, bool inaccurateMode)
+bool FireHK(ItemInfo& laraItem, bool inaccurateMode)
{
auto& player = *GetLaraInfo(&laraItem);
const auto& weapon = player.Weapons[(int)LaraWeaponType::HK];
@@ -1134,19 +1128,19 @@ void FireHK(ItemInfo& laraItem, bool inaccurateMode)
Weapons[(int)LaraWeaponType::HK].Damage = damage / 3;
}
- if (FireWeapon(LaraWeaponType::HK, player.TargetEntity, laraItem, angles) != FireWeaponType::NoAmmo)
+ bool hasFired = FireWeapon(LaraWeaponType::HK, player.TargetEntity, laraItem, angles) != FireWeaponType::NoAmmo;
+
+ if (hasFired)
{
- player.LeftArm.GunSmoke = 12;
-
TriggerGunShell(1, ID_GUNSHELL, LaraWeaponType::HK);
- player.RightArm.GunFlash = Weapons[(int)LaraWeaponType::HK].FlashTime;
-
Rumble(0.2f, 0.1f);
}
// HACK: Restore accuracy/damage values.
Weapons[(int)LaraWeaponType::HK].ShotAccuracy = accuracy;
Weapons[(int)LaraWeaponType::HK].Damage = damage;
+
+ return hasFired;
}
void LasersightWeaponHandler(ItemInfo& item, LaraWeaponType weaponType)
@@ -1195,6 +1189,9 @@ void LasersightWeaponHandler(ItemInfo& item, LaraWeaponType weaponType)
}
else if (player.Control.Weapon.GunType == LaraWeaponType::HK)
{
+ SaveGame::Statistics.Level.AmmoUsed++;
+ SaveGame::Statistics.Game.AmmoUsed++;
+
bool playSound = false;
if (weapon.WeaponMode == LaraWeaponTypeCarried::WTYPE_AMMO_3)
@@ -1283,16 +1280,17 @@ void RifleHandler(ItemInfo& laraItem, LaraWeaponType weaponType)
auto color = Color(settings.FlashColor);
color += Color(Random::GenerateFloat(-0.2f, 0.2f));
- if (weaponType == LaraWeaponType::Shotgun || weaponType == LaraWeaponType::HK)
- {
- auto pos = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, -64, 0));
- SpawnDynamicPointLight(pos.ToVector3(), color, CLICK(settings.FlashRange));
- }
- else if (weaponType == LaraWeaponType::Revolver)
+ if (weaponType == LaraWeaponType::Revolver)
{
auto pos = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, -32, 0));
SpawnDynamicPointLight(pos.ToVector3(), color, CLICK(settings.FlashRange));
}
+ else
+ {
+ auto pos = GetJointPosition(&laraItem, LM_RHAND, Vector3i(0, -64, 0));
+ SpawnDynamicPointLight(pos.ToVector3(), color, CLICK(settings.FlashRange));
+ }
+
}
}
diff --git a/TombEngine/Game/Lara/lara_one_gun.h b/TombEngine/Game/Lara/lara_one_gun.h
index 17495531e..24cf906b8 100644
--- a/TombEngine/Game/Lara/lara_one_gun.h
+++ b/TombEngine/Game/Lara/lara_one_gun.h
@@ -28,7 +28,7 @@ enum class ProjectileType
void AnimateShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
void ReadyShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
-void FireShotgun(ItemInfo& laraItem);
+bool FireShotgun(ItemInfo& laraItem);
void DrawShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
void UndrawShotgun(ItemInfo& laraItem, LaraWeaponType weaponType);
void DrawShotgunMeshes(ItemInfo& laraItem, LaraWeaponType weaponType);
@@ -36,16 +36,15 @@ void UndrawShotgunMeshes(ItemInfo& laraItem, LaraWeaponType weaponType);
bool FireHarpoon(ItemInfo& laraItem, const std::optional& pose = std::nullopt);
void HarpoonBoltControl(short itemNumber);
-void FireGrenade(ItemInfo& laraItem);
+bool FireGrenade(ItemInfo& laraItem);
void GrenadeControl(short itemNumber);
-void FireRocket(ItemInfo& laraItem);
-void FireRocket(ItemInfo& laraItem);
+bool FireRocket(ItemInfo& laraItem);
void RocketControl(short itemNumber);
-void FireCrossbow(ItemInfo& laraItem, const std::optional& pose = std::nullopt);
+bool FireCrossbow(ItemInfo& laraItem, const std::optional& pose = std::nullopt);
void FireCrossBowFromLaserSight(ItemInfo& laraItem, GameVector* origin, GameVector* target);
void CrossbowBoltControl(short itemNumber);
-void FireHK(ItemInfo& laraItem, bool inaccurateMode);
+bool FireHK(ItemInfo& laraItem, bool inaccurateMode);
void RifleHandler(ItemInfo& laraItem, LaraWeaponType weaponType);
void LasersightWeaponHandler(ItemInfo& item, LaraWeaponType weaponType);
diff --git a/TombEngine/Game/Lara/lara_struct.h b/TombEngine/Game/Lara/lara_struct.h
index 075b2f78e..b0d6bb61d 100644
--- a/TombEngine/Game/Lara/lara_struct.h
+++ b/TombEngine/Game/Lara/lara_struct.h
@@ -1218,7 +1218,6 @@ struct WeaponControlData
short WeaponItem = -1;
bool HasFired = false;
- bool Fired = false;
bool UziLeft = false;
bool UziRight = false;
diff --git a/TombEngine/Game/control/los.cpp b/TombEngine/Game/control/los.cpp
index 3f1c0b2ab..37d371827 100644
--- a/TombEngine/Game/control/los.cpp
+++ b/TombEngine/Game/control/los.cpp
@@ -261,7 +261,6 @@ bool GetTargetOnLOS(GameVector* origin, GameVector* target, bool drawTarget, boo
if (isFiring && Lara.Control.Look.IsUsingLasersight)
{
Lara.Control.Weapon.HasFired = true;
- Lara.Control.Weapon.Fired = true;
Lara.RightArm.GunFlash = Weapons[(int)Lara.Control.Weapon.GunType].FlashTime;
if (Lara.Control.Weapon.GunType == LaraWeaponType::Revolver)
diff --git a/TombEngine/Game/savegame.cpp b/TombEngine/Game/savegame.cpp
index 26b41d8ad..493d262da 100644
--- a/TombEngine/Game/savegame.cpp
+++ b/TombEngine/Game/savegame.cpp
@@ -472,7 +472,6 @@ const std::vector SaveGame::Build()
Save::WeaponControlDataBuilder weaponControl{ fbb };
weaponControl.add_weapon_item(Lara.Control.Weapon.WeaponItem);
weaponControl.add_has_fired(Lara.Control.Weapon.HasFired);
- weaponControl.add_fired(Lara.Control.Weapon.Fired);
weaponControl.add_uzi_left(Lara.Control.Weapon.UziLeft);
weaponControl.add_uzi_right(Lara.Control.Weapon.UziRight);
weaponControl.add_gun_type((int)Lara.Control.Weapon.GunType);
@@ -2122,7 +2121,6 @@ static void ParsePlayer(const Save::SaveGame* s)
Lara.Control.Weapon.GunType = (LaraWeaponType)s->lara()->control()->weapon()->gun_type();
Lara.Control.Weapon.HasFired = s->lara()->control()->weapon()->has_fired();
Lara.Control.Weapon.Interval = s->lara()->control()->weapon()->interval();
- Lara.Control.Weapon.Fired = s->lara()->control()->weapon()->fired();
Lara.Control.Weapon.LastGunType = (LaraWeaponType)s->lara()->control()->weapon()->last_gun_type();
Lara.Control.Weapon.RequestGunType = (LaraWeaponType)s->lara()->control()->weapon()->request_gun_type();
Lara.Control.Weapon.HolsterInfo.BackHolster = (HolsterSlot)s->lara()->control()->weapon()->holster_info()->back_holster();
diff --git a/TombEngine/Renderer/RendererDrawEffect.cpp b/TombEngine/Renderer/RendererDrawEffect.cpp
index ce6ed8034..275cb92b0 100644
--- a/TombEngine/Renderer/RendererDrawEffect.cpp
+++ b/TombEngine/Renderer/RendererDrawEffect.cpp
@@ -1081,92 +1081,90 @@ namespace TEN::Renderer
if (Lara.Control.Look.OpticRange > 0 && _currentMirror == nullptr)
return false;
+ if (Lara.Control.Weapon.GunType == LaraWeaponType::Flare)
+ return false;
+
const auto& settings = g_GameFlow->GetSettings()->Weapons[(int)Lara.Control.Weapon.GunType - 1];
if (!settings.MuzzleFlash)
return false;
- if (Lara.Control.Weapon.GunType != LaraWeaponType::Flare &&
- Lara.Control.Weapon.GunType != LaraWeaponType::Crossbow)
+ // Use MP5 flash if available.
+ auto gunflash = GAME_OBJECT_ID::ID_GUN_FLASH;
+ if (Lara.Control.Weapon.GunType == LaraWeaponType::HK && Objects[GAME_OBJECT_ID::ID_GUN_FLASH2].loaded)
+ gunflash = GAME_OBJECT_ID::ID_GUN_FLASH2;
+
+ if (!_moveableObjects[gunflash].has_value())
+ return false;
+
+ const auto& flashMoveable = *_moveableObjects[gunflash];
+ const auto& flashMesh = *flashMoveable.ObjectMeshes[0];
+
+ _shaders.Bind(Shader::Statics);
+
+ unsigned int stride = sizeof(Vertex);
+ unsigned int offset = 0;
+
+ _context->IASetVertexBuffers(0, 1, _moveablesVertexBuffer.Buffer.GetAddressOf(), &stride, &offset);
+ _context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ _context->IASetIndexBuffer(_moveablesIndexBuffer.Buffer.Get(), DXGI_FORMAT_R32_UINT, 0);
+
+ const auto& room = _rooms[LaraItem->RoomNumber];
+ auto* itemPtr = &_items[LaraItem->Index];
+
+ // Divide gunflash tint by 2 because tinting uses multiplication and additive color which doesn't look good with overbright color values.
+ _stStatic.Color = settings.ColorizeMuzzleFlash ? ((Vector4)settings.FlashColor / 2) : Vector4::One;
+ _stStatic.AmbientLight = room.AmbientLight;
+ _stStatic.LightMode = (int)LightMode::Static;
+ BindStaticLights(itemPtr->LightsToDraw);
+
+ SetAlphaTest(AlphaTestMode::GreatherThan, ALPHA_TEST_THRESHOLD);
+ SetBlendMode(BlendMode::Additive);
+
+ for (const auto& flashBucket : flashMesh.Buckets)
{
- // Use MP5 flash if available.
- auto gunflash = GAME_OBJECT_ID::ID_GUN_FLASH;
- if (Lara.Control.Weapon.GunType == LaraWeaponType::HK && Objects[GAME_OBJECT_ID::ID_GUN_FLASH2].loaded)
- gunflash = GAME_OBJECT_ID::ID_GUN_FLASH2;
+ if (flashBucket.BlendMode == BlendMode::Opaque)
+ continue;
- if (!_moveableObjects[gunflash].has_value())
- return false;
+ if (flashBucket.Polygons.size() == 0)
+ continue;
- const auto& flashMoveable = *_moveableObjects[gunflash];
- const auto& flashMesh = *flashMoveable.ObjectMeshes[0];
+ BindTexture(TextureRegister::ColorMap, &std::get<0>(_moveablesTextures[flashBucket.Texture]), SamplerStateRegister::AnisotropicClamp);
- _shaders.Bind(Shader::Statics);
+ auto meshOffset = g_Level.Frames[GetAnimData(gunflash, 0).FramePtr].Offset;
+ auto offset = settings.MuzzleOffset + Vector3(meshOffset.x, meshOffset.z, meshOffset.y); // Offsets are inverted because of bone orientation.
- unsigned int stride = sizeof(Vertex);
- unsigned int offset = 0;
+ auto tMatrix = Matrix::CreateTranslation(offset);
+ auto rotMatrix = Matrix::CreateRotationX(TO_RAD(Lara.Control.Weapon.GunType == LaraWeaponType::Pistol ? -16830 : -14560)); // HACK
- _context->IASetVertexBuffers(0, 1, _moveablesVertexBuffer.Buffer.GetAddressOf(), &stride, &offset);
- _context->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
- _context->IASetIndexBuffer(_moveablesIndexBuffer.Buffer.Get(), DXGI_FORMAT_R32_UINT, 0);
-
- const auto& room = _rooms[LaraItem->RoomNumber];
- auto* itemPtr = &_items[LaraItem->Index];
-
- // Divide gunflash tint by 2 because tinting uses multiplication and additive color which doesn't look good with overbright color values.
- _stStatic.Color = settings.ColorizeMuzzleFlash ? ((Vector4)settings.FlashColor / 2) : Vector4::One;
- _stStatic.AmbientLight = room.AmbientLight;
- _stStatic.LightMode = (int)LightMode::Static;
- BindStaticLights(itemPtr->LightsToDraw);
-
- SetAlphaTest(AlphaTestMode::GreatherThan, ALPHA_TEST_THRESHOLD);
- SetBlendMode(BlendMode::Additive);
-
- for (const auto& flashBucket : flashMesh.Buckets)
+ auto worldMatrix = Matrix::Identity;
+ if (Lara.LeftArm.GunFlash)
{
- if (flashBucket.BlendMode == BlendMode::Opaque)
- continue;
+ worldMatrix = itemPtr->AnimTransforms[LM_LHAND] * itemPtr->World;
+ worldMatrix = tMatrix * worldMatrix;
+ worldMatrix = rotMatrix * worldMatrix;
+ ReflectMatrixOptionally(worldMatrix);
- if (flashBucket.Polygons.size() == 0)
- continue;
+ _stStatic.World = worldMatrix;
+ _cbStatic.UpdateData(_stStatic, _context.Get());
- BindTexture(TextureRegister::ColorMap, &std::get<0>(_moveablesTextures[flashBucket.Texture]), SamplerStateRegister::AnisotropicClamp);
+ DrawIndexedTriangles(flashBucket.NumIndices, flashBucket.StartIndex, 0);
+ _numMoveablesDrawCalls++;
+ }
- auto meshOffset = g_Level.Frames[GetAnimData(gunflash, 0).FramePtr].Offset;
- auto offset = settings.MuzzleOffset + Vector3(meshOffset.x, meshOffset.z, meshOffset.y); // Offsets are inverted because of bone orientation.
+ if (Lara.RightArm.GunFlash)
+ {
+ worldMatrix = itemPtr->AnimTransforms[LM_RHAND] * itemPtr->World;
+ worldMatrix = tMatrix * worldMatrix;
+ worldMatrix = rotMatrix * worldMatrix;
+ ReflectMatrixOptionally(worldMatrix);
- auto tMatrix = Matrix::CreateTranslation(offset);
- auto rotMatrix = Matrix::CreateRotationX(TO_RAD(Lara.Control.Weapon.GunType == LaraWeaponType::Pistol ? -16830 : -14560)); // HACK
+ _stStatic.World = worldMatrix;
+ _cbStatic.UpdateData(_stStatic, _context.Get());
- auto worldMatrix = Matrix::Identity;
- if (Lara.LeftArm.GunFlash)
- {
- worldMatrix = itemPtr->AnimTransforms[LM_LHAND] * itemPtr->World;
- worldMatrix = tMatrix * worldMatrix;
- worldMatrix = rotMatrix * worldMatrix;
- ReflectMatrixOptionally(worldMatrix);
+ DrawIndexedTriangles(flashBucket.NumIndices, flashBucket.StartIndex, 0);
- _stStatic.World = worldMatrix;
- _cbStatic.UpdateData(_stStatic, _context.Get());
-
- DrawIndexedTriangles(flashBucket.NumIndices, flashBucket.StartIndex, 0);
-
- _numMoveablesDrawCalls++;
- }
-
- if (Lara.RightArm.GunFlash)
- {
- worldMatrix = itemPtr->AnimTransforms[LM_RHAND] * itemPtr->World;
- worldMatrix = tMatrix * worldMatrix;
- worldMatrix = rotMatrix * worldMatrix;
- ReflectMatrixOptionally(worldMatrix);
-
- _stStatic.World = worldMatrix;
- _cbStatic.UpdateData(_stStatic, _context.Get());
-
- DrawIndexedTriangles(flashBucket.NumIndices, flashBucket.StartIndex, 0);
-
- _numMoveablesDrawCalls++;
- }
+ _numMoveablesDrawCalls++;
}
}
diff --git a/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp b/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp
index 9db67dc64..263c938fb 100644
--- a/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp
+++ b/TombEngine/Scripting/Internal/TEN/Flow/Settings/Settings.cpp
@@ -25,15 +25,15 @@ namespace TEN::Scripting
// NOTE: Since Weapons array is bound to Lua directly and Lua accesses this array by native enum, where 0 is NONE, and 1 is PISTOLS,
// 0 index is omitted due to Lua indexing arrays starting from 1. 1 must be subtracted from initializer index.
- Weapons[(int)LaraWeaponType::Pistol - 1] = { 8.0f, BLOCK(8), 9, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 3, true, true, true, true, false, Vec3( 0, 120, 30) };
- Weapons[(int)LaraWeaponType::Revolver - 1] = { 4.0f, BLOCK(8), 16, (int)BLOCK(0.65f), 21, 21, 6, ScriptColor(192, 128, 0), 9, 3, true, false, true, true, false, Vec3(-10, 130, 65) };
- Weapons[(int)LaraWeaponType::Uzi - 1] = { 8.0f, BLOCK(8), 3, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 2, true, true, true, true, false, Vec3( 0, 110, 40) };
- Weapons[(int)LaraWeaponType::Shotgun - 1] = { 10.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 3, 3, 6, ScriptColor(192, 128, 0), 12, 3, true, true, false, false, false, Vec3( 0, 210, 42) };
- Weapons[(int)LaraWeaponType::HK - 1] = { 4.0f, BLOCK(12), 0, (int)BLOCK(0.50f), 4, 4, 30, ScriptColor(192, 128, 0), 12, 2, true, true, true, true, false, Vec3( 0, 220, 102) };
- Weapons[(int)LaraWeaponType::Crossbow - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 5, 20, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false, false, Vec3() };
- Weapons[(int)LaraWeaponType::GrenadeLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 10, ScriptColor(192, 128, 0), 0, 0, true, false, false, false, false, Vec3() };
- Weapons[(int)LaraWeaponType::RocketLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 1, ScriptColor(192, 128, 0), 0, 0, true, false, false, false, false, Vec3() };
- Weapons[(int)LaraWeaponType::HarpoonGun - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 6, 6, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false, false, Vec3() };
+ Weapons[(int)LaraWeaponType::Pistol - 1] = { 8.0f, BLOCK(8), 9, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 3, true, true, true, false, false, Vec3( 0, 120, 30) };
+ Weapons[(int)LaraWeaponType::Revolver - 1] = { 4.0f, BLOCK(8), 16, (int)BLOCK(0.65f), 21, 21, 6, ScriptColor(192, 128, 0), 9, 3, true, false, true, false, false, Vec3(-10, 130, 65) };
+ Weapons[(int)LaraWeaponType::Uzi - 1] = { 8.0f, BLOCK(8), 3, (int)BLOCK(0.65f), 1, 1, 30, ScriptColor(192, 128, 0), 9, 2, true, true, true, false, false, Vec3( 0, 110, 40) };
+ Weapons[(int)LaraWeaponType::Shotgun - 1] = { 10.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 3, 3, 6, ScriptColor(192, 128, 0), 12, 3, true, true, false, false, false, Vec3( 0, 210, 40) };
+ Weapons[(int)LaraWeaponType::HK - 1] = { 4.0f, BLOCK(12), 0, (int)BLOCK(0.50f), 4, 4, 30, ScriptColor(192, 128, 0), 12, 2, true, true, true, false, false, Vec3( 0, 220, 102) };
+ Weapons[(int)LaraWeaponType::Crossbow - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 5, 20, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false, false, Vec3( 0, 240, 50) };
+ Weapons[(int)LaraWeaponType::GrenadeLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 10, ScriptColor(192, 128, 0), 0, 0, true, false, false, false, false, Vec3( 0, 190, 50) };
+ Weapons[(int)LaraWeaponType::RocketLauncher - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 30, 30, 1, ScriptColor(192, 128, 0), 0, 0, true, false, false, false, false, Vec3( 0, 90, 90) };
+ Weapons[(int)LaraWeaponType::HarpoonGun - 1] = { 8.0f, BLOCK(8), 0, (int)BLOCK(0.50f), 6, 6, 10, ScriptColor(192, 128, 0), 0, 0, false, false, false, false, false, Vec3(-15, 240, 50) };
}
void Settings::Register(sol::table& parent)
@@ -286,19 +286,19 @@ namespace TEN::Scripting
"pickupCount", &WeaponSettings::PickupCount,
/// Gunflash color.
- // @tfield Color flashColor specifies the color of the gunflash. Applicable only for firearms.
+ // @tfield Color flashColor specifies the color of the gunflash.
"flashColor", &WeaponSettings::FlashColor,
/// Gunflash range.
- // @tfield Color flashRange specifies the range of the gunflash. Applicable only for firearms.
+ // @tfield Color flashRange specifies the range of the gunflash.
"flashRange", &WeaponSettings::FlashRange,
/// Gunflash duration.
- // @tfield int flashDuration specifies the duration of a gunflash effect. Applicable only for firearms.
+ // @tfield int flashDuration specifies the duration of a gunflash effect.
"flashDuration", &WeaponSettings::FlashDuration,
/// Gun smoke.
- // @tfield bool smoke if set to true, indicates that weapon emits gun smoke. Not applicable for crossbow and harpoon gun.
+ // @tfield bool smoke if set to true, indicates that weapon emits gun smoke.
"smoke", &WeaponSettings::Smoke,
/// Gun shell.
@@ -306,19 +306,19 @@ namespace TEN::Scripting
"shell", &WeaponSettings::Shell,
/// Display muzzle flash.
- // @tfield bool muzzleFlash specifies whether muzzle flash should be displayed or not. Applicable only for firearms.
+ // @tfield bool muzzleFlash specifies whether muzzle flash should be displayed or not.
"muzzleFlash", &WeaponSettings::MuzzleFlash,
/// Display muzzle glow.
- // @tfield bool muzzleGlow specifies whether muzzle glow should be displayed or not. Applicable only for firearms.
+ // @tfield bool muzzleGlow specifies whether muzzle glow should be displayed or not.
"muzzleGlow", &WeaponSettings::MuzzleGlow,
/// Colorize muzzle flash.
- // @tfield bool colorizeMuzzleFlash specifies whether muzzle flash should be tinted with the same color as gunflash color. Applicable only for firearms.
+ // @tfield bool colorizeMuzzleFlash specifies whether muzzle flash should be tinted with the same color as gunflash color.
"colorizeMuzzleFlash", &WeaponSettings::ColorizeMuzzleFlash,
/// Muzzle offset.
- // @tfield Vec3 muzzleOffset specifies offset for spawning muzzle gunflash effects. Applicable only for firearms.
+ // @tfield Vec3 muzzleOffset specifies offset for spawning muzzle gunflash effects.
"muzzleOffset", &WeaponSettings::MuzzleOffset);
}
diff --git a/TombEngine/Specific/savegame/flatbuffers/ten_savegame_generated.h b/TombEngine/Specific/savegame/flatbuffers/ten_savegame_generated.h
index 3c85b7494..e9aa45a96 100644
--- a/TombEngine/Specific/savegame/flatbuffers/ten_savegame_generated.h
+++ b/TombEngine/Specific/savegame/flatbuffers/ten_savegame_generated.h
@@ -3798,7 +3798,6 @@ struct WeaponControlDataT : public flatbuffers::NativeTable {
typedef WeaponControlData TableType;
int32_t weapon_item = 0;
bool has_fired = false;
- bool fired = false;
bool uzi_left = false;
bool uzi_right = false;
int32_t gun_type = 0;
@@ -3817,16 +3816,15 @@ struct WeaponControlData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_WEAPON_ITEM = 4,
VT_HAS_FIRED = 6,
- VT_FIRED = 8,
- VT_UZI_LEFT = 10,
- VT_UZI_RIGHT = 12,
- VT_GUN_TYPE = 14,
- VT_REQUEST_GUN_TYPE = 16,
- VT_LAST_GUN_TYPE = 18,
- VT_HOLSTER_INFO = 20,
- VT_NUM_SHOTS_FIRED = 22,
- VT_INTERVAL = 24,
- VT_TIMER = 26
+ VT_UZI_LEFT = 8,
+ VT_UZI_RIGHT = 10,
+ VT_GUN_TYPE = 12,
+ VT_REQUEST_GUN_TYPE = 14,
+ VT_LAST_GUN_TYPE = 16,
+ VT_HOLSTER_INFO = 18,
+ VT_NUM_SHOTS_FIRED = 20,
+ VT_INTERVAL = 22,
+ VT_TIMER = 24
};
int32_t weapon_item() const {
return GetField(VT_WEAPON_ITEM, 0);
@@ -3834,9 +3832,6 @@ struct WeaponControlData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
bool has_fired() const {
return GetField(VT_HAS_FIRED, 0) != 0;
}
- bool fired() const {
- return GetField(VT_FIRED, 0) != 0;
- }
bool uzi_left() const {
return GetField(VT_UZI_LEFT, 0) != 0;
}
@@ -3868,7 +3863,6 @@ struct WeaponControlData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
return VerifyTableStart(verifier) &&
VerifyField(verifier, VT_WEAPON_ITEM) &&
VerifyField(verifier, VT_HAS_FIRED) &&
- VerifyField(verifier, VT_FIRED) &&
VerifyField(verifier, VT_UZI_LEFT) &&
VerifyField(verifier, VT_UZI_RIGHT) &&
VerifyField(verifier, VT_GUN_TYPE) &&
@@ -3896,9 +3890,6 @@ struct WeaponControlDataBuilder {
void add_has_fired(bool has_fired) {
fbb_.AddElement(WeaponControlData::VT_HAS_FIRED, static_cast(has_fired), 0);
}
- void add_fired(bool fired) {
- fbb_.AddElement(WeaponControlData::VT_FIRED, static_cast(fired), 0);
- }
void add_uzi_left(bool uzi_left) {
fbb_.AddElement(WeaponControlData::VT_UZI_LEFT, static_cast(uzi_left), 0);
}
@@ -3941,7 +3932,6 @@ inline flatbuffers::Offset CreateWeaponControlData(
flatbuffers::FlatBufferBuilder &_fbb,
int32_t weapon_item = 0,
bool has_fired = false,
- bool fired = false,
bool uzi_left = false,
bool uzi_right = false,
int32_t gun_type = 0,
@@ -3962,7 +3952,6 @@ inline flatbuffers::Offset CreateWeaponControlData(
builder_.add_weapon_item(weapon_item);
builder_.add_uzi_right(uzi_right);
builder_.add_uzi_left(uzi_left);
- builder_.add_fired(fired);
builder_.add_has_fired(has_fired);
return builder_.Finish();
}
@@ -10201,7 +10190,6 @@ inline void WeaponControlData::UnPackTo(WeaponControlDataT *_o, const flatbuffer
(void)_resolver;
{ auto _e = weapon_item(); _o->weapon_item = _e; }
{ auto _e = has_fired(); _o->has_fired = _e; }
- { auto _e = fired(); _o->fired = _e; }
{ auto _e = uzi_left(); _o->uzi_left = _e; }
{ auto _e = uzi_right(); _o->uzi_right = _e; }
{ auto _e = gun_type(); _o->gun_type = _e; }
@@ -10223,7 +10211,6 @@ inline flatbuffers::Offset CreateWeaponControlData(flatbuffer
struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const WeaponControlDataT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va;
auto _weapon_item = _o->weapon_item;
auto _has_fired = _o->has_fired;
- auto _fired = _o->fired;
auto _uzi_left = _o->uzi_left;
auto _uzi_right = _o->uzi_right;
auto _gun_type = _o->gun_type;
@@ -10237,7 +10224,6 @@ inline flatbuffers::Offset CreateWeaponControlData(flatbuffer
_fbb,
_weapon_item,
_has_fired,
- _fired,
_uzi_left,
_uzi_right,
_gun_type,
diff --git a/TombEngine/Specific/savegame/schema/ten_savegame.fbs b/TombEngine/Specific/savegame/schema/ten_savegame.fbs
index 11d988d99..335dd93bb 100644
--- a/TombEngine/Specific/savegame/schema/ten_savegame.fbs
+++ b/TombEngine/Specific/savegame/schema/ten_savegame.fbs
@@ -265,7 +265,6 @@ table TightropeControlData {
table WeaponControlData {
weapon_item: int32;
has_fired: bool;
- fired: bool;
uzi_left: bool;
uzi_right: bool;
gun_type: int32;
From cb23823e64f6b6f000a35c2847374f8c6ed3e98c Mon Sep 17 00:00:00 2001
From: Lwmte <3331699+Lwmte@users.noreply.github.com>
Date: Sun, 20 Apr 2025 22:06:07 +0300
Subject: [PATCH 21/32] Video playback (#1625)
* Work
* Work
* Update Video.cpp
* Update Video.cpp
* Update Video.cpp
* Update Video.cpp
* Update Video.cpp
* Working playback
* Update Video.cpp
* Cleanups
* Additions
* Update Video.cpp
* Formatting
* Correct pausing/resuming
* Remove .mov extension, as it's not supported
* Use vector instead of array
* Implement SetIntroVideoPath
* Swap intro image and intro video to better reflect original legal sequence
* Update Gameflow.lua
* Simplify synchronization with VLC thread
* Use Vector2i for sizes, only fetch video dimensions once
* Rename callbacks, move logging callback to a class
* Update Video.cpp
* Update CHANGELOG.md
* Removed empty OnDisplayFrame event
* Rename
* Stop video player if user pressed Alt+F4
* Allow background video playback
* Update Video.cpp
* Update Video.cpp
* Fixed init errors
* Restore .mov default extension for video playback
* Update RendererDraw2D.cpp
* Add video streaming for rectangular faces of room geometry
* Remove magic and use normalized UVs instead
* Use VIDEO_SPRITE_ID instead of NO_VALUE
* Added more scripting API functions for video playback
* Correct variable names
* Shorten notification
* Add GetVideoDominantColor
* Do proper cleanup when alt+F4ing during video playback
* Change game loop deinit to avoid several issues with cleaning up
* Organise `VideoHandler` class
* Randomize glow angle
* Update comment
* Update Video.cpp
* Update Video.cpp
* Fix issues with frame drops in exclusive mode
* Optimize CPU usage in exclusive mode
---------
Co-authored-by: Sezz
---
CHANGELOG.md | 5 +
Documentation/doc/1 modules/Flow.html | 27 +
Documentation/doc/1 modules/Sound.html | 2 +-
Documentation/doc/1 modules/View.html | 174 +-
.../doc/2 classes/View.DisplaySprite.html | 50 +-
Libs/vlc/libvlc.h | 546 +++
Libs/vlc/libvlc_dialog.h | 260 ++
Libs/vlc/libvlc_events.h | 457 +++
Libs/vlc/libvlc_media.h | 917 +++++
Libs/vlc/libvlc_media_discoverer.h | 188 +
Libs/vlc/libvlc_media_list.h | 200 +
Libs/vlc/libvlc_media_list_player.h | 249 ++
Libs/vlc/libvlc_media_player.h | 3304 +++++++++++++++++
Libs/vlc/libvlc_media_track.h | 212 ++
Libs/vlc/libvlc_picture.h | 151 +
Libs/vlc/libvlc_renderer_discoverer.h | 255 ++
Libs/vlc/libvlc_version.h | 79 +
Libs/vlc/libvlc_video.h | 67 +
Libs/vlc/vlc.h | 55 +
Libs/vlc/x64/libvlc.dll | Bin 0 -> 170496 bytes
Libs/vlc/x64/libvlc.lib | Bin 0 -> 59026 bytes
Libs/vlc/x64/libvlccore.dll | Bin 0 -> 4082688 bytes
Libs/vlc/x64/libvlccore.lib | Bin 0 -> 181442 bytes
Libs/vlc/x86/libvlc.dll | Bin 0 -> 153088 bytes
Libs/vlc/x86/libvlc.lib | Bin 0 -> 59898 bytes
Libs/vlc/x86/libvlccore.dll | Bin 0 -> 3806720 bytes
Libs/vlc/x86/libvlccore.lib | Bin 0 -> 184644 bytes
Scripts/Gameflow.lua | 5 +
TombEngine/Game/control/control.cpp | 55 +-
TombEngine/Game/control/control.h | 1 +
TombEngine/Game/debug/debug.cpp | 4 +
TombEngine/Game/gui.cpp | 12 +-
TombEngine/Game/savegame.cpp | 25 +-
.../Renderer/ConstantBuffers/AnimatedBuffer.h | 2 +-
TombEngine/Renderer/Renderer.cpp | 14 +-
TombEngine/Renderer/Renderer.h | 7 +-
TombEngine/Renderer/RendererCompatibility.cpp | 27 +-
TombEngine/Renderer/RendererDraw.cpp | 85 +-
TombEngine/Renderer/RendererDraw2D.cpp | 10 +-
TombEngine/Renderer/RendererDrawEffect.cpp | 8 +-
TombEngine/Renderer/RendererDrawMenu.cpp | 2 +-
TombEngine/Renderer/RendererInit.cpp | 8 +-
.../Structures/RendererAnimatedTexture.h | 1 +
.../Structures/RendererAnimatedTextureSet.h | 12 +-
.../Renderer/Structures/RendererSprite.h | 2 +
.../Include/Flow/ScriptInterfaceFlowHandler.h | 1 +
.../Scripting/Internal/ReservedScriptNames.h | 7 +
.../Internal/TEN/Flow/FlowHandler.cpp | 13 +
.../Scripting/Internal/TEN/Flow/FlowHandler.h | 1 +
.../Internal/TEN/Sound/SoundHandler.cpp | 2 +-
.../DisplaySprite/ScriptDisplaySprite.cpp | 37 +-
.../View/DisplaySprite/ScriptDisplaySprite.h | 2 +
.../Internal/TEN/View/ViewHandler.cpp | 96 +-
TombEngine/Sound/sound.cpp | 3 +
TombEngine/Specific/Input/Input.cpp | 6 +-
TombEngine/Specific/Input/Input.h | 2 +-
TombEngine/Specific/Video/Video.cpp | 622 ++++
TombEngine/Specific/Video/Video.h | 107 +
TombEngine/Specific/level.cpp | 12 +-
TombEngine/Specific/level.h | 7 +-
.../flatbuffers/ten_savegame_generated.h | 229 +-
.../Specific/savegame/schema/ten_savegame.fbs | 10 +-
TombEngine/Specific/winmain.cpp | 33 +-
TombEngine/TombEngine.vcxproj | 30 +-
TombEngine/framework.h | 1 +
65 files changed, 8551 insertions(+), 148 deletions(-)
create mode 100644 Libs/vlc/libvlc.h
create mode 100644 Libs/vlc/libvlc_dialog.h
create mode 100644 Libs/vlc/libvlc_events.h
create mode 100644 Libs/vlc/libvlc_media.h
create mode 100644 Libs/vlc/libvlc_media_discoverer.h
create mode 100644 Libs/vlc/libvlc_media_list.h
create mode 100644 Libs/vlc/libvlc_media_list_player.h
create mode 100644 Libs/vlc/libvlc_media_player.h
create mode 100644 Libs/vlc/libvlc_media_track.h
create mode 100644 Libs/vlc/libvlc_picture.h
create mode 100644 Libs/vlc/libvlc_renderer_discoverer.h
create mode 100644 Libs/vlc/libvlc_version.h
create mode 100644 Libs/vlc/libvlc_video.h
create mode 100644 Libs/vlc/vlc.h
create mode 100644 Libs/vlc/x64/libvlc.dll
create mode 100644 Libs/vlc/x64/libvlc.lib
create mode 100644 Libs/vlc/x64/libvlccore.dll
create mode 100644 Libs/vlc/x64/libvlccore.lib
create mode 100644 Libs/vlc/x86/libvlc.dll
create mode 100644 Libs/vlc/x86/libvlc.lib
create mode 100644 Libs/vlc/x86/libvlccore.dll
create mode 100644 Libs/vlc/x86/libvlccore.lib
create mode 100644 TombEngine/Specific/Video/Video.cpp
create mode 100644 TombEngine/Specific/Video/Video.h
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 273123e04..4973d3ee7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,9 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
## [Version 1.8.2]
+## New features
+* Added video playback support.
+
### Bug fixes
* Fixed crashes when shooting, if gunflash or gunshell objects are not present in a level.
* Fixed Teleporter object.
@@ -20,6 +23,8 @@ TombEngine releases are located in this repository (alongside with Tomb Editor):
* Added muzzle glow effect for firearms.
### Lua API changes
+* Added `View.PlayVideoFile` function to play videos.
+* Added `Flow.SetIntroVideoPath` function to specify intro video.
* Added `muzzleGlow` and `muzzleOffset` parameters to weapon settings.
* Added ability to use gunflash parameters for all weapons in weapon settings.
* Fixed `Moveable.GetJointPosition` not returning correct results if moveable is invisible or not rendered.
diff --git a/Documentation/doc/1 modules/Flow.html b/Documentation/doc/1 modules/Flow.html
index 4a680cba5..998af2ca6 100644
--- a/Documentation/doc/1 modules/Flow.html
+++ b/Documentation/doc/1 modules/Flow.html
@@ -132,6 +132,10 @@ scripts too.
Image to show when loading the game. |
+ SetIntroVideoPath(path) |
+ Video to show when loading the game. |
+
+
SetTitleScreenImagePath(path) |
Image to show in the background of the title screen. |
@@ -330,6 +334,29 @@ Must be a .jpg or .png image.
+
+
+
+ SetIntroVideoPath(path)
+
+
+ Video to show when loading the game.
+Must be a common video format, such as .mp4, .mkv or .avi.
+
+
+
+ Parameters:
+
+ - path
+ string
+ the path to the video, relative to the TombEngine exe
+
+
+
+
+
+
+
diff --git a/Documentation/doc/1 modules/Sound.html b/Documentation/doc/1 modules/Sound.html
index be07997d5..d15b22848 100644
--- a/Documentation/doc/1 modules/Sound.html
+++ b/Documentation/doc/1 modules/Sound.html
@@ -177,7 +177,7 @@
PlayAudioTrack(filename, type)
- Play an audio track. Supported formats are wav, mp3 and ogg.
+ Play an audio track. Should be placed in the Audio
folder. Supported formats are wav, mp3 and ogg.
diff --git a/Documentation/doc/1 modules/View.html b/Documentation/doc/1 modules/View.html
index 51c5b824e..3e55ab4e5 100644
--- a/Documentation/doc/1 modules/View.html
+++ b/Documentation/doc/1 modules/View.html
@@ -172,6 +172,30 @@
Sets the post-process tint. |
+ PlayVideo(fileName[, background][, silent][, loop]) |
+ Play a video file. |
+
+
+ StopVideo() |
+ Stop the currently playing video. |
+
+
+ GetVideoPosition() |
+ Gets the currently playing video position. |
+
+
+ SetVideoPosition(position) |
+ Sets the currently playing video position. |
+
+
+ GetVideoDominantColor() |
+ Gets the dominant color for the current video frame. |
+
+
+ IsVideoPlaying([name]) |
+ Checks if video is currently playing. |
+
+
PlayFlyby(seqID) |
Play a flyby sequence. |
@@ -261,11 +285,11 @@
- height
float
- (default 30) Percentage of the screen to be covered
+ (default 30). Percentage of the screen to be covered
- speed
float
- (default 30) Coverage percent per second
+ (default 30). Coverage percent per second
@@ -474,6 +498,152 @@
+
+
+
+ PlayVideo(fileName[, background][, silent][, loop])
+
+
+ Play a video file. File should be placed in the FMV
folder.
+
+
+
+ Parameters:
+
+ - fileName
+ string
+ Video file name. Can be provided without extension, if type is mp4, mkv or avi.
+
+ - background
+ bool
+ (default: false). Play video in the background mode.
+ In such case, video won't play in fullscreen, but must be shown using special animated texture type in Tomb Editor, or using View.DisplaySprite.
+ (optional)
+
+ - silent
+ bool
+ (default: false). Play video without sound.
+ (optional)
+
+ - loop
+ bool
+ (default: false). Play video in a loop.
+ (optional)
+
+
+
+
+
+
+
+
+
+
+ StopVideo()
+
+
+ Stop the currently playing video. Only possible if video is playing in the background mode.
+
+
+
+
+
+
+
+
+
+
+
+ GetVideoPosition()
+
+
+ Gets the currently playing video position.
+
+
+
+
+ Returns:
+
+
+ Time
+ Current video position.
+
+
+
+
+
+
+
+
+ SetVideoPosition(position)
+
+
+ Sets the currently playing video position.
+
+
+
+ Parameters:
+
+ - position
+ Time
+ New video position.
+
+
+
+
+
+
+
+
+
+
+ GetVideoDominantColor()
+
+
+ Gets the dominant color for the current video frame. If no video is playing, returns black.
+
+
+
+
+ Returns:
+
+
+ Color
+ Dominant video color.
+
+
+
+
+
+
+
+
+ IsVideoPlaying([name])
+
+
+ Checks if video is currently playing.
+
+
+
+ Parameters:
+
+ - name
+ string
+ Video file name. If provided, checks if the currently playing video file name is the same as the provided one.
+ (optional)
+
+
+
+ Returns:
+
+
+ bool
+ True if video is currently playing.
+
+
+
+
+
diff --git a/Documentation/doc/2 classes/View.DisplaySprite.html b/Documentation/doc/2 classes/View.DisplaySprite.html
index 2b097a9bb..e46055254 100644
--- a/Documentation/doc/2 classes/View.DisplaySprite.html
+++ b/Documentation/doc/2 classes/View.DisplaySprite.html
@@ -128,6 +128,10 @@
Create a DisplaySprite object. |
+ DisplaySprite(pos, rot, scale[, color]) |
+ Create a DisplaySprite object with a video image. |
+
+
DisplaySprite:GetObjectID() |
Get the object ID of the sprite sequence object used by the display sprite. |
@@ -193,7 +197,7 @@
DisplaySprite(ID, int, pos, rot, scale, [color])
- Create a DisplaySprite object. ()
+ Create a DisplaySprite object.
@@ -236,6 +240,48 @@
+
+
+
+ DisplaySprite(pos, rot, scale[, color])
+
+
+ Create a DisplaySprite object with a video image.
+ Video should be played using View.PlayVideo function in a background mode. If no video is played, sprite will not show.
+
+
+
+ Parameters:
+
+ - pos
+ Vec2
+ Display position in percent.
+
+ - rot
+ float
+ Rotation in degrees.
+
+ - scale
+ Vec2
+ Horizontal and vertical scale in percent. Scaling is interpreted by the DisplaySpriteEnum.ScaleMode passed to the Draw() function call.
+
+ - color
+ Color
+ Color. Default: Color(255, 255, 255, 255)
+ (optional)
+
+
+
+ Returns:
+
+
+ DisplaySprite
+ A new DisplaySprite object with attached video image.
+
+
+
+
+
@@ -272,7 +318,7 @@
int
- Sprite ID in the sprite sequence object.
+ Sprite ID in the sprite sequence object. Value -1 means that it is a background video, played using View.PlayVideo.
diff --git a/Libs/vlc/libvlc.h b/Libs/vlc/libvlc.h
new file mode 100644
index 000000000..0970dc294
--- /dev/null
+++ b/Libs/vlc/libvlc.h
@@ -0,0 +1,546 @@
+/*****************************************************************************
+ * libvlc.h: libvlc external API
+ *****************************************************************************
+ * Copyright (C) 1998-2009 VLC authors and VideoLAN
+ *
+ * Authors: Clément Stenac
+ * Jean-Paul Saman
+ * Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+/**
+ * \defgroup libvlc LibVLC
+ * LibVLC is the external programming interface of the VLC media player.
+ * It is used to embed VLC into other applications or frameworks.
+ * @{
+ * \file
+ * LibVLC core external API
+ */
+
+#ifndef VLC_LIBVLC_H
+#define VLC_LIBVLC_H 1
+
+#if defined (_WIN32) && defined (LIBVLC_DLL_EXPORT)
+# define LIBVLC_API __declspec(dllexport)
+#elif defined (__GNUC__) && (__GNUC__ >= 4)
+# define LIBVLC_API __attribute__((visibility("default")))
+#else
+# define LIBVLC_API
+#endif
+
+#ifdef LIBVLC_INTERNAL_
+/* Avoid unhelpful warnings from libvlc with our deprecated APIs */
+# define LIBVLC_DEPRECATED
+#elif defined(__GNUC__) && \
+ (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
+# define LIBVLC_DEPRECATED __attribute__((deprecated))
+#else
+# define LIBVLC_DEPRECATED
+#endif
+
+#include
+#include
+#include
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/** \defgroup libvlc_core LibVLC core
+ * \ingroup libvlc
+ * Before it can do anything useful, LibVLC must be initialized.
+ * You can create one (or more) instance(s) of LibVLC in a given process,
+ * with libvlc_new() and destroy them with libvlc_release().
+ *
+ * \version Unless otherwise stated, these functions are available
+ * from LibVLC versions numbered 1.1.0 or more.
+ * Earlier versions (0.9.x and 1.0.x) are not compatible.
+ * @{
+ */
+
+/** This structure is opaque. It represents a libvlc instance */
+typedef struct libvlc_instance_t libvlc_instance_t;
+
+typedef int64_t libvlc_time_t;
+
+/** \defgroup libvlc_error LibVLC error handling
+ * @{
+ */
+
+/**
+ * A human-readable error message for the last LibVLC error in the calling
+ * thread. The resulting string is valid until another error occurs (at least
+ * until the next LibVLC call).
+ *
+ * @warning
+ * This will be NULL if there was no error.
+ */
+LIBVLC_API const char *libvlc_errmsg (void);
+
+/**
+ * Clears the LibVLC error status for the current thread. This is optional.
+ * By default, the error status is automatically overridden when a new error
+ * occurs, and destroyed when the thread exits.
+ */
+LIBVLC_API void libvlc_clearerr (void);
+
+/**
+ * Sets the LibVLC error status and message for the current thread.
+ * Any previous error is overridden.
+ * \param fmt the format string
+ * \param ... the arguments for the format string
+ * \return a nul terminated string in any case
+ */
+const char *libvlc_printerr (const char *fmt, ...);
+
+/**@} */
+
+/**
+ * Create and initialize a libvlc instance.
+ * This functions accept a list of "command line" arguments similar to the
+ * main(). These arguments affect the LibVLC instance default configuration.
+ *
+ * \note
+ * LibVLC may create threads. Therefore, any thread-unsafe process
+ * initialization must be performed before calling libvlc_new(). In particular
+ * and where applicable:
+ * - setlocale() and textdomain(),
+ * - setenv(), unsetenv() and putenv(),
+ * - with the X11 display system, XInitThreads()
+ * (see also libvlc_media_player_set_xwindow()) and
+ * - on Microsoft Windows, SetErrorMode().
+ * - sigprocmask() shall never be invoked; pthread_sigmask() can be used.
+ *
+ * On POSIX systems, the SIGCHLD signal must not be ignored, i.e. the
+ * signal handler must set to SIG_DFL or a function pointer, not SIG_IGN.
+ * Also while LibVLC is active, the wait() function shall not be called, and
+ * any call to waitpid() shall use a strictly positive value for the first
+ * parameter (i.e. the PID). Failure to follow those rules may lead to a
+ * deadlock or a busy loop.
+ * Also on POSIX systems, it is recommended that the SIGPIPE signal be blocked,
+ * even if it is not, in principles, necessary, e.g.:
+ * @code
+ sigset_t set;
+
+ signal(SIGCHLD, SIG_DFL);
+ sigemptyset(&set);
+ sigaddset(&set, SIGPIPE);
+ pthread_sigmask(SIG_BLOCK, &set, NULL);
+ * @endcode
+ *
+ * On Microsoft Windows, setting the default DLL directories to SYSTEM32
+ * exclusively is strongly recommended for security reasons:
+ * @code
+ SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);
+ * @endcode
+ *
+ * \version
+ * Arguments are meant to be passed from the command line to LibVLC, just like
+ * VLC media player does. The list of valid arguments depends on the LibVLC
+ * version, the operating system and platform, and set of available LibVLC
+ * plugins. Invalid or unsupported arguments will cause the function to fail
+ * (i.e. return NULL). Also, some arguments may alter the behaviour or
+ * otherwise interfere with other LibVLC functions.
+ *
+ * \warning
+ * There is absolutely no warranty or promise of forward, backward and
+ * cross-platform compatibility with regards to libvlc_new() arguments.
+ * We recommend that you do not use them, other than when debugging.
+ *
+ * \param argc the number of arguments (should be 0)
+ * \param argv list of arguments (should be NULL)
+ * \return the libvlc instance or NULL in case of error
+ */
+LIBVLC_API libvlc_instance_t *
+libvlc_new( int argc , const char *const *argv );
+
+/**
+ * Decrement the reference count of a libvlc instance, and destroy it
+ * if it reaches zero.
+ *
+ * \param p_instance the instance to destroy
+ */
+LIBVLC_API void libvlc_release( libvlc_instance_t *p_instance );
+
+/**
+ * Increments the reference count of a libvlc instance.
+ * The initial reference count is 1 after libvlc_new() returns.
+ *
+ * \param p_instance the instance to reference
+ * \return the same object
+ */
+LIBVLC_API libvlc_instance_t *libvlc_retain( libvlc_instance_t *p_instance );
+
+/**
+ * Get the ABI version of the libvlc library.
+ *
+ * This is different than the VLC version, which is the version of the whole
+ * VLC package. The value is the same as LIBVLC_ABI_VERSION_INT used when
+ * compiling.
+ *
+ * \return a value with the following mask in hexadecimal
+ * 0xFF000000: major VLC version, similar to VLC major version,
+ * 0x00FF0000: major ABI version, incremented incompatible changes are added,
+ * 0x0000FF00: minor ABI version, incremented when new functions are added
+ * 0x000000FF: micro ABI version, incremented with new release/builds
+ *
+ * \note This the same value as the .so version but cross platform.
+ */
+LIBVLC_API int libvlc_abi_version(void);
+
+/**
+ * Sets the application name. LibVLC passes this as the user agent string
+ * when a protocol requires it.
+ *
+ * \param p_instance LibVLC instance
+ * \param name human-readable application name, e.g. "FooBar player 1.2.3"
+ * \param http HTTP User Agent, e.g. "FooBar/1.2.3 Python/2.6.0"
+ * \version LibVLC 1.1.1 or later
+ */
+LIBVLC_API
+void libvlc_set_user_agent( libvlc_instance_t *p_instance,
+ const char *name, const char *http );
+
+/**
+ * Sets some meta-information about the application.
+ * See also libvlc_set_user_agent().
+ *
+ * \param p_instance LibVLC instance
+ * \param id Java-style application identifier, e.g. "com.acme.foobar"
+ * \param version application version numbers, e.g. "1.2.3"
+ * \param icon application icon name, e.g. "foobar"
+ * \version LibVLC 2.1.0 or later.
+ */
+LIBVLC_API
+void libvlc_set_app_id( libvlc_instance_t *p_instance, const char *id,
+ const char *version, const char *icon );
+
+/**
+ * Retrieve libvlc version.
+ *
+ * Example: "1.1.0-git The Luggage"
+ *
+ * \return a string containing the libvlc version
+ */
+LIBVLC_API const char * libvlc_get_version(void);
+
+/**
+ * Retrieve libvlc compiler version.
+ *
+ * Example: "gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)"
+ *
+ * \return a string containing the libvlc compiler version
+ */
+LIBVLC_API const char * libvlc_get_compiler(void);
+
+/**
+ * Retrieve libvlc changeset.
+ *
+ * Example: "aa9bce0bc4"
+ *
+ * \return a string containing the libvlc changeset
+ */
+LIBVLC_API const char * libvlc_get_changeset(void);
+
+/**
+ * Frees an heap allocation returned by a LibVLC function.
+ * If you know you're using the same underlying C run-time as the LibVLC
+ * implementation, then you can call ANSI C free() directly instead.
+ *
+ * \param ptr the pointer
+ */
+LIBVLC_API void libvlc_free( void *ptr );
+
+/** \defgroup libvlc_event LibVLC asynchronous events
+ * LibVLC emits asynchronous events.
+ *
+ * Several LibVLC objects (such @ref libvlc_instance_t as
+ * @ref libvlc_media_player_t) generate events asynchronously. Each of them
+ * provides @ref libvlc_event_manager_t event manager. You can subscribe to
+ * events with libvlc_event_attach() and unsubscribe with
+ * libvlc_event_detach().
+ * @{
+ */
+
+/**
+ * Event manager that belongs to a libvlc object, and from whom events can
+ * be received.
+ */
+typedef struct libvlc_event_manager_t libvlc_event_manager_t;
+
+struct libvlc_event_t;
+
+/**
+ * Type of a LibVLC event.
+ */
+typedef int libvlc_event_type_t;
+
+/**
+ * Callback function notification
+ * \param p_event the event triggering the callback
+ */
+typedef void ( *libvlc_callback_t )( const struct libvlc_event_t *p_event, void *p_data );
+
+/**
+ * Register for an event notification.
+ *
+ * \param p_event_manager the event manager to which you want to attach to.
+ * Generally it is obtained by vlc_my_object_event_manager() where
+ * my_object is the object you want to listen to.
+ * \param i_event_type the desired event to which we want to listen
+ * \param f_callback the function to call when i_event_type occurs
+ * \param user_data user provided data to carry with the event
+ * \return 0 on success, ENOMEM on error
+ */
+LIBVLC_API int libvlc_event_attach( libvlc_event_manager_t *p_event_manager,
+ libvlc_event_type_t i_event_type,
+ libvlc_callback_t f_callback,
+ void *user_data );
+
+/**
+ * Unregister an event notification.
+ *
+ * \param p_event_manager the event manager
+ * \param i_event_type the desired event to which we want to unregister
+ * \param f_callback the function to call when i_event_type occurs
+ * \param p_user_data user provided data to carry with the event
+ */
+LIBVLC_API void libvlc_event_detach( libvlc_event_manager_t *p_event_manager,
+ libvlc_event_type_t i_event_type,
+ libvlc_callback_t f_callback,
+ void *p_user_data );
+
+/** @} */
+
+/** \defgroup libvlc_log LibVLC logging
+ * libvlc_log_* functions provide access to the LibVLC messages log.
+ * This is used for logging and debugging.
+ * @{
+ */
+
+/**
+ * Logging messages level.
+ * \note Future LibVLC versions may define new levels.
+ */
+enum libvlc_log_level
+{
+ LIBVLC_DEBUG=0, /**< Debug message */
+ LIBVLC_NOTICE=2, /**< Important informational message */
+ LIBVLC_WARNING=3, /**< Warning (potential error) message */
+ LIBVLC_ERROR=4 /**< Error message */
+};
+
+typedef struct vlc_log_t libvlc_log_t;
+
+/**
+ * Gets log message debug infos.
+ *
+ * This function retrieves self-debug information about a log message:
+ * - the name of the VLC module emitting the message,
+ * - the name of the source code module (i.e. file) and
+ * - the line number within the source code module.
+ *
+ * The returned module name and file name will be NULL if unknown.
+ * The returned line number will similarly be zero if unknown.
+ *
+ * \param ctx message context (as passed to the @ref libvlc_log_cb callback)
+ * \param module module name storage (or NULL) [OUT]
+ * \param file source code file name storage (or NULL) [OUT]
+ * \param line source code file line number storage (or NULL) [OUT]
+ * \warning The returned module name and source code file name, if non-NULL,
+ * are only valid until the logging callback returns.
+ *
+ * \version LibVLC 2.1.0 or later
+ */
+LIBVLC_API void libvlc_log_get_context(const libvlc_log_t *ctx,
+ const char **module, const char **file, unsigned *line);
+
+/**
+ * Gets log message info.
+ *
+ * This function retrieves meta-information about a log message:
+ * - the type name of the VLC object emitting the message,
+ * - the object header if any, and
+ * - a temporaly-unique object identifier.
+ *
+ * This information is mainly meant for manual troubleshooting.
+ *
+ * The returned type name may be "generic" if unknown, but it cannot be NULL.
+ * The returned header will be NULL if unset; in current versions, the header
+ * is used to distinguish for VLM inputs.
+ * The returned object ID will be zero if the message is not associated with
+ * any VLC object.
+ *
+ * \param ctx message context (as passed to the @ref libvlc_log_cb callback)
+ * \param name object name storage (or NULL) [OUT]
+ * \param header object header (or NULL) [OUT]
+ * \param id temporarily-unique object identifier (or 0) [OUT]
+ * \warning The returned module name and source code file name, if non-NULL,
+ * are only valid until the logging callback returns.
+ *
+ * \version LibVLC 2.1.0 or later
+ */
+LIBVLC_API void libvlc_log_get_object(const libvlc_log_t *ctx,
+ const char **name, const char **header, uintptr_t *id);
+
+/**
+ * Callback prototype for LibVLC log message handler.
+ *
+ * \param data data pointer as given to libvlc_log_set()
+ * \param level message level (@ref libvlc_log_level)
+ * \param ctx message context (meta-information about the message)
+ * \param fmt printf() format string (as defined by ISO C11)
+ * \param args variable argument list for the format
+ * \note Log message handlers must be thread-safe.
+ * \warning The message context pointer, the format string parameters and the
+ * variable arguments are only valid until the callback returns.
+ */
+typedef void (*libvlc_log_cb)(void *data, int level, const libvlc_log_t *ctx,
+ const char *fmt, va_list args);
+
+/**
+ * Unsets the logging callback.
+ *
+ * This function deregisters the logging callback for a LibVLC instance.
+ * This is rarely needed as the callback is implicitly unset when the instance
+ * is destroyed.
+ *
+ * \note This function will wait for any pending callbacks invocation to
+ * complete (causing a deadlock if called from within the callback).
+ *
+ * \param p_instance libvlc instance
+ * \version LibVLC 2.1.0 or later
+ */
+LIBVLC_API void libvlc_log_unset( libvlc_instance_t *p_instance );
+
+/**
+ * Sets the logging callback for a LibVLC instance.
+ *
+ * This function is thread-safe: it will wait for any pending callbacks
+ * invocation to complete.
+ *
+ * \param cb callback function pointer
+ * \param data opaque data pointer for the callback function
+ *
+ * \note Some log messages (especially debug) are emitted by LibVLC while
+ * is being initialized. These messages cannot be captured with this interface.
+ *
+ * \warning A deadlock may occur if this function is called from the callback.
+ *
+ * \param p_instance libvlc instance
+ * \version LibVLC 2.1.0 or later
+ */
+LIBVLC_API void libvlc_log_set( libvlc_instance_t *p_instance,
+ libvlc_log_cb cb, void *data );
+
+
+/**
+ * Sets up logging to a file.
+ * \param p_instance libvlc instance
+ * \param stream FILE pointer opened for writing
+ * (the FILE pointer must remain valid until libvlc_log_unset())
+ * \version LibVLC 2.1.0 or later
+ */
+LIBVLC_API void libvlc_log_set_file( libvlc_instance_t *p_instance, FILE *stream );
+
+/** @} */
+
+/**
+ * Description of a module.
+ */
+typedef struct libvlc_module_description_t
+{
+ char *psz_name;
+ char *psz_shortname;
+ char *psz_longname;
+ char *psz_help;
+ char *psz_help_html;
+ struct libvlc_module_description_t *p_next;
+} libvlc_module_description_t;
+
+/**
+ * Release a list of module descriptions.
+ *
+ * \param p_list the list to be released
+ */
+LIBVLC_API
+void libvlc_module_description_list_release( libvlc_module_description_t *p_list );
+
+/**
+ * Returns a list of audio filters that are available.
+ *
+ * \param p_instance libvlc instance
+ *
+ * \return a list of module descriptions. It should be freed with libvlc_module_description_list_release().
+ * In case of an error, NULL is returned.
+ *
+ * \see libvlc_module_description_t
+ * \see libvlc_module_description_list_release
+ */
+LIBVLC_API
+libvlc_module_description_t *libvlc_audio_filter_list_get( libvlc_instance_t *p_instance );
+
+/**
+ * Returns a list of video filters that are available.
+ *
+ * \param p_instance libvlc instance
+ *
+ * \return a list of module descriptions. It should be freed with libvlc_module_description_list_release().
+ * In case of an error, NULL is returned.
+ *
+ * \see libvlc_module_description_t
+ * \see libvlc_module_description_list_release
+ */
+LIBVLC_API
+libvlc_module_description_t *libvlc_video_filter_list_get( libvlc_instance_t *p_instance );
+
+/** @} */
+
+/** \defgroup libvlc_clock LibVLC time
+ * These functions provide access to the LibVLC time/clock.
+ * @{
+ */
+
+/**
+ * Return the current time as defined by LibVLC. The unit is the microsecond.
+ * Time increases monotonically (regardless of time zone changes and RTC
+ * adjustments).
+ * The origin is arbitrary but consistent across the whole system
+ * (e.g. the system uptime, the time since the system was booted).
+ * \note On systems that support it, the POSIX monotonic clock is used.
+ */
+LIBVLC_API
+int64_t libvlc_clock(void);
+
+/**
+ * Return the delay (in microseconds) until a certain timestamp.
+ * \param pts timestamp
+ * \return negative if timestamp is in the past,
+ * positive if it is in the future
+ */
+static inline int64_t libvlc_delay(int64_t pts)
+{
+ return pts - libvlc_clock();
+}
+
+/** @} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /** @} */
diff --git a/Libs/vlc/libvlc_dialog.h b/Libs/vlc/libvlc_dialog.h
new file mode 100644
index 000000000..e87d8464c
--- /dev/null
+++ b/Libs/vlc/libvlc_dialog.h
@@ -0,0 +1,260 @@
+/*****************************************************************************
+ * libvlc_dialog.h: libvlc dialog API
+ *****************************************************************************
+ * Copyright © 2016 VLC authors and VideoLAN
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef LIBVLC_DIALOG_H
+#define LIBVLC_DIALOG_H 1
+
+#include
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+typedef struct libvlc_dialog_id libvlc_dialog_id;
+
+/**
+ * @defgroup libvlc_dialog LibVLC dialog
+ * @ingroup libvlc
+ * @{
+ * @file
+ * LibVLC dialog external API
+ */
+
+typedef enum libvlc_dialog_question_type
+{
+ LIBVLC_DIALOG_QUESTION_NORMAL,
+ LIBVLC_DIALOG_QUESTION_WARNING,
+ LIBVLC_DIALOG_QUESTION_CRITICAL,
+} libvlc_dialog_question_type;
+
+/**
+ * Dialog callbacks to be implemented
+ *
+ * @attention starting with vlc 4.0.0 the error callback (pf_display_error) is
+ * no longer part of this struct and need to be registered separately
+ * using @a libvlc_dialog_set_error_callback
+ *
+ * @see libvlc_dialog_set_error_callback
+ */
+typedef struct libvlc_dialog_cbs
+{
+ /**
+ * Called when a login dialog needs to be displayed
+ *
+ * You can interact with this dialog by calling libvlc_dialog_post_login()
+ * to post an answer or libvlc_dialog_dismiss() to cancel this dialog.
+ *
+ * @note to receive this callback, libvlc_dialog_cbs.pf_cancel should not be
+ * NULL.
+ *
+ * @param p_data opaque pointer for the callback
+ * @param p_id id used to interact with the dialog
+ * @param psz_title title of the dialog
+ * @param psz_text text of the dialog
+ * @param psz_default_username user name that should be set on the user form
+ * @param b_ask_store if true, ask the user if he wants to save the
+ * credentials
+ */
+ void (*pf_display_login)(void *p_data, libvlc_dialog_id *p_id,
+ const char *psz_title, const char *psz_text,
+ const char *psz_default_username,
+ bool b_ask_store);
+
+ /**
+ * Called when a question dialog needs to be displayed
+ *
+ * You can interact with this dialog by calling libvlc_dialog_post_action()
+ * to post an answer or libvlc_dialog_dismiss() to cancel this dialog.
+ *
+ * @note to receive this callback, libvlc_dialog_cbs.pf_cancel should not be
+ * NULL.
+ *
+ * @param p_data opaque pointer for the callback
+ * @param p_id id used to interact with the dialog
+ * @param psz_title title of the dialog
+ * @param psz_text text of the dialog
+ * @param i_type question type (or severity) of the dialog
+ * @param psz_cancel text of the cancel button
+ * @param psz_action1 text of the first button, if NULL, don't display this
+ * button
+ * @param psz_action2 text of the second button, if NULL, don't display
+ * this button
+ */
+ void (*pf_display_question)(void *p_data, libvlc_dialog_id *p_id,
+ const char *psz_title, const char *psz_text,
+ libvlc_dialog_question_type i_type,
+ const char *psz_cancel, const char *psz_action1,
+ const char *psz_action2);
+
+ /**
+ * Called when a progress dialog needs to be displayed
+ *
+ * If cancellable (psz_cancel != NULL), you can cancel this dialog by
+ * calling libvlc_dialog_dismiss()
+ *
+ * @note to receive this callback, libvlc_dialog_cbs.pf_cancel and
+ * libvlc_dialog_cbs.pf_update_progress should not be NULL.
+ *
+ * @param p_data opaque pointer for the callback
+ * @param p_id id used to interact with the dialog
+ * @param psz_title title of the dialog
+ * @param psz_text text of the dialog
+ * @param b_indeterminate true if the progress dialog is indeterminate
+ * @param f_position initial position of the progress bar (between 0.0 and
+ * 1.0)
+ * @param psz_cancel text of the cancel button, if NULL the dialog is not
+ * cancellable
+ */
+ void (*pf_display_progress)(void *p_data, libvlc_dialog_id *p_id,
+ const char *psz_title, const char *psz_text,
+ bool b_indeterminate, float f_position,
+ const char *psz_cancel);
+
+ /**
+ * Called when a displayed dialog needs to be cancelled
+ *
+ * The implementation must call libvlc_dialog_dismiss() to really release
+ * the dialog.
+ *
+ * @param p_data opaque pointer for the callback
+ * @param p_id id of the dialog
+ */
+ void (*pf_cancel)(void *p_data, libvlc_dialog_id *p_id);
+
+ /**
+ * Called when a progress dialog needs to be updated
+ *
+ * @param p_data opaque pointer for the callback
+ * @param p_id id of the dialog
+ * @param f_position osition of the progress bar (between 0.0 and 1.0)
+ * @param psz_text new text of the progress dialog
+ */
+ void (*pf_update_progress)(void *p_data, libvlc_dialog_id *p_id,
+ float f_position, const char *psz_text);
+} libvlc_dialog_cbs;
+
+
+/**
+ * Called when an error message needs to be displayed
+ *
+ * @param p_data opaque pointer for the callback
+ * @param psz_title title of the dialog
+ * @param psz_text text of the dialog
+ */
+typedef void (*libvlc_dialog_error_cbs)(void *p_data, const char *psz_title, const char *psz_text);
+
+/**
+ * Register callbacks in order to handle VLC dialogs
+ *
+ * @version LibVLC 3.0.0 and later.
+ *
+ * @param p_instance the libvlc instance to attach the dialog callbacks to
+ * @param p_cbs a pointer to callbacks, or NULL to unregister callbacks.
+ * @param p_data opaque pointer for the callback
+ */
+LIBVLC_API void
+libvlc_dialog_set_callbacks(libvlc_instance_t *p_instance,
+ const libvlc_dialog_cbs *p_cbs, void *p_data);
+
+/*
+* Register callback in order to handle VLC error messages
+*
+* @version LibVLC 4.0.0 and later.
+*
+* @param p_cbs a pointer to callback, or NULL to unregister callback.
+* @param p_data opaque pointer for the callback
+*/
+LIBVLC_API void
+libvlc_dialog_set_error_callback(libvlc_instance_t *p_instance,
+ libvlc_dialog_error_cbs p_cbs, void *p_data);
+
+/**
+ * Associate an opaque pointer with the dialog id
+ *
+ * @version LibVLC 3.0.0 and later.
+ */
+LIBVLC_API void
+libvlc_dialog_set_context(libvlc_dialog_id *p_id, void *p_context);
+
+/**
+ * Return the opaque pointer associated with the dialog id
+ * \see libvlc_dialog_set_context
+ * @version LibVLC 3.0.0 and later.
+ */
+LIBVLC_API void *
+libvlc_dialog_get_context(libvlc_dialog_id *p_id);
+
+/**
+ * Post a login answer
+ *
+ * After this call, p_id won't be valid anymore
+ *
+ * @see libvlc_dialog_cbs.pf_display_login
+ *
+ * @version LibVLC 3.0.0 and later.
+ *
+ * @param p_id id of the dialog
+ * @param psz_username valid and non empty string
+ * @param psz_password valid string (can be empty)
+ * @param b_store if true, store the credentials
+ * @return 0 on success, or -1 on error
+ */
+LIBVLC_API int
+libvlc_dialog_post_login(libvlc_dialog_id *p_id, const char *psz_username,
+ const char *psz_password, bool b_store);
+
+/**
+ * Post a question answer
+ *
+ * After this call, p_id won't be valid anymore
+ *
+ * @see libvlc_dialog_cbs.pf_display_question
+ *
+ * @version LibVLC 3.0.0 and later.
+ *
+ * @param p_id id of the dialog
+ * @param i_action 1 for action1, 2 for action2
+ * @return 0 on success, or -1 on error
+ */
+LIBVLC_API int
+libvlc_dialog_post_action(libvlc_dialog_id *p_id, int i_action);
+
+/**
+ * Dismiss a dialog
+ *
+ * After this call, p_id won't be valid anymore
+ *
+ * @see libvlc_dialog_cbs.pf_cancel
+ *
+ * @version LibVLC 3.0.0 and later.
+ *
+ * @param p_id id of the dialog
+ * @return 0 on success, or -1 on error
+ */
+LIBVLC_API int
+libvlc_dialog_dismiss(libvlc_dialog_id *p_id);
+
+/** @} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* LIBVLC_DIALOG_H */
diff --git a/Libs/vlc/libvlc_events.h b/Libs/vlc/libvlc_events.h
new file mode 100644
index 000000000..3e4de7e46
--- /dev/null
+++ b/Libs/vlc/libvlc_events.h
@@ -0,0 +1,457 @@
+/*****************************************************************************
+ * libvlc_events.h: libvlc_events external API structure
+ *****************************************************************************
+ * Copyright (C) 1998-2010 VLC authors and VideoLAN
+ *
+ * Authors: Filippo Carone
+ * Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef LIBVLC_EVENTS_H
+#define LIBVLC_EVENTS_H 1
+
+# include
+# include
+# include
+# include
+
+/**
+ * \file
+ * This file defines libvlc_event external API
+ */
+
+# ifdef __cplusplus
+extern "C" {
+# else
+# include
+# endif
+
+typedef struct libvlc_renderer_item_t libvlc_renderer_item_t;
+typedef struct libvlc_title_description_t libvlc_title_description_t;
+typedef struct libvlc_picture_t libvlc_picture_t;
+typedef struct libvlc_picture_list_t libvlc_picture_list_t;
+typedef struct libvlc_media_t libvlc_media_t;
+typedef struct libvlc_media_list_t libvlc_media_list_t;
+
+/**
+ * \ingroup libvlc_event
+ * @{
+ */
+
+/**
+ * Event types
+ */
+enum libvlc_event_e {
+ /* Append new event types at the end of a category.
+ * Do not remove, insert or re-order any entry.
+ */
+
+ /**
+ * 1 or several Metadata of a \link #libvlc_media_t media item\endlink changed
+ */
+ libvlc_MediaMetaChanged=0,
+ /**
+ * Subitem was added to a \link #libvlc_media_t media item\endlink
+ * \see libvlc_media_subitems()
+ */
+ libvlc_MediaSubItemAdded,
+ /**
+ * Deprecated, use libvlc_MediaParsedChanged or libvlc_MediaPlayerLengthChanged.
+ */
+ libvlc_MediaDurationChanged,
+ /**
+ * Parsing state of a \link #libvlc_media_t media item\endlink changed
+ * \see libvlc_media_parse_request(),
+ * libvlc_media_get_parsed_status(),
+ * libvlc_media_parse_stop()
+ */
+ libvlc_MediaParsedChanged,
+
+ /* Removed: libvlc_MediaFreed, */
+ /* Removed: libvlc_MediaStateChanged */
+
+ /**
+ * Subitem tree was added to a \link #libvlc_media_t media item\endlink
+ */
+ libvlc_MediaSubItemTreeAdded = libvlc_MediaParsedChanged + 3,
+ /**
+ * A thumbnail generation for this \link #libvlc_media_t media \endlink completed.
+ * \see libvlc_media_thumbnail_request_by_time()
+ * \see libvlc_media_thumbnail_request_by_pos()
+ */
+ libvlc_MediaThumbnailGenerated,
+ /**
+ * One or more embedded thumbnails were found during the media preparsing
+ * The user can hold these picture(s) using libvlc_picture_retain if they
+ * wish to use them
+ */
+ libvlc_MediaAttachedThumbnailsFound,
+
+ libvlc_MediaPlayerMediaChanged=0x100,
+ libvlc_MediaPlayerNothingSpecial,
+ libvlc_MediaPlayerOpening,
+ libvlc_MediaPlayerBuffering,
+ libvlc_MediaPlayerPlaying,
+ libvlc_MediaPlayerPaused,
+ libvlc_MediaPlayerStopped,
+ libvlc_MediaPlayerForward,
+ libvlc_MediaPlayerBackward,
+ libvlc_MediaPlayerStopping,
+ libvlc_MediaPlayerEncounteredError,
+ libvlc_MediaPlayerTimeChanged,
+ libvlc_MediaPlayerPositionChanged,
+ libvlc_MediaPlayerSeekableChanged,
+ libvlc_MediaPlayerPausableChanged,
+ /* libvlc_MediaPlayerTitleChanged, */
+ libvlc_MediaPlayerSnapshotTaken = libvlc_MediaPlayerPausableChanged + 2,
+ libvlc_MediaPlayerLengthChanged,
+ libvlc_MediaPlayerVout,
+
+ /* libvlc_MediaPlayerScrambledChanged, use libvlc_MediaPlayerProgramUpdated */
+
+ /** A track was added, cf. media_player_es_changed in \ref libvlc_event_t.u
+ * to get the id of the new track. */
+ libvlc_MediaPlayerESAdded = libvlc_MediaPlayerVout + 2,
+ /** A track was removed, cf. media_player_es_changed in \ref
+ * libvlc_event_t.u to get the id of the removed track. */
+ libvlc_MediaPlayerESDeleted,
+ /** Tracks were selected or unselected, cf.
+ * media_player_es_selection_changed in \ref libvlc_event_t.u to get the
+ * unselected and/or the selected track ids. */
+ libvlc_MediaPlayerESSelected,
+ libvlc_MediaPlayerCorked,
+ libvlc_MediaPlayerUncorked,
+ libvlc_MediaPlayerMuted,
+ libvlc_MediaPlayerUnmuted,
+ libvlc_MediaPlayerAudioVolume,
+ libvlc_MediaPlayerAudioDevice,
+ /** A track was updated, cf. media_player_es_changed in \ref
+ * libvlc_event_t.u to get the id of the updated track. */
+ libvlc_MediaPlayerESUpdated,
+ libvlc_MediaPlayerProgramAdded,
+ libvlc_MediaPlayerProgramDeleted,
+ libvlc_MediaPlayerProgramSelected,
+ libvlc_MediaPlayerProgramUpdated,
+ /**
+ * The title list changed, call
+ * libvlc_media_player_get_full_title_descriptions() to get the new list.
+ */
+ libvlc_MediaPlayerTitleListChanged,
+ /**
+ * The title selection changed, cf media_player_title_selection_changed in
+ * \ref libvlc_event_t.u
+ */
+ libvlc_MediaPlayerTitleSelectionChanged,
+ libvlc_MediaPlayerChapterChanged,
+ libvlc_MediaPlayerRecordChanged,
+
+ /**
+ * A \link #libvlc_media_t media item\endlink was added to a
+ * \link #libvlc_media_list_t media list\endlink.
+ */
+ libvlc_MediaListItemAdded=0x200,
+ /**
+ * A \link #libvlc_media_t media item\endlink is about to get
+ * added to a \link #libvlc_media_list_t media list\endlink.
+ */
+ libvlc_MediaListWillAddItem,
+ /**
+ * A \link #libvlc_media_t media item\endlink was deleted from
+ * a \link #libvlc_media_list_t media list\endlink.
+ */
+ libvlc_MediaListItemDeleted,
+ /**
+ * A \link #libvlc_media_t media item\endlink is about to get
+ * deleted from a \link #libvlc_media_list_t media list\endlink.
+ */
+ libvlc_MediaListWillDeleteItem,
+ /**
+ * A \link #libvlc_media_list_t media list\endlink has reached the
+ * end.
+ * All \link #libvlc_media_t items\endlink were either added (in
+ * case of a \ref libvlc_media_discoverer_t) or parsed (preparser).
+ */
+ libvlc_MediaListEndReached,
+
+ /**
+ * \deprecated No longer used.
+ * This belonged to the removed libvlc_media_list_view_t
+ */
+ libvlc_MediaListViewItemAdded LIBVLC_DEPRECATED =0x300,
+ /**
+ * \deprecated No longer used.
+ * This belonged to the removed libvlc_media_list_view_t
+ */
+ libvlc_MediaListViewWillAddItem LIBVLC_DEPRECATED,
+ /**
+ * \deprecated No longer used.
+ * This belonged to the removed libvlc_media_list_view_t
+ */
+ libvlc_MediaListViewItemDeleted LIBVLC_DEPRECATED,
+ /**
+ * \deprecated No longer used.
+ * This belonged to the removed libvlc_media_list_view_t
+ */
+ libvlc_MediaListViewWillDeleteItem LIBVLC_DEPRECATED,
+
+ /**
+ * Playback of a \link #libvlc_media_list_player_t media list
+ * player\endlink has started.
+ */
+ libvlc_MediaListPlayerPlayed=0x400,
+
+ /**
+ * The current \link #libvlc_media_t item\endlink of a
+ * \link #libvlc_media_list_player_t media list player\endlink
+ * has changed to a different item.
+ */
+ libvlc_MediaListPlayerNextItemSet,
+
+ /**
+ * Playback of a \link #libvlc_media_list_player_t media list
+ * player\endlink has stopped.
+ */
+ libvlc_MediaListPlayerStopped,
+
+ /**
+ * A new \link #libvlc_renderer_item_t renderer item\endlink was found by a
+ * \link #libvlc_renderer_discoverer_t renderer discoverer\endlink.
+ * The renderer item is valid until deleted.
+ */
+ libvlc_RendererDiscovererItemAdded=0x502,
+
+ /**
+ * A previously discovered \link #libvlc_renderer_item_t renderer item\endlink
+ * was deleted by a \link #libvlc_renderer_discoverer_t renderer discoverer\endlink.
+ * The renderer item is no longer valid.
+ */
+ libvlc_RendererDiscovererItemDeleted,
+
+ /**
+ * The current media set into the \ref libvlc_media_player_t is stopping.
+ *
+ * This event can be used to notify when the media callbacks, initialized
+ * from \ref libvlc_media_new_callbacks, should be interrupted, and in
+ * particular the \ref libvlc_media_read_cb. It can also be used to signal
+ * the application state that any input resource (webserver, file mounting,
+ * etc) can be discarded. Output resources still need to be active until
+ * the player switches to the \ref libvlc_Stopped state.
+ */
+ libvlc_MediaPlayerMediaStopping,
+};
+
+/**
+ * A LibVLC event
+ */
+typedef struct libvlc_event_t
+{
+ int type; /**< Event type (see @ref libvlc_event_e) */
+ void *p_obj; /**< Object emitting the event */
+ union
+ {
+ /* media descriptor */
+ struct
+ {
+ libvlc_meta_t meta_type; /**< Deprecated, any meta_type can change */
+ } media_meta_changed;
+ struct
+ {
+ libvlc_media_t * new_child;
+ } media_subitem_added;
+ struct
+ {
+ int64_t new_duration;
+ } media_duration_changed;
+ struct
+ {
+ int new_status; /**< see @ref libvlc_media_parsed_status_t */
+ } media_parsed_changed;
+ struct
+ {
+ int new_state; /**< see @ref libvlc_state_t */
+ } media_state_changed;
+ struct
+ {
+ libvlc_picture_t* p_thumbnail;
+ } media_thumbnail_generated;
+ struct
+ {
+ libvlc_media_t * item;
+ } media_subitemtree_added;
+ struct
+ {
+ libvlc_picture_list_t* thumbnails;
+ } media_attached_thumbnails_found;
+
+ /* media instance */
+ struct
+ {
+ float new_cache;
+ } media_player_buffering;
+ struct
+ {
+ int new_chapter;
+ } media_player_chapter_changed;
+ struct
+ {
+ double new_position;
+ } media_player_position_changed;
+ struct
+ {
+ libvlc_time_t new_time;
+ } media_player_time_changed;
+ struct
+ {
+ const libvlc_title_description_t *title;
+ int index;
+ } media_player_title_selection_changed;
+ struct
+ {
+ int new_seekable;
+ } media_player_seekable_changed;
+ struct
+ {
+ int new_pausable;
+ } media_player_pausable_changed;
+ struct
+ {
+ int new_scrambled;
+ } media_player_scrambled_changed;
+ struct
+ {
+ int new_count;
+ } media_player_vout;
+
+ /* media list */
+ struct
+ {
+ libvlc_media_t * item;
+ int index;
+ } media_list_item_added;
+ struct
+ {
+ libvlc_media_t * item;
+ int index;
+ } media_list_will_add_item;
+ struct
+ {
+ libvlc_media_t * item;
+ int index;
+ } media_list_item_deleted;
+ struct
+ {
+ libvlc_media_t * item;
+ int index;
+ } media_list_will_delete_item;
+
+ /* media list player */
+ struct
+ {
+ libvlc_media_t * item;
+ } media_list_player_next_item_set;
+
+ /* snapshot taken */
+ struct
+ {
+ char* psz_filename ;
+ } media_player_snapshot_taken ;
+
+ /* Length changed */
+ struct
+ {
+ libvlc_time_t new_length;
+ } media_player_length_changed;
+
+ /* Extra MediaPlayer */
+ struct
+ {
+ libvlc_media_t * new_media;
+ } media_player_media_changed;
+
+ struct
+ {
+ libvlc_media_t * media;
+ } media_player_media_stopping;
+
+
+ /* ESAdded, ESDeleted, ESUpdated */
+ struct
+ {
+ libvlc_track_type_t i_type;
+ int i_id; /**< Deprecated, use psz_id */
+ /** Call libvlc_media_player_get_track_from_id() to get the track
+ * description. */
+ const char *psz_id;
+ } media_player_es_changed;
+
+ /* ESSelected */
+ struct
+ {
+ libvlc_track_type_t i_type;
+ const char *psz_unselected_id;
+ const char *psz_selected_id;
+ } media_player_es_selection_changed;
+
+ /* ProgramAdded, ProgramDeleted, ProgramUpdated */
+ struct
+ {
+ int i_id;
+ } media_player_program_changed;
+
+ /* ProgramSelected */
+ struct
+ {
+ int i_unselected_id;
+ int i_selected_id;
+ } media_player_program_selection_changed;
+
+ struct
+ {
+ float volume;
+ } media_player_audio_volume;
+
+ struct
+ {
+ const char *device;
+ } media_player_audio_device;
+
+ struct
+ {
+ bool recording;
+ /** Only valid when recording ends (recording == false) */
+ const char *recorded_file_path;
+ } media_player_record_changed;
+
+ struct
+ {
+ libvlc_renderer_item_t *item;
+ } renderer_discoverer_item_added;
+ struct
+ {
+ libvlc_renderer_item_t *item;
+ } renderer_discoverer_item_deleted;
+ } u; /**< Type-dependent event description */
+} libvlc_event_t;
+
+
+/**@} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* _LIBVLC_EVENTS_H */
diff --git a/Libs/vlc/libvlc_media.h b/Libs/vlc/libvlc_media.h
new file mode 100644
index 000000000..05ae45639
--- /dev/null
+++ b/Libs/vlc/libvlc_media.h
@@ -0,0 +1,917 @@
+/*****************************************************************************
+ * libvlc_media.h: libvlc external API
+ *****************************************************************************
+ * Copyright (C) 1998-2009 VLC authors and VideoLAN
+ *
+ * Authors: Clément Stenac
+ * Jean-Paul Saman
+ * Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_LIBVLC_MEDIA_H
+#define VLC_LIBVLC_MEDIA_H 1
+
+#include
+#include
+
+# ifdef __cplusplus
+extern "C" {
+# else
+# include
+# endif
+#include
+
+/** \defgroup libvlc_media LibVLC media
+ * \ingroup libvlc
+ * @ref libvlc_media_t is an abstract representation of a playable media.
+ * It consists of a media location and various optional meta data.
+ * @{
+ * \file
+ * LibVLC media item/descriptor external API
+ */
+
+typedef struct libvlc_media_t libvlc_media_t;
+
+/** Meta data types */
+typedef enum libvlc_meta_t {
+ libvlc_meta_Title,
+ libvlc_meta_Artist,
+ libvlc_meta_Genre,
+ libvlc_meta_Copyright,
+ libvlc_meta_Album,
+ libvlc_meta_TrackNumber,
+ libvlc_meta_Description,
+ libvlc_meta_Rating,
+ libvlc_meta_Date,
+ libvlc_meta_Setting,
+ libvlc_meta_URL,
+ libvlc_meta_Language,
+ libvlc_meta_NowPlaying,
+ libvlc_meta_Publisher,
+ libvlc_meta_EncodedBy,
+ libvlc_meta_ArtworkURL,
+ libvlc_meta_TrackID,
+ libvlc_meta_TrackTotal,
+ libvlc_meta_Director,
+ libvlc_meta_Season,
+ libvlc_meta_Episode,
+ libvlc_meta_ShowName,
+ libvlc_meta_Actors,
+ libvlc_meta_AlbumArtist,
+ libvlc_meta_DiscNumber,
+ libvlc_meta_DiscTotal
+ /* Add new meta types HERE */
+} libvlc_meta_t;
+
+/**
+ * libvlc media or media_player state
+ */
+typedef enum libvlc_state_t
+{
+ libvlc_NothingSpecial=0,
+ libvlc_Opening,
+ libvlc_Buffering, /* XXX: Deprecated value. Check the
+ * libvlc_MediaPlayerBuffering event to know the
+ * buffering state of a libvlc_media_player */
+ libvlc_Playing,
+ libvlc_Paused,
+ libvlc_Stopped,
+ libvlc_Stopping,
+ libvlc_Error
+} libvlc_state_t;
+
+enum
+{
+ libvlc_media_option_trusted = 0x2,
+ libvlc_media_option_unique = 0x100
+};
+
+typedef struct libvlc_media_stats_t
+{
+ /* Input */
+ uint64_t i_read_bytes;
+ float f_input_bitrate;
+
+ /* Demux */
+ uint64_t i_demux_read_bytes;
+ float f_demux_bitrate;
+ uint64_t i_demux_corrupted;
+ uint64_t i_demux_discontinuity;
+
+ /* Decoders */
+ uint64_t i_decoded_video;
+ uint64_t i_decoded_audio;
+
+ /* Video Output */
+ uint64_t i_displayed_pictures;
+ uint64_t i_late_pictures;
+ uint64_t i_lost_pictures;
+
+ /* Audio output */
+ uint64_t i_played_abuffers;
+ uint64_t i_lost_abuffers;
+} libvlc_media_stats_t;
+
+/**
+ * Media type
+ *
+ * \see libvlc_media_get_type
+ */
+typedef enum libvlc_media_type_t {
+ libvlc_media_type_unknown,
+ libvlc_media_type_file,
+ libvlc_media_type_directory,
+ libvlc_media_type_disc,
+ libvlc_media_type_stream,
+ libvlc_media_type_playlist,
+} libvlc_media_type_t;
+
+/**
+ * Parse flags used by libvlc_media_parse_request()
+ */
+typedef enum libvlc_media_parse_flag_t
+{
+ /**
+ * Parse media if it's a local file
+ */
+ libvlc_media_parse_local = 0x01,
+ /**
+ * Parse media even if it's a network file
+ */
+ libvlc_media_parse_network = 0x02,
+ /**
+ * Force parsing the media even if it would be skipped.
+ */
+ libvlc_media_parse_forced = 0x04,
+ /**
+ * Fetch meta and cover art using local resources
+ */
+ libvlc_media_fetch_local = 0x08,
+ /**
+ * Fetch meta and cover art using network resources
+ */
+ libvlc_media_fetch_network = 0x10,
+ /**
+ * Interact with the user (via libvlc_dialog_cbs) when preparsing this item
+ * (and not its sub items). Set this flag in order to receive a callback
+ * when the input is asking for credentials.
+ */
+ libvlc_media_do_interact = 0x20,
+} libvlc_media_parse_flag_t;
+
+/**
+ * Parse status used sent by libvlc_media_parse_request() or returned by
+ * libvlc_media_get_parsed_status()
+ */
+typedef enum libvlc_media_parsed_status_t
+{
+ libvlc_media_parsed_status_none,
+ libvlc_media_parsed_status_pending,
+ libvlc_media_parsed_status_skipped,
+ libvlc_media_parsed_status_failed,
+ libvlc_media_parsed_status_timeout,
+ libvlc_media_parsed_status_cancelled,
+ libvlc_media_parsed_status_done,
+} libvlc_media_parsed_status_t;
+
+/**
+ * Type of a media slave: subtitle or audio.
+ */
+typedef enum libvlc_media_slave_type_t
+{
+ libvlc_media_slave_type_subtitle,
+ libvlc_media_slave_type_generic,
+ libvlc_media_slave_type_audio = libvlc_media_slave_type_generic,
+} libvlc_media_slave_type_t;
+
+/**
+ * A slave of a libvlc_media_t
+ * \see libvlc_media_slaves_get
+ */
+typedef struct libvlc_media_slave_t
+{
+ char * psz_uri;
+ libvlc_media_slave_type_t i_type;
+ unsigned int i_priority;
+} libvlc_media_slave_t;
+
+/**
+ * Type of stat that can be requested from libvlc_media_get_filestat()
+ */
+#define libvlc_media_filestat_mtime 0
+#define libvlc_media_filestat_size 1
+
+/**
+ * Callback prototype to open a custom bitstream input media.
+ *
+ * The same media item can be opened multiple times. Each time, this callback
+ * is invoked. It should allocate and initialize any instance-specific
+ * resources, then store them in *datap. The instance resources can be freed
+ * in the @ref libvlc_media_close_cb callback.
+ *
+ * \param opaque private pointer as passed to libvlc_media_new_callbacks()
+ * \param datap storage space for a private data pointer [OUT]
+ * \param sizep byte length of the bitstream or UINT64_MAX if unknown [OUT]
+ *
+ * \note For convenience, *datap is initially NULL and *sizep is initially 0.
+ *
+ * \return 0 on success, non-zero on error. In case of failure, the other
+ * callbacks will not be invoked and any value stored in *datap and *sizep is
+ * discarded.
+ */
+typedef int (*libvlc_media_open_cb)(void *opaque, void **datap,
+ uint64_t *sizep);
+
+/**
+ * Callback prototype to read data from a custom bitstream input media.
+ *
+ * \param opaque private pointer as set by the @ref libvlc_media_open_cb
+ * callback
+ * \param buf start address of the buffer to read data into
+ * \param len bytes length of the buffer
+ *
+ * \return strictly positive number of bytes read, 0 on end-of-stream,
+ * or -1 on non-recoverable error
+ *
+ * \note If no data is immediately available, then the callback should sleep.
+ * \warning The application is responsible for avoiding deadlock situations.
+ */
+typedef ptrdiff_t (*libvlc_media_read_cb)(void *opaque, unsigned char *buf,
+ size_t len);
+
+/**
+ * Callback prototype to seek a custom bitstream input media.
+ *
+ * \param opaque private pointer as set by the @ref libvlc_media_open_cb
+ * callback
+ * \param offset absolute byte offset to seek to
+ * \return 0 on success, -1 on error.
+ */
+typedef int (*libvlc_media_seek_cb)(void *opaque, uint64_t offset);
+
+/**
+ * Callback prototype to close a custom bitstream input media.
+ *
+ * \param opaque private pointer as set by the @ref libvlc_media_open_cb
+ * callback
+ */
+typedef void (*libvlc_media_close_cb)(void *opaque);
+
+/**
+ * Create a media with a certain given media resource location,
+ * for instance a valid URL.
+ *
+ * \note To refer to a local file with this function,
+ * the file://... URI syntax must be used (see IETF RFC3986).
+ * We recommend using libvlc_media_new_path() instead when dealing with
+ * local files.
+ *
+ * \see libvlc_media_release
+ *
+ * \param psz_mrl the media location
+ * \return the newly created media or NULL on error
+ */
+LIBVLC_API libvlc_media_t *libvlc_media_new_location(const char * psz_mrl);
+
+/**
+ * Create a media for a certain file path.
+ *
+ * \see libvlc_media_release
+ *
+ * \param path local filesystem path
+ * \return the newly created media or NULL on error
+ */
+LIBVLC_API libvlc_media_t *libvlc_media_new_path(const char *path);
+
+/**
+ * Create a media for an already open file descriptor.
+ * The file descriptor shall be open for reading (or reading and writing).
+ *
+ * Regular file descriptors, pipe read descriptors and character device
+ * descriptors (including TTYs) are supported on all platforms.
+ * Block device descriptors are supported where available.
+ * Directory descriptors are supported on systems that provide fdopendir().
+ * Sockets are supported on all platforms where they are file descriptors,
+ * i.e. all except Windows.
+ *
+ * \note This library will not automatically close the file descriptor
+ * under any circumstance. Nevertheless, a file descriptor can usually only be
+ * rendered once in a media player. To render it a second time, the file
+ * descriptor should probably be rewound to the beginning with lseek().
+ *
+ * \see libvlc_media_release
+ *
+ * \version LibVLC 1.1.5 and later.
+ *
+ * \param fd open file descriptor
+ * \return the newly created media or NULL on error
+ */
+LIBVLC_API libvlc_media_t *libvlc_media_new_fd(int fd);
+
+/**
+ * Create a media with custom callbacks to read the data from.
+ *
+ * \param open_cb callback to open the custom bitstream input media
+ * \param read_cb callback to read data (must not be NULL)
+ * \param seek_cb callback to seek, or NULL if seeking is not supported
+ * \param close_cb callback to close the media, or NULL if unnecessary
+ * \param opaque data pointer for the open callback
+ *
+ * \return the newly created media or NULL on error
+ *
+ * \note If open_cb is NULL, the opaque pointer will be passed to read_cb,
+ * seek_cb and close_cb, and the stream size will be treated as unknown.
+ *
+ * \note The callbacks may be called asynchronously (from another thread).
+ * A single stream instance need not be reentrant. However the open_cb needs to
+ * be reentrant if the media is used by multiple player instances.
+ *
+ * \warning The callbacks may be used until all or any player instances
+ * that were supplied the media item are stopped.
+ *
+ * \see libvlc_media_release
+ *
+ * \version LibVLC 3.0.0 and later.
+ */
+LIBVLC_API libvlc_media_t *libvlc_media_new_callbacks(
+ libvlc_media_open_cb open_cb,
+ libvlc_media_read_cb read_cb,
+ libvlc_media_seek_cb seek_cb,
+ libvlc_media_close_cb close_cb,
+ void *opaque );
+
+/**
+ * Create a media as an empty node with a given name.
+ *
+ * \see libvlc_media_release
+ *
+ * \param psz_name the name of the node
+ * \return the new empty media or NULL on error
+ */
+LIBVLC_API libvlc_media_t *libvlc_media_new_as_node(const char * psz_name);
+
+/**
+ * Add an option to the media.
+ *
+ * This option will be used to determine how the media_player will
+ * read the media. This allows to use VLC's advanced
+ * reading/streaming options on a per-media basis.
+ *
+ * \note The options are listed in 'vlc --longhelp' from the command line,
+ * e.g. "--sout-all". Keep in mind that available options and their semantics
+ * vary across LibVLC versions and builds.
+ * \warning Not all options affects libvlc_media_t objects:
+ * Specifically, due to architectural issues most audio and video options,
+ * such as text renderer options, have no effects on an individual media.
+ * These options must be set through libvlc_new() instead.
+ *
+ * \param p_md the media descriptor
+ * \param psz_options the options (as a string)
+ */
+LIBVLC_API void libvlc_media_add_option(
+ libvlc_media_t *p_md,
+ const char * psz_options );
+
+/**
+ * Add an option to the media with configurable flags.
+ *
+ * This option will be used to determine how the media_player will
+ * read the media. This allows to use VLC's advanced
+ * reading/streaming options on a per-media basis.
+ *
+ * The options are detailed in vlc --longhelp, for instance
+ * "--sout-all". Note that all options are not usable on medias:
+ * specifically, due to architectural issues, video-related options
+ * such as text renderer options cannot be set on a single media. They
+ * must be set on the whole libvlc instance instead.
+ *
+ * \param p_md the media descriptor
+ * \param psz_options the options (as a string)
+ * \param i_flags the flags for this option
+ */
+LIBVLC_API void libvlc_media_add_option_flag(
+ libvlc_media_t *p_md,
+ const char * psz_options,
+ unsigned i_flags );
+
+
+/**
+ * Retain a reference to a media descriptor object (libvlc_media_t). Use
+ * libvlc_media_release() to decrement the reference count of a
+ * media descriptor object.
+ *
+ * \param p_md the media descriptor
+ * \return the same object
+ */
+LIBVLC_API libvlc_media_t *libvlc_media_retain( libvlc_media_t *p_md );
+
+/**
+ * Decrement the reference count of a media descriptor object. If the
+ * reference count is 0, then libvlc_media_release() will release the
+ * media descriptor object. If the media descriptor object has been released it
+ * should not be used again.
+ *
+ * \param p_md the media descriptor
+ */
+LIBVLC_API void libvlc_media_release( libvlc_media_t *p_md );
+
+
+/**
+ * Get the media resource locator (mrl) from a media descriptor object
+ *
+ * \param p_md a media descriptor object
+ * \return string with mrl of media descriptor object
+ */
+LIBVLC_API char *libvlc_media_get_mrl( libvlc_media_t *p_md );
+
+/**
+ * Duplicate a media descriptor object.
+ *
+ * \warning the duplicated media won't share forthcoming updates from the
+ * original one.
+ *
+ * \param p_md a media descriptor object.
+ */
+LIBVLC_API libvlc_media_t *libvlc_media_duplicate( libvlc_media_t *p_md );
+
+/**
+ * Read the meta of the media.
+ *
+ * Note, you need to call libvlc_media_parse_request() or play the media
+ * at least once before calling this function.
+ * If the media has not yet been parsed this will return NULL.
+ *
+ * \see libvlc_MediaMetaChanged
+ *
+ * \param p_md the media descriptor
+ * \param e_meta the meta to read
+ * \return the media's meta
+ */
+LIBVLC_API char *libvlc_media_get_meta( libvlc_media_t *p_md,
+ libvlc_meta_t e_meta );
+
+/**
+ * Set the meta of the media (this function will not save the meta, call
+ * libvlc_media_save_meta in order to save the meta)
+ *
+ * \param p_md the media descriptor
+ * \param e_meta the meta to write
+ * \param psz_value the media's meta
+ */
+LIBVLC_API void libvlc_media_set_meta( libvlc_media_t *p_md,
+ libvlc_meta_t e_meta,
+ const char *psz_value );
+
+/**
+ * Read the meta extra of the media.
+ *
+ * If the media has not yet been parsed this will return NULL.
+ *
+ * \see libvlc_media_parse
+ * \see libvlc_media_parse_with_options
+ *
+ * \param p_md the media descriptor
+ * \param psz_name the meta extra to read (nonnullable)
+ * \return the media's meta extra or NULL
+ */
+LIBVLC_API char *libvlc_media_get_meta_extra( libvlc_media_t *p_md,
+ const char *psz_name );
+
+/**
+ * Set the meta of the media (this function will not save the meta, call
+ * libvlc_media_save_meta in order to save the meta)
+ *
+ * \param p_md the media descriptor
+ * \param psz_name the meta extra to write (nonnullable)
+ * \param psz_value the media's meta extra (nullable)
+ * Removed from meta extra if set to NULL
+ */
+LIBVLC_API void libvlc_media_set_meta_extra( libvlc_media_t *p_md,
+ const char *psz_name,
+ const char *psz_value );
+
+/**
+ * Read the meta extra names of the media.
+ *
+ * \param p_md the media descriptor
+ * \param pppsz_names the media's meta extra name array
+ * you can access the elements using the return value (count)
+ * must be released with libvlc_media_meta_extra_names_release()
+ * \return the meta extra count
+ */
+LIBVLC_API unsigned libvlc_media_get_meta_extra_names( libvlc_media_t *p_md,
+ char ***pppsz_names );
+
+/**
+ * Release a media meta extra names
+ *
+ * \param ppsz_names meta extra names array to release
+ * \param i_count number of elements in the array
+ */
+LIBVLC_API void libvlc_media_meta_extra_names_release( char **ppsz_names,
+ unsigned i_count );
+
+/**
+ * Save the meta previously set
+ *
+ * \param inst LibVLC instance
+ * \param p_md the media descriptor
+ * \return true if the write operation was successful
+ */
+LIBVLC_API int libvlc_media_save_meta( libvlc_instance_t *inst,
+ libvlc_media_t *p_md );
+
+/**
+ * Get the current statistics about the media
+ * \param p_md media descriptor object
+ * \param p_stats structure that contain the statistics about the media
+ * (this structure must be allocated by the caller)
+ * \retval true statistics are available
+ * \retval false otherwise
+ */
+LIBVLC_API bool libvlc_media_get_stats(libvlc_media_t *p_md,
+ libvlc_media_stats_t *p_stats);
+
+/* The following method uses libvlc_media_list_t, however, media_list usage is optional
+ * and this is here for convenience */
+#define VLC_FORWARD_DECLARE_OBJECT(a) struct a
+
+/**
+ * Get subitems of media descriptor object. This will increment
+ * the reference count of supplied media descriptor object. Use
+ * libvlc_media_list_release() to decrement the reference counting.
+ *
+ * \param p_md media descriptor object
+ * \return list of media descriptor subitems or NULL
+ */
+LIBVLC_API VLC_FORWARD_DECLARE_OBJECT(libvlc_media_list_t *)
+libvlc_media_subitems( libvlc_media_t *p_md );
+
+/**
+ * Get event manager from media descriptor object.
+ * NOTE: this function doesn't increment reference counting.
+ *
+ * \param p_md a media descriptor object
+ * \return event manager object
+ */
+LIBVLC_API libvlc_event_manager_t *
+ libvlc_media_event_manager( libvlc_media_t *p_md );
+
+/**
+ * Get duration (in ms) of media descriptor object item.
+ *
+ * Note, you need to call libvlc_media_parse_request() or play the media
+ * at least once before calling this function.
+ * Not doing this will result in an undefined result.
+ *
+ * \param p_md media descriptor object
+ * \return duration of media item or -1 on error
+ */
+LIBVLC_API libvlc_time_t
+ libvlc_media_get_duration( libvlc_media_t *p_md );
+
+/**
+ * Get a 'stat' value of media descriptor object item.
+ *
+ * \note 'stat' values are currently only parsed by directory accesses. This
+ * mean that only sub medias of a directory media, parsed with
+ * libvlc_media_parse_request() can have valid 'stat' properties.
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param p_md media descriptor object
+ * \param type a valid libvlc_media_stat_ define
+ * \param out field in which the value will be stored
+ * \return 1 on success, 0 if not found, -1 on error.
+ */
+LIBVLC_API int
+ libvlc_media_get_filestat( libvlc_media_t *p_md, unsigned type, uint64_t *out );
+
+/**
+ * Parse the media asynchronously with options.
+ *
+ * This fetches (local or network) art, meta data and/or tracks information.
+ *
+ * To track when this is over you can listen to libvlc_MediaParsedChanged
+ * event. However if this functions returns an error, you will not receive any
+ * events.
+ *
+ * It uses a flag to specify parse options (see libvlc_media_parse_flag_t). All
+ * these flags can be combined. By default, media is parsed if it's a local
+ * file.
+ *
+ * \note Parsing can be aborted with libvlc_media_parse_stop().
+ *
+ * \see libvlc_MediaParsedChanged
+ * \see libvlc_media_get_meta
+ * \see libvlc_media_get_tracklist
+ * \see libvlc_media_get_parsed_status
+ * \see libvlc_media_parse_flag_t
+ *
+ * \param inst LibVLC instance that is to parse the media
+ * \param p_md media descriptor object
+ * \param parse_flag parse options:
+ * \param timeout maximum time allowed to preparse the media. If -1, the
+ * default "preparse-timeout" option will be used as a timeout. If 0, it will
+ * wait indefinitely. If > 0, the timeout will be used (in milliseconds).
+ * \return -1 in case of error, 0 otherwise
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API int
+libvlc_media_parse_request( libvlc_instance_t *inst, libvlc_media_t *p_md,
+ libvlc_media_parse_flag_t parse_flag,
+ int timeout );
+
+/**
+ * Stop the parsing of the media
+ *
+ * When the media parsing is stopped, the libvlc_MediaParsedChanged event will
+ * be sent with the libvlc_media_parsed_status_timeout status.
+ *
+ * \see libvlc_media_parse_request()
+ *
+ * \param inst LibVLC instance that is to cease or give up parsing the media
+ * \param p_md media descriptor object
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API void
+libvlc_media_parse_stop( libvlc_instance_t *inst, libvlc_media_t *p_md );
+
+/**
+ * Get Parsed status for media descriptor object.
+ *
+ * \see libvlc_MediaParsedChanged
+ * \see libvlc_media_parsed_status_t
+ * \see libvlc_media_parse_request()
+ *
+ * \param p_md media descriptor object
+ * \return a value of the libvlc_media_parsed_status_t enum
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API libvlc_media_parsed_status_t
+ libvlc_media_get_parsed_status( libvlc_media_t *p_md );
+
+/**
+ * Sets media descriptor's user_data. user_data is specialized data
+ * accessed by the host application, VLC.framework uses it as a pointer to
+ * an native object that references a libvlc_media_t pointer
+ *
+ * \param p_md media descriptor object
+ * \param p_new_user_data pointer to user data
+ */
+LIBVLC_API void
+ libvlc_media_set_user_data( libvlc_media_t *p_md, void *p_new_user_data );
+
+/**
+ * Get media descriptor's user_data. user_data is specialized data
+ * accessed by the host application, VLC.framework uses it as a pointer to
+ * an native object that references a libvlc_media_t pointer
+ *
+ * \see libvlc_media_set_user_data
+ *
+ * \param p_md media descriptor object
+ */
+LIBVLC_API void *libvlc_media_get_user_data( libvlc_media_t *p_md );
+
+/**
+ * Get the track list for one type
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \note You need to call libvlc_media_parse_request() or play the media
+ * at least once before calling this function. Not doing this will result in
+ * an empty list.
+ *
+ * \see libvlc_media_tracklist_count
+ * \see libvlc_media_tracklist_at
+ *
+ * \param p_md media descriptor object
+ * \param type type of the track list to request
+ *
+ * \return a valid libvlc_media_tracklist_t or NULL in case of error, if there
+ * is no track for a category, the returned list will have a size of 0, delete
+ * with libvlc_media_tracklist_delete()
+ */
+LIBVLC_API libvlc_media_tracklist_t *
+libvlc_media_get_tracklist( libvlc_media_t *p_md, libvlc_track_type_t type );
+
+/**
+ * Get codec description from media elementary stream
+ *
+ * Note, you need to call libvlc_media_parse_request() or play the media
+ * at least once before calling this function.
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \see libvlc_media_track_t
+ *
+ * \param i_type i_type from libvlc_media_track_t
+ * \param i_codec i_codec or i_original_fourcc from libvlc_media_track_t
+ *
+ * \return codec description
+ */
+LIBVLC_API
+const char *libvlc_media_get_codec_description( libvlc_track_type_t i_type,
+ uint32_t i_codec );
+
+/**
+ * Get the media type of the media descriptor object
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \see libvlc_media_type_t
+ *
+ * \param p_md media descriptor object
+ *
+ * \return media type
+ */
+LIBVLC_API
+libvlc_media_type_t libvlc_media_get_type( libvlc_media_t *p_md );
+
+/**
+ * \brief libvlc_media_thumbnail_request_t An opaque thumbnail request object
+ */
+typedef struct libvlc_media_thumbnail_request_t libvlc_media_thumbnail_request_t;
+
+typedef enum libvlc_thumbnailer_seek_speed_t
+{
+ libvlc_media_thumbnail_seek_precise,
+ libvlc_media_thumbnail_seek_fast,
+} libvlc_thumbnailer_seek_speed_t;
+
+/**
+ * \brief libvlc_media_request_thumbnail_by_time Start an asynchronous thumbnail generation
+ *
+ * If the request is successfully queued, the libvlc_MediaThumbnailGenerated is
+ * guaranteed to be emitted (except if the request is destroyed early by the
+ * user).
+ * The resulting thumbnail size can either be:
+ * - Hardcoded by providing both width & height. In which case, the image will
+ * be stretched to match the provided aspect ratio, or cropped if crop is true.
+ * - Derived from the media aspect ratio if only width or height is provided and
+ * the other one is set to 0.
+ *
+ * \param inst LibVLC instance to generate the thumbnail with
+ * \param md media descriptor object
+ * \param time The time at which the thumbnail should be generated
+ * \param speed The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}
+ * \param width The thumbnail width
+ * \param height the thumbnail height
+ * \param crop Should the picture be cropped to preserve source aspect ratio
+ * \param picture_type The thumbnail picture type \sa{libvlc_picture_type_t}
+ * \param timeout A timeout value in ms, or 0 to disable timeout
+ *
+ * \return A valid opaque request object, or NULL in case of failure.
+ * It must be released by libvlc_media_thumbnail_request_destroy() and
+ * can be cancelled by calling it early.
+ *
+ * \version libvlc 4.0 or later
+ *
+ * \see libvlc_picture_t
+ * \see libvlc_picture_type_t
+ */
+LIBVLC_API libvlc_media_thumbnail_request_t*
+libvlc_media_thumbnail_request_by_time( libvlc_instance_t *inst,
+ libvlc_media_t *md, libvlc_time_t time,
+ libvlc_thumbnailer_seek_speed_t speed,
+ unsigned int width, unsigned int height,
+ bool crop, libvlc_picture_type_t picture_type,
+ libvlc_time_t timeout );
+
+/**
+ * \brief libvlc_media_request_thumbnail_by_pos Start an asynchronous thumbnail generation
+ *
+ * If the request is successfully queued, the libvlc_MediaThumbnailGenerated is
+ * guaranteed to be emitted (except if the request is destroyed early by the
+ * user).
+ * The resulting thumbnail size can either be:
+ * - Hardcoded by providing both width & height. In which case, the image will
+ * be stretched to match the provided aspect ratio, or cropped if crop is true.
+ * - Derived from the media aspect ratio if only width or height is provided and
+ * the other one is set to 0.
+ *
+ * \param inst LibVLC instance to generate the thumbnail with
+ * \param md media descriptor object
+ * \param pos The position at which the thumbnail should be generated
+ * \param speed The seeking speed \sa{libvlc_thumbnailer_seek_speed_t}
+ * \param width The thumbnail width
+ * \param height the thumbnail height
+ * \param crop Should the picture be cropped to preserve source aspect ratio
+ * \param picture_type The thumbnail picture type \sa{libvlc_picture_type_t}
+ * \param timeout A timeout value in ms, or 0 to disable timeout
+ *
+ * \return A valid opaque request object, or NULL in case of failure.
+ * It must be released by libvlc_media_thumbnail_request_destroy().
+ *
+ * \version libvlc 4.0 or later
+ *
+ * \see libvlc_picture_t
+ * \see libvlc_picture_type_t
+ */
+LIBVLC_API libvlc_media_thumbnail_request_t*
+libvlc_media_thumbnail_request_by_pos( libvlc_instance_t *inst,
+ libvlc_media_t *md, double pos,
+ libvlc_thumbnailer_seek_speed_t speed,
+ unsigned int width, unsigned int height,
+ bool crop, libvlc_picture_type_t picture_type,
+ libvlc_time_t timeout );
+
+/**
+ * @brief libvlc_media_thumbnail_destroy destroys a thumbnail request
+ * @param p_req An opaque thumbnail request object.
+ *
+ * This will also cancel the thumbnail request, no events will be emitted after
+ * this call.
+ */
+LIBVLC_API void
+libvlc_media_thumbnail_request_destroy( libvlc_media_thumbnail_request_t *p_req );
+
+/**
+ * Add a slave to the current media.
+ *
+ * A slave is an external input source that may contains an additional subtitle
+ * track (like a .srt) or an additional audio track (like a .ac3).
+ *
+ * \note This function must be called before the media is parsed (via
+ * libvlc_media_parse_request()) or before the media is played (via
+ * libvlc_media_player_play())
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param p_md media descriptor object
+ * \param i_type subtitle or audio
+ * \param i_priority from 0 (low priority) to 4 (high priority)
+ * \param psz_uri Uri of the slave (should contain a valid scheme).
+ *
+ * \return 0 on success, -1 on error.
+ */
+LIBVLC_API
+int libvlc_media_slaves_add( libvlc_media_t *p_md,
+ libvlc_media_slave_type_t i_type,
+ unsigned int i_priority,
+ const char *psz_uri );
+
+/**
+ * Clear all slaves previously added by libvlc_media_slaves_add() or
+ * internally.
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param p_md media descriptor object
+ */
+LIBVLC_API
+void libvlc_media_slaves_clear( libvlc_media_t *p_md );
+
+/**
+ * Get a media descriptor's slave list
+ *
+ * The list will contain slaves parsed by VLC or previously added by
+ * libvlc_media_slaves_add(). The typical use case of this function is to save
+ * a list of slave in a database for a later use.
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \see libvlc_media_slaves_add
+ *
+ * \param p_md media descriptor object
+ * \param ppp_slaves address to store an allocated array of slaves (must be
+ * freed with libvlc_media_slaves_release()) [OUT]
+ *
+ * \return the number of slaves (zero on error)
+ */
+LIBVLC_API
+unsigned int libvlc_media_slaves_get( libvlc_media_t *p_md,
+ libvlc_media_slave_t ***ppp_slaves );
+
+/**
+ * Release a media descriptor's slave list
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param pp_slaves slave array to release
+ * \param i_count number of elements in the array
+ */
+LIBVLC_API
+void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
+ unsigned int i_count );
+
+/** @}*/
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* VLC_LIBVLC_MEDIA_H */
diff --git a/Libs/vlc/libvlc_media_discoverer.h b/Libs/vlc/libvlc_media_discoverer.h
new file mode 100644
index 000000000..9054c837b
--- /dev/null
+++ b/Libs/vlc/libvlc_media_discoverer.h
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * libvlc_media_discoverer.h: libvlc external API
+ *****************************************************************************
+ * Copyright (C) 1998-2009 VLC authors and VideoLAN
+ *
+ * Authors: Clément Stenac
+ * Jean-Paul Saman
+ * Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_LIBVLC_MEDIA_DISCOVERER_H
+#define VLC_LIBVLC_MEDIA_DISCOVERER_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+typedef struct libvlc_media_list_t libvlc_media_list_t;
+
+/**
+ * Category of a media discoverer
+ * \see libvlc_media_discoverer_list_get()
+ */
+typedef enum libvlc_media_discoverer_category_t {
+ /** devices, like portable music player */
+ libvlc_media_discoverer_devices,
+ /** LAN/WAN services, like Upnp, SMB, or SAP */
+ libvlc_media_discoverer_lan,
+ /** Podcasts */
+ libvlc_media_discoverer_podcasts,
+ /** Local directories, like Video, Music or Pictures directories */
+ libvlc_media_discoverer_localdirs,
+} libvlc_media_discoverer_category_t;
+
+/**
+ * Media discoverer description
+ * \see libvlc_media_discoverer_list_get()
+ */
+typedef struct libvlc_media_discoverer_description_t {
+ char *psz_name;
+ char *psz_longname;
+ libvlc_media_discoverer_category_t i_cat;
+} libvlc_media_discoverer_description_t;
+
+/** \defgroup libvlc_media_discoverer LibVLC media discovery
+ * \ingroup libvlc
+ * LibVLC media discovery finds available media via various means.
+ * This corresponds to the service discovery functionality in VLC media player.
+ * Different plugins find potential medias locally (e.g. user media directory),
+ * from peripherals (e.g. video capture device), on the local network
+ * (e.g. SAP) or on the Internet (e.g. Internet radios).
+ * @{
+ * \file
+ * LibVLC media discovery external API
+ */
+
+typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
+
+/**
+ * Create a media discoverer object by name.
+ *
+ * After this object is created, you should attach to media_list events in
+ * order to be notified of new items discovered.
+ *
+ * You need to call libvlc_media_discoverer_start() in order to start the
+ * discovery.
+ *
+ * \see libvlc_media_discoverer_media_list
+ * \see libvlc_media_discoverer_start
+ *
+ * \param p_inst libvlc instance
+ * \param psz_name service name; use libvlc_media_discoverer_list_get() to get
+ * a list of the discoverer names available in this libVLC instance
+ * \return media discover object or NULL in case of error
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API libvlc_media_discoverer_t *
+libvlc_media_discoverer_new( libvlc_instance_t * p_inst,
+ const char * psz_name );
+
+/**
+ * Start media discovery.
+ *
+ * To stop it, call libvlc_media_discoverer_stop() or
+ * libvlc_media_discoverer_list_release() directly.
+ *
+ * \see libvlc_media_discoverer_stop
+ *
+ * \param p_mdis media discover object
+ * \return -1 in case of error, 0 otherwise
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API int
+libvlc_media_discoverer_start( libvlc_media_discoverer_t * p_mdis );
+
+/**
+ * Stop media discovery.
+ *
+ * \see libvlc_media_discoverer_start
+ *
+ * \param p_mdis media discover object
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API void
+libvlc_media_discoverer_stop( libvlc_media_discoverer_t * p_mdis );
+
+/**
+ * Release media discover object. If the reference count reaches 0, then
+ * the object will be released.
+ *
+ * \param p_mdis media service discover object
+ */
+LIBVLC_API void
+libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis );
+
+/**
+ * Get media service discover media list.
+ *
+ * \param p_mdis media service discover object
+ * \return list of media items
+ */
+LIBVLC_API libvlc_media_list_t *
+libvlc_media_discoverer_media_list( libvlc_media_discoverer_t * p_mdis );
+
+/**
+ * Query if media service discover object is running.
+ *
+ * \param p_mdis media service discover object
+ *
+ * \retval true running
+ * \retval false not running
+ */
+LIBVLC_API bool
+libvlc_media_discoverer_is_running(libvlc_media_discoverer_t *p_mdis);
+
+/**
+ * Get media discoverer services by category
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param p_inst libvlc instance
+ * \param i_cat category of services to fetch
+ * \param ppp_services address to store an allocated array of media discoverer
+ * services (must be freed with libvlc_media_discoverer_list_release() by
+ * the caller) [OUT]
+ *
+ * \return the number of media discoverer services (0 on error)
+ */
+LIBVLC_API size_t
+libvlc_media_discoverer_list_get( libvlc_instance_t *p_inst,
+ libvlc_media_discoverer_category_t i_cat,
+ libvlc_media_discoverer_description_t ***ppp_services );
+
+/**
+ * Release an array of media discoverer services
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \see libvlc_media_discoverer_list_get()
+ *
+ * \param pp_services array to release
+ * \param i_count number of elements in the array
+ */
+LIBVLC_API void
+libvlc_media_discoverer_list_release( libvlc_media_discoverer_description_t **pp_services,
+ size_t i_count );
+
+/**@} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* */
diff --git a/Libs/vlc/libvlc_media_list.h b/Libs/vlc/libvlc_media_list.h
new file mode 100644
index 000000000..ba2a340de
--- /dev/null
+++ b/Libs/vlc/libvlc_media_list.h
@@ -0,0 +1,200 @@
+/*****************************************************************************
+ * libvlc_media_list.h: libvlc_media_list API
+ *****************************************************************************
+ * Copyright (C) 1998-2008 VLC authors and VideoLAN
+ *
+ * Authors: Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef LIBVLC_MEDIA_LIST_H
+#define LIBVLC_MEDIA_LIST_H 1
+
+typedef struct libvlc_media_t libvlc_media_t;
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/** \defgroup libvlc_media_list LibVLC media list
+ * \ingroup libvlc
+ * A LibVLC media list holds multiple @ref libvlc_media_t media descriptors.
+ * @{
+ * \file
+ * LibVLC media list (playlist) external API
+ */
+
+typedef struct libvlc_media_list_t libvlc_media_list_t;
+
+/**
+ * Create an empty media list.
+ *
+ * \return empty media list, or NULL on error
+ */
+LIBVLC_API libvlc_media_list_t *libvlc_media_list_new(void);
+
+/**
+ * Release media list created with libvlc_media_list_new().
+ *
+ * \param p_ml a media list created with libvlc_media_list_new()
+ */
+LIBVLC_API void
+ libvlc_media_list_release( libvlc_media_list_t *p_ml );
+
+/**
+ * Retain reference to a media list
+ *
+ * \param p_ml a media list created with libvlc_media_list_new()
+ * \return the same object
+ */
+LIBVLC_API libvlc_media_list_t *
+ libvlc_media_list_retain( libvlc_media_list_t *p_ml );
+
+/**
+ * Associate media instance with this media list instance.
+ * If another media instance was present it will be released.
+ * The libvlc_media_list_lock should NOT be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \param p_md media instance to add
+ */
+LIBVLC_API void
+libvlc_media_list_set_media( libvlc_media_list_t *p_ml, libvlc_media_t *p_md );
+
+/**
+ * Get media instance from this media list instance. This action will increase
+ * the refcount on the media instance.
+ * The libvlc_media_list_lock should NOT be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \return media instance
+ */
+LIBVLC_API libvlc_media_t *
+ libvlc_media_list_media( libvlc_media_list_t *p_ml );
+
+/**
+ * Add media instance to media list
+ * The libvlc_media_list_lock should be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \param p_md a media instance
+ * \return 0 on success, -1 if the media list is read-only
+ */
+LIBVLC_API int
+libvlc_media_list_add_media( libvlc_media_list_t *p_ml, libvlc_media_t *p_md );
+
+/**
+ * Insert media instance in media list on a position
+ * The libvlc_media_list_lock should be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \param p_md a media instance
+ * \param i_pos position in array where to insert
+ * \return 0 on success, -1 if the media list is read-only
+ */
+LIBVLC_API int
+libvlc_media_list_insert_media( libvlc_media_list_t *p_ml,
+ libvlc_media_t *p_md, int i_pos );
+
+/**
+ * Remove media instance from media list on a position
+ * The libvlc_media_list_lock should be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \param i_pos position in array where to insert
+ * \return 0 on success, -1 if the list is read-only or the item was not found
+ */
+LIBVLC_API int
+libvlc_media_list_remove_index( libvlc_media_list_t *p_ml, int i_pos );
+
+/**
+ * Get count on media list items
+ * The libvlc_media_list_lock should be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \return number of items in media list
+ */
+LIBVLC_API int
+ libvlc_media_list_count( libvlc_media_list_t *p_ml );
+
+/**
+ * List media instance in media list at a position
+ * The libvlc_media_list_lock should be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \param i_pos position in array where to insert
+ * \return media instance at position i_pos, or NULL if not found.
+ * In case of success, libvlc_media_retain() is called to increase the refcount
+ * on the media.
+ */
+LIBVLC_API libvlc_media_t *
+ libvlc_media_list_item_at_index( libvlc_media_list_t *p_ml, int i_pos );
+/**
+ * Find index position of List media instance in media list.
+ * Warning: the function will return the first matched position.
+ * The libvlc_media_list_lock should be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ * \param p_md media instance
+ * \return position of media instance or -1 if media not found
+ */
+LIBVLC_API int
+ libvlc_media_list_index_of_item( libvlc_media_list_t *p_ml,
+ libvlc_media_t *p_md );
+
+/**
+ * This indicates if this media list is read-only from a user point of view
+ *
+ * \param p_ml media list instance
+ * \retval true read-only
+ * \retval false read/write
+ */
+LIBVLC_API bool libvlc_media_list_is_readonly(libvlc_media_list_t *p_ml);
+
+/**
+ * Get lock on media list items
+ *
+ * \param p_ml a media list instance
+ */
+LIBVLC_API void
+ libvlc_media_list_lock( libvlc_media_list_t *p_ml );
+
+/**
+ * Release lock on media list items
+ * The libvlc_media_list_lock should be held upon entering this function.
+ *
+ * \param p_ml a media list instance
+ */
+LIBVLC_API void
+ libvlc_media_list_unlock( libvlc_media_list_t *p_ml );
+
+/**
+ * Get libvlc_event_manager from this media list instance.
+ * The p_event_manager is immutable, so you don't have to hold the lock
+ *
+ * \param p_ml a media list instance
+ * \return libvlc_event_manager
+ */
+LIBVLC_API libvlc_event_manager_t *
+ libvlc_media_list_event_manager( libvlc_media_list_t *p_ml );
+
+/** @} media_list */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* _LIBVLC_MEDIA_LIST_H */
diff --git a/Libs/vlc/libvlc_media_list_player.h b/Libs/vlc/libvlc_media_list_player.h
new file mode 100644
index 000000000..aa287b460
--- /dev/null
+++ b/Libs/vlc/libvlc_media_list_player.h
@@ -0,0 +1,249 @@
+/*****************************************************************************
+ * libvlc_media_list_player.h: libvlc_media_list API
+ *****************************************************************************
+ * Copyright (C) 1998-2008 VLC authors and VideoLAN
+ *
+ * Authors: Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef LIBVLC_MEDIA_LIST_PLAYER_H
+#define LIBVLC_MEDIA_LIST_PLAYER_H 1
+
+#include
+#include
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+typedef struct libvlc_instance_t libvlc_instance_t;
+typedef struct libvlc_media_player_t libvlc_media_player_t;
+typedef struct libvlc_media_list_t libvlc_media_list_t;
+typedef struct libvlc_media_t libvlc_media_t;
+
+/** \defgroup libvlc_media_list_player LibVLC media list player
+ * \ingroup libvlc
+ * The LibVLC media list player plays a @ref libvlc_media_list_t list of media,
+ * in a certain order.
+ * This is required to especially support playlist files.
+ * The normal @ref libvlc_media_player_t LibVLC media player can only play a
+ * single media, and does not handle playlist files properly.
+ * @{
+ * \file
+ * LibVLC media list player external API
+ */
+
+typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
+
+/**
+ * Defines playback modes for playlist.
+ */
+typedef enum libvlc_playback_mode_t
+{
+ libvlc_playback_mode_default,
+ libvlc_playback_mode_loop,
+ libvlc_playback_mode_repeat
+} libvlc_playback_mode_t;
+
+/**
+ * Create new media_list_player.
+ *
+ * \param p_instance libvlc instance
+ * \return media list player instance or NULL on error
+ * (it must be released by libvlc_media_list_player_release())
+ */
+LIBVLC_API libvlc_media_list_player_t *
+ libvlc_media_list_player_new( libvlc_instance_t * p_instance );
+
+/**
+ * Release a media_list_player after use
+ * Decrement the reference count of a media player object. If the
+ * reference count is 0, then libvlc_media_list_player_release() will
+ * release the media player object. If the media player object
+ * has been released, then it should not be used again.
+ *
+ * \param p_mlp media list player instance
+ */
+LIBVLC_API void
+ libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
+
+/**
+ * Retain a reference to a media player list object. Use
+ * libvlc_media_list_player_release() to decrement reference count.
+ *
+ * \param p_mlp media player list object
+ * \return the same object
+ */
+LIBVLC_API libvlc_media_list_player_t *
+ libvlc_media_list_player_retain( libvlc_media_list_player_t *p_mlp );
+
+/**
+ * Return the event manager of this media_list_player.
+ *
+ * \param p_mlp media list player instance
+ * \return the event manager
+ */
+LIBVLC_API libvlc_event_manager_t *
+ libvlc_media_list_player_event_manager(libvlc_media_list_player_t * p_mlp);
+
+/**
+ * Replace media player in media_list_player with this instance.
+ *
+ * \param p_mlp media list player instance
+ * \param p_mi media player instance
+ */
+LIBVLC_API void
+ libvlc_media_list_player_set_media_player(
+ libvlc_media_list_player_t * p_mlp,
+ libvlc_media_player_t * p_mi );
+
+/**
+ * Get media player of the media_list_player instance.
+ *
+ * \param p_mlp media list player instance
+ * \return media player instance
+ * \note the caller is responsible for releasing the returned instance
+ with libvlc_media_list_player_set_media_player().
+ */
+LIBVLC_API libvlc_media_player_t *
+ libvlc_media_list_player_get_media_player(libvlc_media_list_player_t * p_mlp);
+
+/**
+ * Set the media list associated with the player
+ *
+ * \param p_mlp media list player instance
+ * \param p_mlist list of media
+ */
+LIBVLC_API void
+ libvlc_media_list_player_set_media_list(
+ libvlc_media_list_player_t * p_mlp,
+ libvlc_media_list_t * p_mlist );
+
+/**
+ * Play media list
+ *
+ * \param p_mlp media list player instance
+ */
+LIBVLC_API
+void libvlc_media_list_player_play(libvlc_media_list_player_t * p_mlp);
+
+/**
+ * Toggle pause (or resume) media list
+ *
+ * \param p_mlp media list player instance
+ */
+LIBVLC_API
+void libvlc_media_list_player_pause(libvlc_media_list_player_t * p_mlp);
+
+/**
+ * Pause or resume media list
+ *
+ * \param p_mlp media list player instance
+ * \param do_pause play/resume if zero, pause if non-zero
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API
+void libvlc_media_list_player_set_pause(libvlc_media_list_player_t * p_mlp,
+ int do_pause);
+
+/**
+ * Is media list playing?
+ *
+ * \param p_mlp media list player instance
+ *
+ * \retval true playing
+ * \retval false not playing
+ */
+LIBVLC_API bool
+libvlc_media_list_player_is_playing(libvlc_media_list_player_t * p_mlp);
+
+/**
+ * Get current libvlc_state of media list player
+ *
+ * \param p_mlp media list player instance
+ * \return libvlc_state_t for media list player
+ */
+LIBVLC_API libvlc_state_t
+ libvlc_media_list_player_get_state( libvlc_media_list_player_t * p_mlp );
+
+/**
+ * Play media list item at position index
+ *
+ * \param p_mlp media list player instance
+ * \param i_index index in media list to play
+ * \return 0 upon success -1 if the item wasn't found
+ */
+LIBVLC_API
+int libvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t * p_mlp,
+ int i_index);
+
+/**
+ * Play the given media item
+ *
+ * \param p_mlp media list player instance
+ * \param p_md the media instance
+ * \return 0 upon success, -1 if the media is not part of the media list
+ */
+LIBVLC_API
+int libvlc_media_list_player_play_item(libvlc_media_list_player_t * p_mlp,
+ libvlc_media_t * p_md);
+
+/**
+ * Stop playing media list
+ *
+ * \param p_mlp media list player instance
+ */
+LIBVLC_API void
+ libvlc_media_list_player_stop_async( libvlc_media_list_player_t * p_mlp);
+
+/**
+ * Play next item from media list
+ *
+ * \param p_mlp media list player instance
+ * \return 0 upon success -1 if there is no next item
+ */
+LIBVLC_API
+int libvlc_media_list_player_next(libvlc_media_list_player_t * p_mlp);
+
+/**
+ * Play previous item from media list
+ *
+ * \param p_mlp media list player instance
+ * \return 0 upon success -1 if there is no previous item
+ */
+LIBVLC_API
+int libvlc_media_list_player_previous(libvlc_media_list_player_t * p_mlp);
+
+
+
+/**
+ * Sets the playback mode for the playlist
+ *
+ * \param p_mlp media list player instance
+ * \param e_mode playback mode specification
+ */
+LIBVLC_API
+void libvlc_media_list_player_set_playback_mode(libvlc_media_list_player_t * p_mlp,
+ libvlc_playback_mode_t e_mode );
+
+/** @} media_list_player */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* LIBVLC_MEDIA_LIST_PLAYER_H */
diff --git a/Libs/vlc/libvlc_media_player.h b/Libs/vlc/libvlc_media_player.h
new file mode 100644
index 000000000..982e70ad3
--- /dev/null
+++ b/Libs/vlc/libvlc_media_player.h
@@ -0,0 +1,3304 @@
+/*****************************************************************************
+ * libvlc_media_player.h: libvlc_media_player external API
+ *****************************************************************************
+ * Copyright (C) 1998-2024 VLC authors and VideoLAN
+ *
+ * Authors: Clément Stenac
+ * Jean-Paul Saman
+ * Pierre d'Herbemont
+ * Maxime Chapelet
+ * Alexandre Janniaux
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_LIBVLC_MEDIA_PLAYER_H
+#define VLC_LIBVLC_MEDIA_PLAYER_H 1
+
+/* Definitions of enum properties for video */
+#include "libvlc_video.h"
+
+# ifdef __cplusplus
+extern "C" {
+# else
+# include
+# endif
+
+typedef struct libvlc_video_viewpoint_t libvlc_video_viewpoint_t;
+typedef enum libvlc_media_slave_type_t libvlc_media_slave_type_t;
+typedef struct libvlc_media_t libvlc_media_t;
+typedef struct libvlc_media_track_t libvlc_media_track_t;
+typedef struct libvlc_media_tracklist_t libvlc_media_tracklist_t;
+typedef enum libvlc_track_type_t libvlc_track_type_t;
+typedef struct libvlc_renderer_item_t libvlc_renderer_item_t;
+typedef enum libvlc_state_t libvlc_state_t;
+
+/** \defgroup libvlc_media_player LibVLC media player
+ * \ingroup libvlc
+ * A LibVLC media player plays one media (usually in a custom drawable).
+ * @{
+ * \file
+ * LibVLC simple media player external API
+ */
+
+typedef struct libvlc_media_player_t libvlc_media_player_t;
+
+/**
+ * Description for titles
+ */
+enum
+{
+ libvlc_title_menu = 0x01,
+ libvlc_title_interactive = 0x02
+};
+
+typedef struct libvlc_title_description_t
+{
+ int64_t i_duration; /**< duration in milliseconds */
+ char *psz_name; /**< title name */
+ unsigned i_flags; /**< info if item was recognized as a menu, interactive or plain content by the demuxer */
+} libvlc_title_description_t;
+
+/**
+ * Description for chapters
+ */
+typedef struct libvlc_chapter_description_t
+{
+ int64_t i_time_offset; /**< time-offset of the chapter in milliseconds */
+ int64_t i_duration; /**< duration of the chapter in milliseconds */
+ char *psz_name; /**< chapter name */
+} libvlc_chapter_description_t;
+
+/**
+ * Description for audio output. It contains
+ * name, description and pointer to next record.
+ */
+typedef struct libvlc_audio_output_t
+{
+ char *psz_name;
+ char *psz_description;
+ struct libvlc_audio_output_t *p_next;
+
+} libvlc_audio_output_t;
+
+/**
+ * Description for audio output device.
+ */
+typedef struct libvlc_audio_output_device_t
+{
+ struct libvlc_audio_output_device_t *p_next; /**< Next entry in list */
+ char *psz_device; /**< Device identifier string */
+ char *psz_description; /**< User-friendly device description */
+ /* More fields may be added here in later versions */
+} libvlc_audio_output_device_t;
+
+/**
+ * Marq options definition
+ */
+typedef enum libvlc_video_marquee_option_t {
+ libvlc_marquee_Enable = 0,
+ libvlc_marquee_Text, /** string argument */
+ libvlc_marquee_Color,
+ libvlc_marquee_Opacity,
+ libvlc_marquee_Position,
+ libvlc_marquee_Refresh,
+ libvlc_marquee_Size,
+ libvlc_marquee_Timeout,
+ libvlc_marquee_X,
+ libvlc_marquee_Y
+} libvlc_video_marquee_option_t;
+
+/**
+ * Navigation mode
+ */
+typedef enum libvlc_navigate_mode_t
+{
+ libvlc_navigate_activate = 0,
+ libvlc_navigate_up,
+ libvlc_navigate_down,
+ libvlc_navigate_left,
+ libvlc_navigate_right,
+ libvlc_navigate_popup
+} libvlc_navigate_mode_t;
+
+/**
+ * Enumeration of values used to set position (e.g. of video title).
+ */
+typedef enum libvlc_position_t {
+ libvlc_position_disable=-1,
+ libvlc_position_center,
+ libvlc_position_left,
+ libvlc_position_right,
+ libvlc_position_top,
+ libvlc_position_top_left,
+ libvlc_position_top_right,
+ libvlc_position_bottom,
+ libvlc_position_bottom_left,
+ libvlc_position_bottom_right
+} libvlc_position_t;
+
+/**
+ * Enumeration of values used to set the video fitting inside the display area.
+ */
+typedef enum libvlc_video_fit_mode_t {
+ libvlc_video_fit_none = 0, /**< Explicit zoom set by \ref libvlc_video_set_scale */
+ libvlc_video_fit_smaller, /**< Fit inside / to smallest display dimension */
+ libvlc_video_fit_larger, /**< Fit outside / to largest display dimension */
+ libvlc_video_fit_width, /**< Fit to display width */
+ libvlc_video_fit_height, /**< Fit to display height */
+} libvlc_video_fit_mode_t;
+
+/**
+ * Enumeration of teletext keys than can be passed via
+ * libvlc_video_set_teletext()
+ */
+typedef enum libvlc_teletext_key_t {
+ libvlc_teletext_key_red = 'r' << 16,
+ libvlc_teletext_key_green = 'g' << 16,
+ libvlc_teletext_key_yellow = 'y' << 16,
+ libvlc_teletext_key_blue = 'b' << 16,
+ libvlc_teletext_key_index = 'i' << 16,
+} libvlc_teletext_key_t;
+
+/**
+ * A to B loop state
+ */
+typedef enum libvlc_abloop_t {
+ libvlc_abloop_none,
+ libvlc_abloop_a,
+ libvlc_abloop_b,
+} libvlc_abloop_t;
+
+/**
+ * Opaque equalizer handle.
+ *
+ * Equalizer settings can be applied to a media player.
+ */
+typedef struct libvlc_equalizer_t libvlc_equalizer_t;
+
+/**
+ * Create an empty Media Player object
+ *
+ * \param p_libvlc_instance the libvlc instance in which the Media Player
+ * should be created.
+ * \return a new media player object, or NULL on error.
+ * It must be released by libvlc_media_player_release().
+ */
+LIBVLC_API libvlc_media_player_t * libvlc_media_player_new( libvlc_instance_t *p_libvlc_instance );
+
+/**
+ * Create a Media Player object from a Media
+ *
+ * \param inst LibVLC instance to create a media player with
+ * \param p_md the media. Afterwards the p_md can be safely
+ * destroyed.
+ * \return a new media player object, or NULL on error.
+ * It must be released by libvlc_media_player_release().
+ */
+LIBVLC_API libvlc_media_player_t * libvlc_media_player_new_from_media( libvlc_instance_t *inst, libvlc_media_t *p_md );
+
+/**
+ * Release a media_player after use
+ * Decrement the reference count of a media player object. If the
+ * reference count is 0, then libvlc_media_player_release() will
+ * release the media player object. If the media player object
+ * has been released, then it should not be used again.
+ *
+ * \param p_mi the Media Player to free
+ */
+LIBVLC_API void libvlc_media_player_release( libvlc_media_player_t *p_mi );
+
+/**
+ * Retain a reference to a media player object. Use
+ * libvlc_media_player_release() to decrement reference count.
+ *
+ * \param p_mi media player object
+ * \return the same object
+ */
+LIBVLC_API libvlc_media_player_t *libvlc_media_player_retain( libvlc_media_player_t *p_mi );
+
+/**
+ * Set the media that will be used by the media_player. If any,
+ * previous md will be released.
+ *
+ * \note The user should listen to the libvlc_MediaPlayerMediaChanged event, to
+ * know when the new media is actually used by the player (or to known that the
+ * older media is no longer used).
+ *
+ * \param p_mi the Media Player
+ * \param p_md the Media. Afterwards the p_md can be safely
+ * destroyed.
+ */
+LIBVLC_API void libvlc_media_player_set_media( libvlc_media_player_t *p_mi,
+ libvlc_media_t *p_md );
+
+/**
+ * Get the media used by the media_player.
+ *
+ * \warning Calling this function just after libvlc_media_player_set_media()
+ * will return the media that was just set, but this media might not be
+ * currently used internally by the player. To detect such case, the user
+ * should listen to the libvlc_MediaPlayerMediaChanged event.
+ *
+ * \param p_mi the Media Player
+ * \return the media associated with p_mi, or NULL if no
+ * media is associated
+ */
+LIBVLC_API libvlc_media_t * libvlc_media_player_get_media( libvlc_media_player_t *p_mi );
+
+/**
+ * Get the Event Manager from which the media player send event.
+ *
+ * \param p_mi the Media Player
+ * \return the event manager associated with p_mi
+ */
+LIBVLC_API libvlc_event_manager_t * libvlc_media_player_event_manager ( libvlc_media_player_t *p_mi );
+
+/**
+ * is_playing
+ *
+ * \param p_mi the Media Player
+ * \retval true media player is playing
+ * \retval false media player is not playing
+ */
+LIBVLC_API bool libvlc_media_player_is_playing(libvlc_media_player_t *p_mi);
+
+/**
+ * Play
+ *
+ * \param p_mi the Media Player
+ * \return 0 if playback started (and was already started), or -1 on error.
+ */
+LIBVLC_API int libvlc_media_player_play ( libvlc_media_player_t *p_mi );
+
+/**
+ * Pause or resume (no effect if there is no media)
+ *
+ * \param mp the Media Player
+ * \param do_pause play/resume if zero, pause if non-zero
+ * \version LibVLC 1.1.1 or later
+ */
+LIBVLC_API void libvlc_media_player_set_pause ( libvlc_media_player_t *mp,
+ int do_pause );
+
+/**
+ * Toggle pause (no effect if there is no media)
+ *
+ * \param p_mi the Media Player
+ */
+LIBVLC_API void libvlc_media_player_pause ( libvlc_media_player_t *p_mi );
+
+/**
+ * Stop asynchronously
+ *
+ * \note This function is asynchronous. In case of success, the user should
+ * wait for the libvlc_MediaPlayerStopped event to know when the stop is
+ * finished.
+ *
+ * \param p_mi the Media Player
+ * \return 0 if the player is being stopped, -1 otherwise (no-op)
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API int libvlc_media_player_stop_async ( libvlc_media_player_t *p_mi );
+
+/**
+ * Set a renderer to the media player
+ *
+ * \note must be called before the first call of libvlc_media_player_play() to
+ * take effect.
+ *
+ * \see libvlc_renderer_discoverer_new
+ *
+ * \param p_mi the Media Player
+ * \param p_item an item discovered by libvlc_renderer_discoverer_start()
+ * \return 0 on success, -1 on error.
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API int libvlc_media_player_set_renderer( libvlc_media_player_t *p_mi,
+ libvlc_renderer_item_t *p_item );
+
+/**
+ * Enumeration of the Video color primaries.
+ */
+typedef enum libvlc_video_color_primaries_t {
+ libvlc_video_primaries_BT601_525 = 1,
+ libvlc_video_primaries_BT601_625 = 2,
+ libvlc_video_primaries_BT709 = 3,
+ libvlc_video_primaries_BT2020 = 4,
+ libvlc_video_primaries_DCI_P3 = 5,
+ libvlc_video_primaries_BT470_M = 6,
+} libvlc_video_color_primaries_t;
+
+/**
+ * Enumeration of the Video color spaces.
+ */
+typedef enum libvlc_video_color_space_t {
+ libvlc_video_colorspace_BT601 = 1,
+ libvlc_video_colorspace_BT709 = 2,
+ libvlc_video_colorspace_BT2020 = 3,
+} libvlc_video_color_space_t;
+
+/**
+ * Enumeration of the Video transfer functions.
+ */
+typedef enum libvlc_video_transfer_func_t {
+ libvlc_video_transfer_func_LINEAR = 1,
+ libvlc_video_transfer_func_SRGB = 2,
+ libvlc_video_transfer_func_BT470_BG = 3,
+ libvlc_video_transfer_func_BT470_M = 4,
+ libvlc_video_transfer_func_BT709 = 5,
+ libvlc_video_transfer_func_PQ = 6,
+ libvlc_video_transfer_func_SMPTE_240 = 7,
+ libvlc_video_transfer_func_HLG = 8,
+} libvlc_video_transfer_func_t;
+
+
+/**
+ * Callback prototype to allocate and lock a picture buffer.
+ *
+ * Whenever a new video frame needs to be decoded, the lock callback is
+ * invoked. Depending on the video chroma, one or three pixel planes of
+ * adequate dimensions must be returned via the second parameter. Those
+ * planes must be aligned on 32-bytes boundaries.
+ *
+ * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
+ * \param[out] planes start address of the pixel planes (LibVLC allocates the array
+ * of void pointers, this callback must initialize the array)
+ * \return a private pointer for the display and unlock callbacks to identify
+ * the picture buffers
+ */
+typedef void *(*libvlc_video_lock_cb)(void *opaque, void **planes);
+
+/**
+ * Callback prototype to unlock a picture buffer.
+ *
+ * When the video frame decoding is complete, the unlock callback is invoked.
+ * This callback might not be needed at all. It is only an indication that the
+ * application can now read the pixel values if it needs to.
+ *
+ * \note A picture buffer is unlocked after the picture is decoded,
+ * but before the picture is displayed.
+ *
+ * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
+ * \param[in] picture private pointer returned from the @ref libvlc_video_lock_cb
+ * callback
+ * \param[in] planes pixel planes as defined by the @ref libvlc_video_lock_cb
+ * callback (this parameter is only for convenience)
+ */
+typedef void (*libvlc_video_unlock_cb)(void *opaque, void *picture,
+ void *const *planes);
+
+/**
+ * Callback prototype to display a picture.
+ *
+ * When the video frame needs to be shown, as determined by the media playback
+ * clock, the display callback is invoked.
+ *
+ * \param[in] opaque private pointer as passed to libvlc_video_set_callbacks()
+ * \param[in] picture private pointer returned from the @ref libvlc_video_lock_cb
+ * callback
+ */
+typedef void (*libvlc_video_display_cb)(void *opaque, void *picture);
+
+/**
+ * Callback prototype to configure picture buffers format.
+ * This callback gets the format of the video as output by the video decoder
+ * and the chain of video filters (if any). It can opt to change any parameter
+ * as it needs. In that case, LibVLC will attempt to convert the video format
+ * (rescaling and chroma conversion) but these operations can be CPU intensive.
+ *
+ * \param[in,out] opaque pointer to the private pointer passed to
+ * libvlc_video_set_callbacks()
+ * \param[in,out] chroma pointer to the 4 bytes video format identifier
+ * \param[in,out] width pointer to the buffer width in pixels
+ * \param[in,out] height pointer to the buffer height in pixels
+ * \param[out] pitches table of scanline pitches in bytes for each pixel plane
+ * (the table is allocated by LibVLC)
+ * \param[out] lines table of scanlines count for each plane
+ * \return the number of picture buffers allocated, 0 indicates failure
+ *
+ * \version LibVLC 4.0.0 and later.
+ * \param[in] width pointer to display width - 1 in pixels
+ * \param[in] height pointer to display height - 1 in pixels
+ *
+ * \note
+ * For each pixels plane, the scanline pitch must be bigger than or equal to
+ * the number of bytes per pixel multiplied by the pixel width.
+ * Similarly, the number of scanlines must be bigger than of equal to
+ * the pixel height.
+ * Furthermore, we recommend that pitches and lines be multiple of 32
+ * to not break assumptions that might be held by optimized code
+ * in the video decoders, video filters and/or video converters.
+ */
+typedef unsigned (*libvlc_video_format_cb)(void **opaque, char *chroma,
+ unsigned *width, unsigned *height,
+ unsigned *pitches,
+ unsigned *lines);
+
+/**
+ * Callback prototype to configure picture buffers format.
+ *
+ * \param[in] opaque private pointer as passed to libvlc_video_set_format_callbacks()
+ * (and possibly modified by @ref libvlc_video_format_cb)
+ */
+typedef void (*libvlc_video_cleanup_cb)(void *opaque);
+
+
+/**
+ * Set callbacks and private data to render decoded video to a custom area
+ * in memory.
+ * Use libvlc_video_set_format() or libvlc_video_set_format_callbacks()
+ * to configure the decoded format.
+ *
+ * \warning Rendering video into custom memory buffers is considerably less
+ * efficient than rendering in a custom window as normal.
+ *
+ * For optimal performances, VLC media player renders into a custom window, and
+ * does not use this function and associated callbacks. It is highly
+ * recommended that other LibVLC-based application do likewise.
+ * To embed video in a window, use libvlc_media_player_set_xwindow() or
+ * equivalent depending on the operating system.
+ *
+ * If window embedding does not fit the application use case, then a custom
+ * LibVLC video output display plugin is required to maintain optimal video
+ * rendering performances.
+ *
+ * The following limitations affect performance:
+ * - Hardware video decoding acceleration will either be disabled completely,
+ * or require (relatively slow) copy from video/DSP memory to main memory.
+ * - Sub-pictures (subtitles, on-screen display, etc.) must be blent into the
+ * main picture by the CPU instead of the GPU.
+ * - Depending on the video format, pixel format conversion, picture scaling,
+ * cropping and/or picture re-orientation, must be performed by the CPU
+ * instead of the GPU.
+ * - Memory copying is required between LibVLC reference picture buffers and
+ * application buffers (between lock and unlock callbacks).
+ *
+ * \param mp the media player
+ * \param lock callback to lock video memory (must not be NULL)
+ * \param unlock callback to unlock video memory (or NULL if not needed)
+ * \param display callback to display video (or NULL if not needed)
+ * \param opaque private pointer for the three callbacks (as first parameter)
+ * \version LibVLC 1.1.1 or later
+ */
+LIBVLC_API
+void libvlc_video_set_callbacks( libvlc_media_player_t *mp,
+ libvlc_video_lock_cb lock,
+ libvlc_video_unlock_cb unlock,
+ libvlc_video_display_cb display,
+ void *opaque );
+
+/**
+ * Set decoded video chroma and dimensions.
+ * This only works in combination with libvlc_video_set_callbacks(),
+ * and is mutually exclusive with libvlc_video_set_format_callbacks().
+ *
+ * \param mp the media player
+ * \param chroma a four-characters string identifying the chroma
+ * (e.g. "RV32" or "YUYV")
+ * \param width pixel width
+ * \param height pixel height
+ * \param pitch line pitch (in bytes)
+ * \version LibVLC 1.1.1 or later
+ * \bug All pixel planes are expected to have the same pitch.
+ * To use the YCbCr color space with chrominance subsampling,
+ * consider using libvlc_video_set_format_callbacks() instead.
+ */
+LIBVLC_API
+void libvlc_video_set_format( libvlc_media_player_t *mp, const char *chroma,
+ unsigned width, unsigned height,
+ unsigned pitch );
+
+/**
+ * Set decoded video chroma and dimensions. This only works in combination with
+ * libvlc_video_set_callbacks().
+ *
+ * \param mp the media player
+ * \param setup callback to select the video format (cannot be NULL)
+ * \param cleanup callback to release any allocated resources (or NULL)
+ * \version LibVLC 2.0.0 or later
+ */
+LIBVLC_API
+void libvlc_video_set_format_callbacks( libvlc_media_player_t *mp,
+ libvlc_video_format_cb setup,
+ libvlc_video_cleanup_cb cleanup );
+
+
+typedef struct libvlc_video_setup_device_cfg_t
+{
+ bool hardware_decoding; /** set if D3D11_CREATE_DEVICE_VIDEO_SUPPORT is needed for D3D11 */
+} libvlc_video_setup_device_cfg_t;
+
+typedef struct libvlc_video_setup_device_info_t
+{
+ union {
+ struct {
+ void *device_context; /** ID3D11DeviceContext* */
+ void *context_mutex; /** Windows Mutex HANDLE to protect ID3D11DeviceContext usage */
+ } d3d11;
+ struct {
+ void *device; /** IDirect3D9* */
+ int adapter; /** Adapter to use with the IDirect3D9* */
+ } d3d9;
+ };
+} libvlc_video_setup_device_info_t;
+
+/**
+ * Callback prototype called to initialize user data.
+ * Setup the rendering environment.
+ *
+ * \param[in,out] opaque private pointer passed to the @a libvlc_video_set_output_callbacks()
+ * on input. The callback can change this value on output to be
+ * passed to all the other callbacks set on @a libvlc_video_set_output_callbacks().
+ * \param[in] cfg requested configuration of the video device
+ * \param[out] out libvlc_video_setup_device_info_t* to fill
+ * \return true on success
+ * \version LibVLC 4.0.0 or later
+ *
+ * For \ref libvlc_video_engine_d3d9 the output must be a IDirect3D9*.
+ * A reference to this object is held until the \ref libvlc_video_output_cleanup_cb is called.
+ * the device must be created with D3DPRESENT_PARAMETERS.hDeviceWindow set to 0.
+ *
+ * For \ref libvlc_video_engine_d3d11 the output must be a ID3D11DeviceContext*.
+ * A reference to this object is held until the \ref libvlc_video_output_cleanup_cb is called.
+ * The ID3D11Device used to create ID3D11DeviceContext must have multithreading enabled.
+ *
+ * If the ID3D11DeviceContext is used outside of the callbacks called by libvlc, the host
+ * MUST use a mutex to protect the access to the ID3D11DeviceContext of libvlc. This mutex
+ * value is set on d3d11.context_mutex. If the ID3D11DeviceContext is not used outside of
+ * the callbacks, the mutex d3d11.context_mutex may be NULL.
+ */
+typedef bool (*libvlc_video_output_setup_cb)(void **opaque,
+ const libvlc_video_setup_device_cfg_t *cfg,
+ libvlc_video_setup_device_info_t *out);
+
+
+/**
+ * Callback prototype called to release user data
+ *
+ * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
+ * \version LibVLC 4.0.0 or later
+ */
+typedef void (*libvlc_video_output_cleanup_cb)(void* opaque);
+
+typedef struct libvlc_video_render_cfg_t
+{
+ /** rendering video width in pixel */
+ unsigned width;
+ /** rendering video height in pixel */
+ unsigned height;
+ /** rendering video bit depth in bits per channel */
+ unsigned bitdepth;
+ /** video is full range or studio/limited range */
+ bool full_range;
+ /** video color space */
+ libvlc_video_color_space_t colorspace;
+ /** video color primaries */
+ libvlc_video_color_primaries_t primaries;
+ /** video transfer function */
+ libvlc_video_transfer_func_t transfer;
+ /** device used for rendering, IDirect3DDevice9* for D3D9 */
+ void *device;
+} libvlc_video_render_cfg_t;
+
+typedef struct libvlc_video_output_cfg_t
+{
+ union {
+ /** The rendering DXGI_FORMAT for \ref libvlc_video_engine_d3d11. */
+ int dxgi_format;
+ /** The rendering D3DFORMAT for \ref libvlc_video_engine_d3d9. */
+ uint32_t d3d9_format;
+ /** The rendering GLint GL_RGBA or GL_RGB for
+ * \ref libvlc_video_engine_opengl and for
+ * \ref libvlc_video_engine_gles2. */
+ int opengl_format;
+ /** currently unused */
+ void *p_surface;
+ struct {
+ /** Pointer to an ANativeWindow, used for video rendering */
+ void *video;
+ /** Pointer to an ANativeWindow, used for subtitles rendering, if
+ * blending subtitles into the video surface is not possible (when
+ * using MediaCodec with direct hw rendering) */
+ void *subtitle;
+ } anw;
+ };
+ /** Video is full range or studio/limited range. */
+ bool full_range;
+ /** video color space */
+ libvlc_video_color_space_t colorspace;
+ /** video color primaries */
+ libvlc_video_color_primaries_t primaries;
+ /** video transfer function */
+ libvlc_video_transfer_func_t transfer;
+ /** video surface orientation */
+ libvlc_video_orient_t orientation;
+} libvlc_video_output_cfg_t;
+
+/**
+ * Callback prototype called on video size changes.
+ * Update the rendering output setup.
+ *
+ * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
+ * \param[in] cfg configuration of the video that will be rendered
+ * \param[out] output configuration describing with how the rendering is setup
+ * \version LibVLC 4.0.0 or later
+ *
+ * \note the configuration device for Direct3D9 is the IDirect3DDevice9 that VLC
+ * uses to render. The host must set a Render target and call Present()
+ * when it needs the drawing from VLC to be done. This object is not valid
+ * anymore after Cleanup is called.
+ * Tone mapping, range and color conversion will be done depending on the
+ * values set in the output structure. It can be ignored in the \ref
+ * libvlc_video_engine_anw case.
+ */
+typedef bool (*libvlc_video_update_output_cb)(void* opaque, const libvlc_video_render_cfg_t *cfg,
+ libvlc_video_output_cfg_t *output );
+
+
+/**
+ * Callback prototype called after performing drawing calls.
+ *
+ * This callback is called outside of libvlc_video_makeCurrent_cb current/not-current
+ * calls.
+ *
+ * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
+ * \version LibVLC 4.0.0 or later
+ */
+typedef void (*libvlc_video_swap_cb)(void* opaque);
+
+/**
+ * Callback prototype to set up the OpenGL context for rendering.
+ * Tell the host the rendering is about to start/has finished.
+ *
+ * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
+ * \param[in] enter true to set the context as current, false to unset it
+ * \return true on success
+ * \version LibVLC 4.0.0 or later
+ *
+ * On Direct3D11 the following may change on the provided ID3D11DeviceContext*
+ * between \p enter being true and \p enter being false:
+ * - IASetPrimitiveTopology()
+ * - IASetInputLayout()
+ * - IASetVertexBuffers()
+ * - IASetIndexBuffer()
+ * - VSSetConstantBuffers()
+ * - VSSetShader()
+ * - PSSetSamplers()
+ * - PSSetConstantBuffers()
+ * - PSSetShaderResources()
+ * - PSSetShader()
+ * - RSSetViewports()
+ * - DrawIndexed()
+ */
+typedef bool (*libvlc_video_makeCurrent_cb)(void* opaque, bool enter);
+
+/**
+ * Callback prototype to load opengl functions
+ *
+ * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
+ * \param fct_name name of the opengl function to load
+ * \return a pointer to the named OpenGL function the NULL otherwise
+ * \version LibVLC 4.0.0 or later
+ */
+typedef void* (*libvlc_video_getProcAddress_cb)(void* opaque, const char* fct_name);
+
+typedef struct libvlc_video_frame_hdr10_metadata_t
+{
+ /* similar to SMPTE ST 2086 mastering display color volume */
+ uint16_t RedPrimary[2];
+ uint16_t GreenPrimary[2];
+ uint16_t BluePrimary[2];
+ uint16_t WhitePoint[2];
+ unsigned int MaxMasteringLuminance;
+ unsigned int MinMasteringLuminance;
+ uint16_t MaxContentLightLevel;
+ uint16_t MaxFrameAverageLightLevel;
+} libvlc_video_frame_hdr10_metadata_t;
+
+typedef enum libvlc_video_metadata_type_t {
+ libvlc_video_metadata_frame_hdr10, /**< libvlc_video_frame_hdr10_metadata_t */
+} libvlc_video_metadata_type_t;
+
+/**
+ * Callback prototype to receive metadata before rendering.
+ *
+ * \param[in] opaque private pointer passed to the @a libvlc_video_set_output_callbacks()
+ * \param[in] type type of data passed in metadata
+ * \param[in] metadata the type of metadata
+ * \version LibVLC 4.0.0 or later
+ */
+typedef void (*libvlc_video_frameMetadata_cb)(void* opaque, libvlc_video_metadata_type_t type, const void *metadata);
+
+/**
+ * Enumeration of the Video engine to be used on output.
+ * can be passed to @a libvlc_video_set_output_callbacks
+ */
+typedef enum libvlc_video_engine_t {
+ /** Disable rendering engine */
+ libvlc_video_engine_disable,
+ libvlc_video_engine_opengl,
+ libvlc_video_engine_gles2,
+ /** Direct3D11 rendering engine */
+ libvlc_video_engine_d3d11,
+ /** Direct3D9 rendering engine */
+ libvlc_video_engine_d3d9,
+
+ /**
+ * Android ANativeWindow. It can be set in \ref libvlc_video_output_cfg_t
+ * from the \ref libvlc_video_update_output_cb callback. The ANativeWindow
+ * can be created via:
+ * - 'ANativeWindow_fromSurface': from a JAVA SurfaceView
+ * - 'AImageReader_getWindow()': from an 'AImageReader' created with the
+ * following arguments: \verbatim
+ AImageReader_newWithUsage(1, 1 AIMAGE_FORMAT_PRIVATE,
+ AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE,
+ maxImages, &reader);
+ \endverbatim
+ * The width and height from \ref libvlc_video_render_cfg_t should be
+ * ignored as the video size is overridden by the producer (MediaCodec or
+ * EGL vout).
+ */
+ libvlc_video_engine_anw,
+} libvlc_video_engine_t;
+
+
+/** Callback type that can be called to request a render size changes.
+ *
+ * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
+ *
+ * \param report_opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
+ * \param width new rendering width requested. [IN]
+ * \param height new rendering height requested. [IN]
+ */
+typedef void( *libvlc_video_output_resize_cb )( void *report_opaque, unsigned width, unsigned height );
+
+
+/**
+ * Enumeration of the different mouse buttons that can be reported for user interaction
+ * can be passed to \ref libvlc_video_output_mouse_press_cb and \ref libvlc_video_output_mouse_release_cb.
+ */
+typedef enum libvlc_video_output_mouse_button_t {
+ libvlc_video_output_mouse_button_left = 0,
+ libvlc_video_output_mouse_button_middle = 1,
+ libvlc_video_output_mouse_button_right = 2
+} libvlc_video_output_mouse_button_t;
+
+
+/** Callback type that can be called to notify the mouse position when hovering the render surface.
+ *
+ * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
+ *
+ * The position (0,0) denotes the top left corner, bottom right corner position
+ * is (width,height) as reported by \ref libvlc_video_output_resize_cb.
+ *
+ * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
+ * \param x horizontal mouse position in \ref libvlc_video_output_resize_cb coordinates. [IN]
+ * \param y vertical mouse position in \ref libvlc_video_output_resize_cb coordinates. [IN]
+ */
+typedef void (*libvlc_video_output_mouse_move_cb)(void *opaque, int x, int y);
+
+/** Callback type that can be called to notify when a mouse button is pressed in the rendering surface.
+ *
+ * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
+ *
+ * The button event will be reported at the last position provided by \ref libvlc_video_output_mouse_move_cb
+ *
+ * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
+ * \param button represent the button pressed, see \ref libvlc_video_output_mouse_button_t for available buttons. [IN]
+ */
+typedef void (*libvlc_video_output_mouse_press_cb)(void *opaque, libvlc_video_output_mouse_button_t button);
+
+/** Callback type that can be called to notify when a mouse button is released in the rendering surface.
+ *
+ * libvlc will provide a callback of this type when calling \ref libvlc_video_output_set_window_cb.
+ *
+ * The button event will be reported at the last position provided by \ref libvlc_video_output_mouse_move_cb.
+ *
+ * \param opaque parameter passed to \ref libvlc_video_output_set_window_cb. [IN]
+ * \param button represent the button released, see \ref libvlc_video_output_mouse_button_t for available buttons. [IN]
+ */
+typedef void (*libvlc_video_output_mouse_release_cb)(void *opaque, libvlc_video_output_mouse_button_t button);
+
+/** Set the callback to call when the host app resizes the rendering area.
+ *
+ * This allows text rendering and aspect ratio to be handled properly when the host
+ * rendering size changes and to provide mouse.
+ *
+ * It may be called before the \ref libvlc_video_output_setup_cb callback.
+ *
+ * \warning These callbacks cannot be called concurrently, the caller is responsible for serialization
+ *
+ * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
+ * \param[in] report_size_change callback which must be called when the host size changes.
+ * The callback is valid until another call to \ref libvlc_video_output_set_window_cb
+ * is done. This may be called from any thread.
+ * \param[in] report_mouse_move callback which must be called when the mouse position change on the video surface.
+ * The coordinates are relative to the size reported through the \p report_size_change.
+ * This may be called from any thread.
+ * \param[in] report_mouse_pressed callback which must be called when a mouse button is pressed on the video surface,
+ * The position of the event is the last position reported by the report_mouse_move callback. This may be
+ * called from any thread.
+ * \param[in] report_mouse_released callback which must be called when a mouse button is released on the video surface,
+ * The position of the event is the last position reported by the report_mouse_move callback. This may be
+ * called from any thread.
+ * \param[in] report_opaque private pointer to pass to the \p report_size_change callback.
+ */
+typedef void( *libvlc_video_output_set_window_cb )( void *opaque,
+ libvlc_video_output_resize_cb report_size_change,
+ libvlc_video_output_mouse_move_cb report_mouse_move,
+ libvlc_video_output_mouse_press_cb report_mouse_pressed,
+ libvlc_video_output_mouse_release_cb report_mouse_released,
+ void *report_opaque );
+
+/** Tell the host the rendering for the given plane is about to start
+ *
+ * \param[in] opaque private pointer set on the opaque parameter of @a libvlc_video_output_setup_cb()
+ * \param plane number of the rendering plane to select
+ * \param output handle of the rendering output for the given plane
+ * \return true on success
+ * \version LibVLC 4.0.0 or later
+ *
+ * \note This is only used with \ref libvlc_video_engine_d3d11.
+ *
+ * The output parameter receives the ID3D11RenderTargetView* to use for rendering
+ * the plane.
+ *
+ * If this callback is not used (set to NULL in @a libvlc_video_set_output_callbacks())
+ * OMSetRenderTargets has to be set during the @a libvlc_video_makeCurrent_cb()
+ * entering call.
+ *
+ * The number of planes depend on the DXGI_FORMAT returned during the
+ * @a libvlc_video_update_output_cb() call. It's usually one plane except for
+ * semi-planar formats like DXGI_FORMAT_NV12 or DXGI_FORMAT_P010.
+ *
+ * This callback is called between libvlc_video_makeCurrent_cb current/not-current
+ * calls.
+ */
+typedef bool( *libvlc_video_output_select_plane_cb )( void *opaque, size_t plane, void *output );
+
+/**
+ * Set callbacks and data to render decoded video to a custom texture
+ *
+ * \warning VLC will perform video rendering in its own thread and at its own rate,
+ * You need to provide your own synchronisation mechanism.
+ *
+ * \param mp the media player
+ * \param engine the GPU engine to use
+ * \param setup_cb callback called to initialize user data
+ * \param cleanup_cb callback called to clean up user data
+ * \param window_cb callback called to setup the window
+ * \param update_output_cb callback to get the rendering format of the host (cannot be NULL)
+ * \param swap_cb callback called after rendering a video frame (can only be
+ * NULL when using \ref libvlc_video_engine_anw)
+ * \param makeCurrent_cb callback called to enter/leave the rendering context
+ * (can only be NULL when using \ref libvlc_video_engine_anw)
+ * \param getProcAddress_cb opengl function loading callback (cannot be NULL
+ * for \ref libvlc_video_engine_opengl and for \ref libvlc_video_engine_gles2)
+ * \param metadata_cb callback to provide frame metadata (D3D11 only)
+ * \param select_plane_cb callback to select different D3D11 rendering targets
+ * \param opaque private pointer passed to callbacks
+ *
+ * \note the \p setup_cb and \p cleanup_cb may be called more than once per
+ * playback.
+ *
+ * \retval true engine selected and callbacks set
+ * \retval false engine type unknown, callbacks not set
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API
+bool libvlc_video_set_output_callbacks( libvlc_media_player_t *mp,
+ libvlc_video_engine_t engine,
+ libvlc_video_output_setup_cb setup_cb,
+ libvlc_video_output_cleanup_cb cleanup_cb,
+ libvlc_video_output_set_window_cb window_cb,
+ libvlc_video_update_output_cb update_output_cb,
+ libvlc_video_swap_cb swap_cb,
+ libvlc_video_makeCurrent_cb makeCurrent_cb,
+ libvlc_video_getProcAddress_cb getProcAddress_cb,
+ libvlc_video_frameMetadata_cb metadata_cb,
+ libvlc_video_output_select_plane_cb select_plane_cb,
+ void* opaque );
+
+/**
+ * Helper to setup output_callbacks for \ref libvlc_video_engine_anw
+ */
+static inline bool
+libvlc_video_set_anw_callbacks( libvlc_media_player_t *mp,
+ libvlc_video_output_setup_cb setup_cb,
+ libvlc_video_output_cleanup_cb cleanup_cb,
+ libvlc_video_update_output_cb update_output_cb,
+ void *opaque )
+{
+ return libvlc_video_set_output_callbacks( mp, libvlc_video_engine_anw,
+ setup_cb, cleanup_cb, NULL,
+ update_output_cb, NULL, NULL,
+ NULL, NULL, NULL, opaque );
+}
+
+/**
+ * Set the handler where the media player should display its video output.
+ *
+ * The drawable is an `NSObject` that require responding to two selectors
+ * like in this protocol:
+ *
+ * @code{.m}
+ * @protocol VLCDrawable
+ * - (void)addSubview:(VLCView *)view;
+ * - (CGRect)bounds;
+ * @end
+ * @endcode
+ *
+ * In this protocol `VLCView` type can either be a `UIView` or a `NSView` type
+ * class.
+ * VLCDrawable protocol conformance isn't mandatory but a drawable must respond
+ * to both `addSubview:` and `bounds` selectors.
+ *
+ * Additionally, a drawable can also conform to the `VLCPictureInPictureDrawable`
+ * protocol to allow picture in picture support :
+ *
+ * @code{.m}
+ * @protocol VLCPictureInPictureMediaControlling
+ * - (void)play;
+ * - (void)pause;
+ * - (void)seekBy:(int64_t)offset completion:(dispatch_block_t)completion;;
+ * - (int64_t)mediaLength;
+ * - (int64_t)mediaTime;
+ * - (BOOL)isMediaSeekable;
+ * - (BOOL)isMediaPlaying;
+ * @end
+ *
+ * @protocol VLCPictureInPictureWindowControlling
+ * - (void)startPictureInPicture;
+ * - (void)stopPictureInPicture;
+ * - (void)invalidatePlaybackState;
+ * @end
+ *
+ * @protocol VLCPictureInPictureDrawable
+ * - (id) mediaController;
+ * - (void (^)(id)) pictureInPictureReady;
+ * @end
+ * @endcode
+ *
+ * Be aware that full `VLCPictureInPictureDrawable` conformance is mandatory to
+ * enable picture in picture support and that time values in
+ * `VLCPictureInPictureMediaControlling` methods are expressed in milliseconds.
+ *
+ * If you want to use it along with Qt see the QMacCocoaViewContainer. Then
+ * the following code should work:
+ * @code{.mm}
+ * {
+ * NSView *video = [[NSView alloc] init];
+ * QMacCocoaViewContainer *container = new QMacCocoaViewContainer(video, parent);
+ * libvlc_media_player_set_nsobject(mp, video);
+ * [video release];
+ * }
+ * @endcode
+ *
+ * You can find a live example in VLCVideoView in VLCKit.framework.
+ *
+ * \param p_mi the Media Player
+ * \param drawable the drawable that is either an NSView, a UIView or any
+ * NSObject responding to `addSubview:` and `bounds` selectors
+ */
+LIBVLC_API void libvlc_media_player_set_nsobject ( libvlc_media_player_t *p_mi, void * drawable );
+
+/**
+ * Get the NSView handler previously set with libvlc_media_player_set_nsobject().
+ *
+ * \param p_mi the Media Player
+ * \return the NSView handler or 0 if none where set
+ */
+LIBVLC_API void * libvlc_media_player_get_nsobject ( libvlc_media_player_t *p_mi );
+
+/**
+ * Set an X Window System drawable where the media player should render its
+ * video output. The call takes effect when the playback starts. If it is
+ * already started, it might need to be stopped before changes apply.
+ * If LibVLC was built without X11 output support, then this function has no
+ * effects.
+ *
+ * By default, LibVLC will capture input events on the video rendering area.
+ * Use libvlc_video_set_mouse_input() and libvlc_video_set_key_input() to
+ * disable that and deliver events to the parent window / to the application
+ * instead. By design, the X11 protocol delivers input events to only one
+ * recipient.
+ *
+ * \warning
+ * The application must call the XInitThreads() function from Xlib before
+ * libvlc_new(), and before any call to XOpenDisplay() directly or via any
+ * other library. Failure to call XInitThreads() will seriously impede LibVLC
+ * performance. Calling XOpenDisplay() before XInitThreads() will eventually
+ * crash the process. That is a limitation of Xlib.
+ *
+ * \param p_mi media player
+ * \param drawable X11 window ID
+ *
+ * \note
+ * The specified identifier must correspond to an existing Input/Output class
+ * X11 window. Pixmaps are not currently supported. The default X11
+ * server is assumed, i.e. that specified in the DISPLAY environment variable.
+ *
+ * \warning
+ * LibVLC can deal with invalid X11 handle errors, however some display drivers
+ * (EGL, GLX, VA and/or VDPAU) can unfortunately not. Thus the window handle
+ * must remain valid until playback is stopped, otherwise the process may
+ * abort or crash.
+ *
+ * \bug
+ * No more than one window handle per media player instance can be specified.
+ * If the media has multiple simultaneously active video tracks, extra tracks
+ * will be rendered into external windows beyond the control of the
+ * application.
+ */
+LIBVLC_API void libvlc_media_player_set_xwindow(libvlc_media_player_t *p_mi,
+ uint32_t drawable);
+
+/**
+ * Get the X Window System window identifier previously set with
+ * libvlc_media_player_set_xwindow(). Note that this will return the identifier
+ * even if VLC is not currently using it (for instance if it is playing an
+ * audio-only input).
+ *
+ * \param p_mi the Media Player
+ * \return an X window ID, or 0 if none where set.
+ */
+LIBVLC_API uint32_t libvlc_media_player_get_xwindow ( libvlc_media_player_t *p_mi );
+
+/**
+ * Set a Win32/Win64 API window handle (HWND) where the media player should
+ * render its video output. If LibVLC was built without Win32/Win64 API output
+ * support, then this has no effects.
+ *
+ * \warning the HWND must have the WS_CLIPCHILDREN set in its style.
+ *
+ * \param p_mi the Media Player
+ * \param drawable windows handle of the drawable
+ */
+LIBVLC_API void libvlc_media_player_set_hwnd ( libvlc_media_player_t *p_mi, void *drawable );
+
+/**
+ * Get the Windows API window handle (HWND) previously set with
+ * libvlc_media_player_set_hwnd(). The handle will be returned even if LibVLC
+ * is not currently outputting any video to it.
+ *
+ * \param p_mi the Media Player
+ * \return a window handle or NULL if there are none.
+ */
+LIBVLC_API void *libvlc_media_player_get_hwnd ( libvlc_media_player_t *p_mi );
+
+/**
+ * Set the android context.
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param p_mi the media player
+ * \param p_awindow_handler org.videolan.libvlc.AWindow jobject owned by the
+ * org.videolan.libvlc.MediaPlayer class from the libvlc-android project.
+ */
+LIBVLC_API void libvlc_media_player_set_android_context( libvlc_media_player_t *p_mi,
+ void *p_awindow_handler );
+
+/**
+ * Callback prototype for audio playback.
+ *
+ * The LibVLC media player decodes and post-processes the audio signal
+ * asynchronously (in an internal thread). Whenever audio samples are ready
+ * to be queued to the output, this callback is invoked.
+ *
+ * The number of samples provided per invocation may depend on the file format,
+ * the audio coding algorithm, the decoder plug-in, the post-processing
+ * filters and timing. Application must not assume a certain number of samples.
+ *
+ * The exact format of audio samples is determined by libvlc_audio_set_format()
+ * or libvlc_audio_set_format_callbacks() as is the channels layout.
+ *
+ * Note that the number of samples is per channel. For instance, if the audio
+ * track sampling rate is 48000 Hz, then 1200 samples represent 25 milliseconds
+ * of audio signal - regardless of the number of audio channels.
+ *
+ * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
+ * \param[in] samples pointer to a table of audio samples to play back
+ * \param count number of audio samples to play back
+ * \param pts expected play time stamp (see libvlc_delay())
+ */
+typedef void (*libvlc_audio_play_cb)(void *data, const void *samples,
+ unsigned count, int64_t pts);
+
+/**
+ * Callback prototype for audio pause.
+ *
+ * LibVLC invokes this callback to pause audio playback.
+ *
+ * \note The pause callback is never called if the audio is already paused.
+ * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
+ * \param pts time stamp of the pause request (should be elapsed already)
+ */
+typedef void (*libvlc_audio_pause_cb)(void *data, int64_t pts);
+
+/**
+ * Callback prototype for audio resumption.
+ *
+ * LibVLC invokes this callback to resume audio playback after it was
+ * previously paused.
+ *
+ * \note The resume callback is never called if the audio is not paused.
+ * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
+ * \param pts time stamp of the resumption request (should be elapsed already)
+ */
+typedef void (*libvlc_audio_resume_cb)(void *data, int64_t pts);
+
+/**
+ * Callback prototype for audio buffer flush.
+ *
+ * LibVLC invokes this callback if it needs to discard all pending buffers and
+ * stop playback as soon as possible. This typically occurs when the media is
+ * stopped.
+ *
+ * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
+ */
+typedef void (*libvlc_audio_flush_cb)(void *data, int64_t pts);
+
+/**
+ * Callback prototype for audio buffer drain.
+ *
+ * LibVLC may invoke this callback when the decoded audio track is ending.
+ * There will be no further decoded samples for the track, but playback should
+ * nevertheless continue until all already pending buffers are rendered.
+ *
+ * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
+ */
+typedef void (*libvlc_audio_drain_cb)(void *data);
+
+/**
+ * Callback prototype for audio volume change.
+ * \param[in] data data pointer as passed to libvlc_audio_set_callbacks()
+ * \param volume software volume (1. = nominal, 0. = mute)
+ * \param mute muted flag
+ */
+typedef void (*libvlc_audio_set_volume_cb)(void *data,
+ float volume, bool mute);
+
+/**
+ * Sets callbacks and private data for decoded audio.
+ *
+ * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
+ * to configure the decoded audio format.
+ *
+ * \note The audio callbacks override any other audio output mechanism.
+ * If the callbacks are set, LibVLC will not output audio in any way.
+ *
+ * \param mp the media player
+ * \param play callback to play audio samples (must not be NULL)
+ * \param pause callback to pause playback (or NULL to ignore)
+ * \param resume callback to resume playback (or NULL to ignore)
+ * \param flush callback to flush audio buffers (or NULL to ignore)
+ * \param drain callback to drain audio buffers (or NULL to ignore)
+ * \param opaque private pointer for the audio callbacks (as first parameter)
+ * \version LibVLC 2.0.0 or later
+ */
+LIBVLC_API
+void libvlc_audio_set_callbacks( libvlc_media_player_t *mp,
+ libvlc_audio_play_cb play,
+ libvlc_audio_pause_cb pause,
+ libvlc_audio_resume_cb resume,
+ libvlc_audio_flush_cb flush,
+ libvlc_audio_drain_cb drain,
+ void *opaque );
+
+/**
+ * Set callbacks and private data for decoded audio. This only works in
+ * combination with libvlc_audio_set_callbacks().
+ * Use libvlc_audio_set_format() or libvlc_audio_set_format_callbacks()
+ * to configure the decoded audio format.
+ *
+ * \param mp the media player
+ * \param set_volume callback to apply audio volume,
+ * or NULL to apply volume in software
+ * \version LibVLC 2.0.0 or later
+ */
+LIBVLC_API
+void libvlc_audio_set_volume_callback( libvlc_media_player_t *mp,
+ libvlc_audio_set_volume_cb set_volume );
+
+/**
+ * Callback prototype to setup the audio playback.
+ *
+ * This is called when the media player needs to create a new audio output.
+ * \param[in,out] opaque pointer to the data pointer passed to
+ * libvlc_audio_set_callbacks()
+ * \param[in,out] format 4 bytes sample format
+ * \param[in,out] rate sample rate
+ * \param[in,out] channels channels count
+ * \return 0 on success, anything else to skip audio playback
+ */
+typedef int (*libvlc_audio_setup_cb)(void **opaque, char *format, unsigned *rate,
+ unsigned *channels);
+
+/**
+ * Callback prototype for audio playback cleanup.
+ *
+ * This is called when the media player no longer needs an audio output.
+ * \param[in] opaque data pointer as passed to libvlc_audio_set_callbacks()
+ */
+typedef void (*libvlc_audio_cleanup_cb)(void *opaque);
+
+/**
+ * Sets decoded audio format via callbacks.
+ *
+ * This only works in combination with libvlc_audio_set_callbacks().
+ *
+ * \param mp the media player
+ * \param setup callback to select the audio format (cannot be NULL)
+ * \param cleanup callback to release any allocated resources (or NULL)
+ * \version LibVLC 2.0.0 or later
+ */
+LIBVLC_API
+void libvlc_audio_set_format_callbacks( libvlc_media_player_t *mp,
+ libvlc_audio_setup_cb setup,
+ libvlc_audio_cleanup_cb cleanup );
+
+/**
+ * Sets a fixed decoded audio format.
+ *
+ * This only works in combination with libvlc_audio_set_callbacks(),
+ * and is mutually exclusive with libvlc_audio_set_format_callbacks().
+ *
+ * The supported formats are:
+ * - "S16N" for signed 16-bit PCM
+ * - "S32N" for signed 32-bit PCM
+ * - "FL32" for single precision IEEE 754
+ *
+ * All supported formats use the native endianness.
+ * If there are more than one channel, samples are interleaved.
+ *
+ * \param mp the media player
+ * \param format a four-characters string identifying the sample format
+ * \param rate sample rate (expressed in Hz)
+ * \param channels channels count
+ * \version LibVLC 2.0.0 or later
+ */
+LIBVLC_API
+void libvlc_audio_set_format( libvlc_media_player_t *mp, const char *format,
+ unsigned rate, unsigned channels );
+
+/** \bug This might go away ... to be replaced by a broader system */
+
+/**
+ * Get the current movie length (in ms).
+ *
+ * \param p_mi the Media Player
+ * \return the movie length (in ms), or -1 if there is no media.
+ */
+LIBVLC_API libvlc_time_t libvlc_media_player_get_length( libvlc_media_player_t *p_mi );
+
+/**
+ * Get the current movie time (in ms).
+ *
+ * \param p_mi the Media Player
+ * \return the movie time (in ms), or -1 if there is no media.
+ */
+LIBVLC_API libvlc_time_t libvlc_media_player_get_time( libvlc_media_player_t *p_mi );
+
+/**
+ * Set the movie time (in ms).
+ *
+ * This has no effect if no media is being played.
+ * Not all formats and protocols support this.
+ *
+ * \param p_mi the Media Player
+ * \param i_time the movie time (in ms).
+ * \param b_fast prefer fast seeking or precise seeking
+ * \return 0 on success, -1 on error
+ */
+LIBVLC_API int libvlc_media_player_set_time( libvlc_media_player_t *p_mi,
+ libvlc_time_t i_time, bool b_fast );
+
+/**
+ * Jump the movie time (in ms).
+ *
+ * This will trigger a precise and relative seek (from the current time).
+ * This has no effect if no media is being played.
+ * Not all formats and protocols support this.
+ *
+ * \param p_mi the Media Player
+ * \param i_time the movie time (in ms).
+ * \return 0 on success, -1 on error
+ * \version LibVLC 4.0.0 and later.
+ */
+LIBVLC_API int libvlc_media_player_jump_time( libvlc_media_player_t *p_mi,
+ libvlc_time_t i_time );
+
+/**
+ * Get movie position as percentage between 0.0 and 1.0.
+ *
+ * \param p_mi the Media Player
+ * \return movie position, or -1. in case of error
+ */
+LIBVLC_API double libvlc_media_player_get_position( libvlc_media_player_t *p_mi );
+
+/**
+ * Set movie position as percentage between 0.0 and 1.0.
+ * This has no effect if playback is not enabled.
+ * This might not work depending on the underlying input format and protocol.
+ *
+ * \param p_mi the Media Player
+ * \param b_fast prefer fast seeking or precise seeking
+ * \param f_pos the position
+ * \return 0 on success, -1 on error
+ */
+LIBVLC_API int libvlc_media_player_set_position( libvlc_media_player_t *p_mi,
+ double f_pos, bool b_fast );
+
+/**
+ * Enable A to B loop for the current media by setting the start time and end
+ * time
+ *
+ * The B time must be higher than the A time.
+ *
+ * \param p_mi the Media Player
+ * \param a_time start time for the loop (in ms)
+ * \param b_time end time for the loop (in ms)
+ * \return 0 on success, -1 on error
+ * \version LibVLC 4.0.0 and later.
+ */
+LIBVLC_API int
+libvlc_media_player_set_abloop_time( libvlc_media_player_t *p_mi,
+ libvlc_time_t a_time, libvlc_time_t b_time );
+
+/**
+ * Enable A to B loop for the current media by setting the start position and
+ * end position
+ *
+ * The B position must be higher than the A position.
+ *
+ * \param p_mi the Media Player
+ * \param a_pos start position for the loop
+ * \param b_pos end position for the loop
+ * \return 0 on success, -1 on error
+ * \version LibVLC 4.0.0 and later.
+ */
+LIBVLC_API int
+libvlc_media_player_set_abloop_position( libvlc_media_player_t *p_mi,
+ double a_pos, double b_pos );
+
+/**
+ * Reset/remove the A to B loop for the current media
+ *
+ * \param p_mi the Media Player
+ * \return 0 on success, -1 on error
+ * \version LibVLC 4.0.0 and later.
+ */
+LIBVLC_API int
+libvlc_media_player_reset_abloop( libvlc_media_player_t *p_mi );
+
+/**
+ * Get the A to B loop status
+ *
+ * @note If the returned status is VLC_PLAYER_ABLOOP_A, then a_time and a_pos
+ * will be valid. If the returned status is VLC_PLAYER_ABLOOP_B, then all
+ * output parameters are valid. If the returned status is
+ * VLC_PLAYER_ABLOOP_NONE, then all output parameters are invalid.
+ *
+ * @see vlc_player_cbs.on_atobloop_changed
+ *
+ * \param p_mi the Media Player
+ * \param a_time A time (in ms) or -1 (if the media doesn't have valid times)
+ * \param a_pos A position
+ * \param b_time B time (in ms) or -1 (if the media doesn't have valid times)
+ * \param b_pos B position
+ * \return A to B loop status
+ * \version LibVLC 4.0.0 and later.
+ */
+LIBVLC_API libvlc_abloop_t
+libvlc_media_player_get_abloop( libvlc_media_player_t *p_mi,
+ libvlc_time_t *a_time, double *a_pos,
+ libvlc_time_t *b_time, double *b_pos );
+/**
+ * Set movie chapter (if applicable).
+ *
+ * \param p_mi the Media Player
+ * \param i_chapter chapter number to play
+ */
+LIBVLC_API void libvlc_media_player_set_chapter( libvlc_media_player_t *p_mi, int i_chapter );
+
+/**
+ * Get movie chapter.
+ *
+ * \param p_mi the Media Player
+ * \return chapter number currently playing, or -1 if there is no media.
+ */
+LIBVLC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *p_mi );
+
+/**
+ * Get movie chapter count
+ *
+ * \param p_mi the Media Player
+ * \return number of chapters in movie, or -1.
+ */
+LIBVLC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *p_mi );
+
+/**
+ * Get title chapter count
+ *
+ * \param p_mi the Media Player
+ * \param i_title title
+ * \return number of chapters in title, or -1
+ */
+LIBVLC_API int libvlc_media_player_get_chapter_count_for_title(
+ libvlc_media_player_t *p_mi, int i_title );
+
+/**
+ * Set movie title
+ *
+ * \param p_mi the Media Player
+ * \param i_title title number to play
+ */
+LIBVLC_API void libvlc_media_player_set_title( libvlc_media_player_t *p_mi, int i_title );
+
+/**
+ * Get movie title
+ *
+ * \param p_mi the Media Player
+ * \return title number currently playing, or -1
+ */
+LIBVLC_API int libvlc_media_player_get_title( libvlc_media_player_t *p_mi );
+
+/**
+ * Get movie title count
+ *
+ * \param p_mi the Media Player
+ * \return title number count, or -1
+ */
+LIBVLC_API int libvlc_media_player_get_title_count( libvlc_media_player_t *p_mi );
+
+/**
+ * Set previous chapter (if applicable)
+ *
+ * \param p_mi the Media Player
+ */
+LIBVLC_API void libvlc_media_player_previous_chapter( libvlc_media_player_t *p_mi );
+
+/**
+ * Set next chapter (if applicable)
+ *
+ * \param p_mi the Media Player
+ */
+LIBVLC_API void libvlc_media_player_next_chapter( libvlc_media_player_t *p_mi );
+
+/**
+ * Get the requested movie play rate.
+ * @warning Depending on the underlying media, the requested rate may be
+ * different from the real playback rate.
+ *
+ * \param p_mi the Media Player
+ * \return movie play rate
+ */
+LIBVLC_API float libvlc_media_player_get_rate( libvlc_media_player_t *p_mi );
+
+/**
+ * Set movie play rate
+ *
+ * \param p_mi the Media Player
+ * \param rate movie play rate to set
+ * \return -1 if an error was detected, 0 otherwise (but even then, it might
+ * not actually work depending on the underlying media protocol)
+ */
+LIBVLC_API int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate );
+
+/**
+ * Get current movie state
+ *
+ * \param p_mi the Media Player
+ * \return the current state of the media player (playing, paused, ...) \see libvlc_state_t
+ */
+LIBVLC_API libvlc_state_t libvlc_media_player_get_state( libvlc_media_player_t *p_mi );
+
+/**
+ * How many video outputs does this media player have?
+ *
+ * \param p_mi the media player
+ * \return the number of video outputs
+ */
+LIBVLC_API unsigned libvlc_media_player_has_vout( libvlc_media_player_t *p_mi );
+
+/**
+ * Is this media player seekable?
+ *
+ * \param p_mi the media player
+ * \retval true media player can seek
+ * \retval false media player cannot seek
+ */
+LIBVLC_API bool libvlc_media_player_is_seekable(libvlc_media_player_t *p_mi);
+
+/**
+ * Can this media player be paused?
+ *
+ * \param p_mi the media player
+ * \retval true media player can be paused
+ * \retval false media player cannot be paused
+ */
+LIBVLC_API bool libvlc_media_player_can_pause(libvlc_media_player_t *p_mi);
+
+/**
+ * Check if the current program is scrambled
+ *
+ * \param p_mi the media player
+ * \retval true current program is scrambled
+ * \retval false current program is not scrambled
+ *
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API bool libvlc_media_player_program_scrambled( libvlc_media_player_t *p_mi );
+
+/**
+ * Display the next frame (if supported)
+ *
+ * \param p_mi the media player
+ */
+LIBVLC_API void libvlc_media_player_next_frame( libvlc_media_player_t *p_mi );
+
+/**
+ * Navigate through DVD Menu
+ *
+ * \param p_mi the Media Player
+ * \param navigate the Navigation mode
+ * \version libVLC 2.0.0 or later
+ */
+LIBVLC_API void libvlc_media_player_navigate( libvlc_media_player_t* p_mi,
+ unsigned navigate );
+
+/**
+ * Set if, and how, the video title will be shown when media is played.
+ *
+ * \param p_mi the media player
+ * \param position position at which to display the title, or libvlc_position_disable to prevent the title from being displayed
+ * \param timeout title display timeout in milliseconds (ignored if libvlc_position_disable)
+ * \version libVLC 2.1.0 or later
+ */
+LIBVLC_API void libvlc_media_player_set_video_title_display( libvlc_media_player_t *p_mi, libvlc_position_t position, unsigned int timeout );
+
+/**
+ * Get the track list for one type
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \note You need to call libvlc_media_parse_request() or play the media
+ * at least once before calling this function. Not doing this will result in
+ * an empty list.
+ *
+ * \note This track list is a snapshot of the current tracks when this function
+ * is called. If a track is updated after this call, the user will need to call
+ * this function again to get the updated track.
+ *
+ *
+ * The track list can be used to get track information and to select specific
+ * tracks.
+ *
+ * \param p_mi the media player
+ * \param type type of the track list to request
+ * \param selected filter only selected tracks if true (return all tracks, even
+ * selected ones if false)
+ *
+ * \return a valid libvlc_media_tracklist_t or NULL in case of error, if there
+ * is no track for a category, the returned list will have a size of 0, delete
+ * with libvlc_media_tracklist_delete()
+ */
+LIBVLC_API libvlc_media_tracklist_t *
+libvlc_media_player_get_tracklist( libvlc_media_player_t *p_mi,
+ libvlc_track_type_t type, bool selected );
+
+/**
+ * Get the selected track for one type
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \warning More than one tracks can be selected for one type. In that case,
+ * libvlc_media_player_get_tracklist() should be used.
+ *
+ * \param p_mi the media player
+ * \param type type of the selected track
+ *
+ * \return a valid track or NULL if there is no selected tracks for this type,
+ * release it with libvlc_media_track_release().
+ */
+LIBVLC_API libvlc_media_track_t *
+libvlc_media_player_get_selected_track( libvlc_media_player_t *p_mi,
+ libvlc_track_type_t type );
+
+/*
+ * Get a track from a track id
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * This function can be used to get the last updated information of a track.
+ *
+ * \param p_mi the media player
+ * \param psz_id valid string representing a track id (cf. psz_id from \ref
+ * libvlc_media_track_t)
+ *
+ * \return a valid track or NULL if there is currently no tracks identified by
+ * the string id, release it with libvlc_media_track_release().
+ */
+LIBVLC_API libvlc_media_track_t *
+libvlc_media_player_get_track_from_id( libvlc_media_player_t *p_mi,
+ const char *psz_id );
+
+
+/**
+ * Select a track
+ *
+ * This will unselected the current track.
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \note Use libvlc_media_player_select_tracks() for multiple selection
+ *
+ * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
+ *
+ * \param p_mi the media player
+ * \param track track to select, can't be NULL
+ */
+LIBVLC_API void
+libvlc_media_player_select_track( libvlc_media_player_t *p_mi,
+ const libvlc_media_track_t *track );
+
+/**
+ * Unselect all tracks for a given type
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param p_mi the media player
+ * \param type type to unselect
+ */
+LIBVLC_API void
+libvlc_media_player_unselect_track_type( libvlc_media_player_t *p_mi,
+ libvlc_track_type_t type );
+
+/**
+ * Select multiple tracks for one type
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \note The internal track list can change between the calls of
+ * libvlc_media_player_get_tracklist() and
+ * libvlc_media_player_set_tracks(). If a track selection change but the
+ * track is not present anymore, the player will just ignore it.
+ *
+ * \note selecting multiple audio tracks is currently not supported.
+ *
+ * \warning Only use a \ref libvlc_media_track_t retrieved with \ref libvlc_media_player_get_tracklist
+ *
+ * \param p_mi the media player
+ * \param type type of the selected track
+ * \param tracks pointer to the track array, or NULL if track_count is 0
+ * \param track_count number of tracks in the track array
+ */
+LIBVLC_API void
+libvlc_media_player_select_tracks( libvlc_media_player_t *p_mi,
+ libvlc_track_type_t type,
+ const libvlc_media_track_t **tracks,
+ size_t track_count );
+
+/**
+ * Select tracks by their string identifier
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * This function can be used pre-select a list of tracks before starting the
+ * player. It has only effect for the current media. It can also be used when
+ * the player is already started.
+ *
+ * 'str_ids' can contain more than one track id, delimited with ','. "" or any
+ * invalid track id will cause the player to unselect all tracks of that
+ * category. NULL will disable the preference for newer tracks without
+ * unselecting any current tracks.
+ *
+ * Example:
+ * - (libvlc_track_video, "video/1,video/2") will select these 2 video tracks.
+ * If there is only one video track with the id "video/0", no tracks will be
+ * selected.
+ * - (libvlc_track_type_t, "${slave_url_md5sum}/spu/0) will select one spu
+ * added by an input slave with the corresponding url.
+ *
+ * \note The string identifier of a track can be found via psz_id from \ref
+ * libvlc_media_track_t
+ *
+ * \note selecting multiple audio tracks is currently not supported.
+ *
+ * \warning Only use a \ref libvlc_media_track_t id retrieved with \ref libvlc_media_player_get_tracklist
+ *
+ * \param p_mi the media player
+ * \param type type to select
+ * \param psz_ids list of string identifier or NULL
+ */
+LIBVLC_API void
+libvlc_media_player_select_tracks_by_ids( libvlc_media_player_t *p_mi,
+ libvlc_track_type_t type,
+ const char *psz_ids );
+
+/**
+ * Add a slave to the current media player.
+ *
+ * \note If the player is playing, the slave will be added directly. This call
+ * will also update the slave list of the attached libvlc_media_t.
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \see libvlc_media_slaves_add
+ *
+ * \param p_mi the media player
+ * \param i_type subtitle or audio
+ * \param psz_uri Uri of the slave (should contain a valid scheme).
+ * \param b_select True if this slave should be selected when it's loaded
+ *
+ * \return 0 on success, -1 on error.
+ */
+LIBVLC_API
+int libvlc_media_player_add_slave( libvlc_media_player_t *p_mi,
+ libvlc_media_slave_type_t i_type,
+ const char *psz_uri, bool b_select );
+
+typedef struct libvlc_player_program_t
+{
+ /** Id used for libvlc_media_player_select_program() */
+ int i_group_id;
+ /** Program name, always valid */
+ char *psz_name;
+ /** True if the program is selected */
+ bool b_selected;
+ /** True if the program is scrambled */
+ bool b_scrambled;
+} libvlc_player_program_t;
+
+/**
+ * Opaque struct containing a list of program
+ */
+typedef struct libvlc_player_programlist_t libvlc_player_programlist_t;
+
+/**
+ * Delete a program struct
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param program returned by libvlc_media_player_get_selected_program() or
+ * libvlc_media_player_get_program_from_id()
+ *
+ */
+LIBVLC_API void
+libvlc_player_program_delete( libvlc_player_program_t *program );
+
+/**
+ * Get the number of programs in a programlist
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param list valid programlist
+ *
+ * \return number of programs, or 0 if the list is empty
+ */
+LIBVLC_API size_t
+libvlc_player_programlist_count( const libvlc_player_programlist_t *list );
+
+/**
+ * Get a program at a specific index
+ *
+ * \warning The behaviour is undefined if the index is not valid.
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param list valid programlist
+ * \param index valid index in the range [0; count[
+ *
+ * \return a valid program (can't be NULL if libvlc_player_programlist_count()
+ * returned a valid count)
+ */
+LIBVLC_API libvlc_player_program_t *
+libvlc_player_programlist_at( libvlc_player_programlist_t *list, size_t index );
+
+/**
+ * Release a programlist
+ *
+ * \note program structs from the list are also deleted.
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \see libvlc_media_player_get_programlist
+ *
+ * \param list valid programlist
+ */
+LIBVLC_API void
+libvlc_player_programlist_delete( libvlc_player_programlist_t *list );
+
+/**
+ * Select program with a given program id.
+ *
+ * \note program ids are sent via the libvlc_MediaPlayerProgramAdded event or
+ * can be fetch via libvlc_media_player_get_programlist()
+ *
+ * \version LibVLC 4.0.0 or later
+ *
+ * \param p_mi opaque media player handle
+ * \param i_group_id program id
+ */
+LIBVLC_API void libvlc_media_player_select_program_id( libvlc_media_player_t *p_mi, int i_group_id);
+
+/**
+ * Get the selected program
+ *
+ * \version LibVLC 4.0.0 or later
+ *
+ * \param p_mi opaque media player handle
+ *
+ * \return a valid program struct or NULL if no programs are selected. The
+ * program need to be freed with libvlc_player_program_delete().
+ */
+LIBVLC_API libvlc_player_program_t *
+libvlc_media_player_get_selected_program( libvlc_media_player_t *p_mi);
+
+/**
+ * Get a program struct from a program id
+ *
+ * \version LibVLC 4.0.0 or later
+ *
+ * \param p_mi opaque media player handle
+ * \param i_group_id program id
+ *
+ * \return a valid program struct or NULL if the i_group_id is not found. The
+ * program need to be freed with libvlc_player_program_delete().
+ */
+LIBVLC_API libvlc_player_program_t *
+libvlc_media_player_get_program_from_id( libvlc_media_player_t *p_mi, int i_group_id );
+
+/**
+ * Get the program list
+ *
+ * \version LibVLC 4.0.0 and later.
+ * \note This program list is a snapshot of the current programs when this
+ * function is called. If a program is updated after this call, the user will
+ * need to call this function again to get the updated program.
+ *
+ * The program list can be used to get program information and to select
+ * specific programs.
+ *
+ * \param p_mi the media player
+ *
+ * \return a valid libvlc_media_programlist_t or NULL in case of error or empty
+ * list, delete with libvlc_media_programlist_delete()
+ */
+LIBVLC_API libvlc_player_programlist_t *
+libvlc_media_player_get_programlist( libvlc_media_player_t *p_mi );
+
+
+/** \defgroup libvlc_video LibVLC video controls
+ * @{
+ */
+
+/**
+ * Toggle fullscreen status on non-embedded video outputs.
+ *
+ * @warning The same limitations applies to this function
+ * as to libvlc_set_fullscreen().
+ *
+ * \param p_mi the media player
+ */
+LIBVLC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi );
+
+/**
+ * Enable or disable fullscreen.
+ *
+ * @warning With most window managers, only a top-level windows can be in
+ * full-screen mode. Hence, this function will not operate properly if
+ * libvlc_media_player_set_xwindow() was used to embed the video in a
+ * non-top-level window. In that case, the embedding window must be reparented
+ * to the root window before fullscreen mode is enabled. You will want
+ * to reparent it back to its normal parent when disabling fullscreen.
+ *
+ * \note This setting applies to any and all current or future active video
+ * tracks and windows for the given media player. The choice of fullscreen
+ * output for each window is left to the operating system.
+ *
+ * \param p_mi the media player
+ * \param b_fullscreen boolean for fullscreen status
+ */
+LIBVLC_API void libvlc_set_fullscreen(libvlc_media_player_t *p_mi, bool b_fullscreen);
+
+/**
+ * Get current fullscreen status.
+ *
+ * \param p_mi the media player
+ * \return the fullscreen status (boolean)
+ *
+ * \retval false media player is windowed
+ * \retval true media player is in fullscreen mode
+ */
+LIBVLC_API bool libvlc_get_fullscreen( libvlc_media_player_t *p_mi );
+
+/**
+ * Enable or disable key press events handling, according to the LibVLC hotkeys
+ * configuration. By default and for historical reasons, keyboard events are
+ * handled by the LibVLC video widget.
+ *
+ * \note On X11, there can be only one subscriber for key press and mouse
+ * click events per window. If your application has subscribed to those events
+ * for the X window ID of the video widget, then LibVLC will not be able to
+ * handle key presses and mouse clicks in any case.
+ *
+ * \warning This function is only implemented for X11 and Win32 at the moment.
+ *
+ * \param p_mi the media player
+ * \param on true to handle key press events, false to ignore them.
+ */
+LIBVLC_API
+void libvlc_video_set_key_input( libvlc_media_player_t *p_mi, unsigned on );
+
+/**
+ * Enable or disable mouse click events handling. By default, those events are
+ * handled. This is needed for DVD menus to work, as well as a few video
+ * filters such as "puzzle".
+ *
+ * \see libvlc_video_set_key_input().
+ *
+ * \warning This function is only implemented for X11 and Win32 at the moment.
+ *
+ * \param p_mi the media player
+ * \param on true to handle mouse click events, false to ignore them.
+ */
+LIBVLC_API
+void libvlc_video_set_mouse_input( libvlc_media_player_t *p_mi, unsigned on );
+
+/**
+ * Get the pixel dimensions of a video.
+ *
+ * \param p_mi media player
+ * \param num number of the video (starting from, and most commonly 0)
+ * \param[out] px pointer to get the pixel width
+ * \param[out] py pointer to get the pixel height
+ * \return 0 on success, -1 if the specified video does not exist
+ */
+LIBVLC_API
+int libvlc_video_get_size( libvlc_media_player_t *p_mi, unsigned num,
+ unsigned *px, unsigned *py );
+
+/**
+ * Get the mouse pointer coordinates over a video.
+ * Coordinates are expressed in terms of the decoded video resolution,
+ * not in terms of pixels on the screen/viewport (to get the latter,
+ * you can query your windowing system directly).
+ *
+ * Either of the coordinates may be negative or larger than the corresponding
+ * dimension of the video, if the cursor is outside the rendering area.
+ *
+ * @warning The coordinates may be out-of-date if the pointer is not located
+ * on the video rendering area. LibVLC does not track the pointer if it is
+ * outside of the video widget.
+ *
+ * @note LibVLC does not support multiple pointers (it does of course support
+ * multiple input devices sharing the same pointer) at the moment.
+ *
+ * \param p_mi media player
+ * \param num number of the video (starting from, and most commonly 0)
+ * \param[out] px pointer to get the abscissa
+ * \param[out] py pointer to get the ordinate
+ * \return 0 on success, -1 if the specified video does not exist
+ */
+LIBVLC_API
+int libvlc_video_get_cursor( libvlc_media_player_t *p_mi, unsigned num,
+ int *px, int *py );
+
+/**
+ * Get the current video scaling factor.
+ * See also libvlc_video_set_scale().
+ *
+ * \param p_mi the media player
+ * \return the currently configured zoom factor, or 0. if the video is set
+ * to fit to the output window/drawable automatically.
+ */
+LIBVLC_API float libvlc_video_get_scale( libvlc_media_player_t *p_mi );
+
+/**
+ * Set the video scaling factor. That is the ratio of the number of pixels on
+ * screen to the number of pixels in the original decoded video in each
+ * dimension. Zero is a special value; it will adjust the video to the output
+ * window/drawable (in windowed mode) or the entire screen.
+ *
+ * Note that not all video outputs support scaling.
+ *
+ * \param p_mi the media player
+ * \param f_factor the scaling factor, or zero
+ */
+LIBVLC_API void libvlc_video_set_scale( libvlc_media_player_t *p_mi, float f_factor );
+
+/**
+ * Get current video aspect ratio.
+ *
+ * \param p_mi the media player
+ * \return the video aspect ratio or NULL if unspecified
+ * (the result must be released with free() or libvlc_free()).
+ */
+LIBVLC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi );
+
+/**
+ * Set new video aspect ratio.
+ *
+ * \param p_mi the media player
+ * \param psz_aspect new video aspect-ratio or NULL to reset to source aspect ratio
+ * \note Invalid aspect ratios are ignored.
+ */
+LIBVLC_API void libvlc_video_set_aspect_ratio( libvlc_media_player_t *p_mi, const char *psz_aspect );
+
+/**
+ * Get current video display fit mode.
+ *
+ * \version LibVLC 4.0.0 or later
+ *
+ * \param p_mi the media player
+ * \return the video display fit mode.
+ */
+LIBVLC_API libvlc_video_fit_mode_t libvlc_video_get_display_fit( libvlc_media_player_t *p_mi );
+
+/**
+ * Set new video display fit.
+ *
+ * \version LibVLC 4.0.0 or later
+ *
+ * \param p_mi the media player
+ * \param fit new display fit mode
+ * \note Invalid fit mode are ignored.
+ */
+LIBVLC_API void libvlc_video_set_display_fit( libvlc_media_player_t *p_mi, libvlc_video_fit_mode_t fit );
+
+/**
+ * Create a video viewpoint structure.
+ *
+ * \version LibVLC 3.0.0 and later
+ *
+ * \return video viewpoint or NULL
+ * (the result must be released with free()).
+ */
+LIBVLC_API libvlc_video_viewpoint_t *libvlc_video_new_viewpoint(void);
+
+/**
+ * Update the video viewpoint information.
+ *
+ * \note It is safe to call this function before the media player is started.
+ *
+ * \version LibVLC 3.0.0 and later
+ *
+ * \param p_mi the media player
+ * \param p_viewpoint video viewpoint allocated via libvlc_video_new_viewpoint()
+ * \param b_absolute if true replace the old viewpoint with the new one. If
+ * false, increase/decrease it.
+ * \return -1 in case of error, 0 otherwise
+ *
+ * \note the values are set asynchronously, it will be used by the next frame displayed.
+ */
+LIBVLC_API int libvlc_video_update_viewpoint( libvlc_media_player_t *p_mi,
+ const libvlc_video_viewpoint_t *p_viewpoint,
+ bool b_absolute);
+
+/**
+ * Video stereo modes
+ */
+typedef enum libvlc_video_stereo_mode_t {
+ libvlc_VideoStereoAuto = 0,
+ libvlc_VideoStereoStereo,
+ libvlc_VideoStereoLeftEye,
+ libvlc_VideoStereoRightEye,
+ libvlc_VideoStereoSideBySide,
+} libvlc_video_stereo_mode_t;
+
+/**
+ * Get current video stereo mode.
+ *
+ * \param p_mi the media player
+ * \return the video stereo mode.
+ */
+LIBVLC_API libvlc_video_stereo_mode_t libvlc_video_get_video_stereo_mode(
+ libvlc_media_player_t *p_mi );
+
+/**
+ * Set new video stereo mode.
+ *
+ * \param p_mi the media player
+ * \param i_mode new video stereo mode
+ */
+LIBVLC_API void libvlc_video_set_video_stereo_mode( libvlc_media_player_t *p_mi,
+ const libvlc_video_stereo_mode_t i_mode );
+
+/**
+ * Get the current subtitle delay. Positive values means subtitles are being
+ * displayed later, negative values earlier.
+ *
+ * \param p_mi media player
+ * \return time (in microseconds) the display of subtitles is being delayed
+ * \version LibVLC 2.0.0 or later
+ */
+LIBVLC_API int64_t libvlc_video_get_spu_delay( libvlc_media_player_t *p_mi );
+
+/**
+ * Get the current subtitle text scale
+ *
+ * The scale factor is expressed as a percentage of the default size, where
+ * 1.0 represents 100 percent.
+ *
+ * \param p_mi media player
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API float libvlc_video_get_spu_text_scale( libvlc_media_player_t *p_mi );
+
+/**
+ * Set the subtitle text scale.
+ *
+ * The scale factor is expressed as a percentage of the default size, where
+ * 1.0 represents 100 percent.
+ *
+ * A value of 0.5 would result in text half the normal size, and a value of 2.0
+ * would result in text twice the normal size.
+ *
+ * The minimum acceptable value for the scale factor is 0.1.
+ *
+ * The maximum is 5.0 (five times normal size).
+ *
+ * \param p_mi media player
+ * \param f_scale scale factor in the range [0.1;5.0] (default: 1.0)
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API void libvlc_video_set_spu_text_scale( libvlc_media_player_t *p_mi, float f_scale );
+
+/**
+ * Set the subtitle delay. This affects the timing of when the subtitle will
+ * be displayed. Positive values result in subtitles being displayed later,
+ * while negative values will result in subtitles being displayed earlier.
+ *
+ * The subtitle delay will be reset to zero each time the media changes.
+ *
+ * \param p_mi media player
+ * \param i_delay time (in microseconds) the display of subtitles should be delayed
+ * \return 0 on success, -1 on error
+ * \version LibVLC 2.0.0 or later
+ */
+LIBVLC_API int libvlc_video_set_spu_delay( libvlc_media_player_t *p_mi, int64_t i_delay );
+
+/**
+ * Get the full description of available titles
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param p_mi the media player
+ * \param[out] titles address to store an allocated array of title descriptions
+ * descriptions (must be freed with libvlc_title_descriptions_release()
+ * by the caller)
+ *
+ * \return the number of titles (-1 on error)
+ */
+LIBVLC_API int libvlc_media_player_get_full_title_descriptions( libvlc_media_player_t *p_mi,
+ libvlc_title_description_t ***titles );
+
+/**
+ * Release a title description
+ *
+ * \version LibVLC 3.0.0 and later
+ *
+ * \param p_titles title description array to release
+ * \param i_count number of title descriptions to release
+ */
+LIBVLC_API
+ void libvlc_title_descriptions_release( libvlc_title_description_t **p_titles,
+ unsigned i_count );
+
+/**
+ * Get the full description of available chapters
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param p_mi the media player
+ * \param i_chapters_of_title index of the title to query for chapters (uses current title if set to -1)
+ * \param[out] pp_chapters address to store an allocated array of chapter descriptions
+ * descriptions (must be freed with libvlc_chapter_descriptions_release()
+ * by the caller)
+ *
+ * \return the number of chapters (-1 on error)
+ */
+LIBVLC_API int libvlc_media_player_get_full_chapter_descriptions( libvlc_media_player_t *p_mi,
+ int i_chapters_of_title,
+ libvlc_chapter_description_t *** pp_chapters );
+
+/**
+ * Release a chapter description
+ *
+ * \version LibVLC 3.0.0 and later
+ *
+ * \param p_chapters chapter description array to release
+ * \param i_count number of chapter descriptions to release
+ */
+LIBVLC_API
+void libvlc_chapter_descriptions_release( libvlc_chapter_description_t **p_chapters,
+ unsigned i_count );
+
+/**
+ * Set/unset the video crop ratio.
+ *
+ * This function forces a crop ratio on any and all video tracks rendered by
+ * the media player. If the display aspect ratio of a video does not match the
+ * crop ratio, either the top and bottom, or the left and right of the video
+ * will be cut out to fit the crop ratio.
+ *
+ * For instance, a ratio of 1:1 will force the video to a square shape.
+ *
+ * To disable video crop, set a crop ratio with zero as denominator.
+ *
+ * A call to this function overrides any previous call to any of
+ * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
+ * libvlc_video_set_crop_window().
+ *
+ * \see libvlc_video_set_aspect_ratio()
+ *
+ * \param mp the media player
+ * \param num crop ratio numerator (ignored if denominator is 0)
+ * \param den crop ratio denominator (or 0 to unset the crop ratio)
+ *
+ * \version LibVLC 4.0.0 and later
+ */
+LIBVLC_API
+void libvlc_video_set_crop_ratio(libvlc_media_player_t *mp,
+ unsigned num, unsigned den);
+
+/**
+ * Set the video crop window.
+ *
+ * This function selects a sub-rectangle of video to show. Any pixels outside
+ * the rectangle will not be shown.
+ *
+ * To unset the video crop window, use libvlc_video_set_crop_ratio() or
+ * libvlc_video_set_crop_border().
+ *
+ * A call to this function overrides any previous call to any of
+ * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
+ * libvlc_video_set_crop_window().
+ *
+ * \param mp the media player
+ * \param x abscissa (i.e. leftmost sample column offset) of the crop window
+ * \param y ordinate (i.e. topmost sample row offset) of the crop window
+ * \param width sample width of the crop window (cannot be zero)
+ * \param height sample height of the crop window (cannot be zero)
+ *
+ * \version LibVLC 4.0.0 and later
+ */
+LIBVLC_API
+void libvlc_video_set_crop_window(libvlc_media_player_t *mp,
+ unsigned x, unsigned y,
+ unsigned width, unsigned height);
+
+/**
+ * Set the video crop borders.
+ *
+ * This function selects the size of video edges to be cropped out.
+ *
+ * To unset the video crop borders, set all borders to zero.
+ *
+ * A call to this function overrides any previous call to any of
+ * libvlc_video_set_crop_ratio(), libvlc_video_set_crop_border() and/or
+ * libvlc_video_set_crop_window().
+ *
+ * \param mp the media player
+ * \param left number of sample columns to crop on the left
+ * \param right number of sample columns to crop on the right
+ * \param top number of sample rows to crop on the top
+ * \param bottom number of sample rows to corp on the bottom
+ *
+ * \version LibVLC 4.0.0 and later
+ */
+LIBVLC_API
+void libvlc_video_set_crop_border(libvlc_media_player_t *mp,
+ unsigned left, unsigned right,
+ unsigned top, unsigned bottom);
+
+/**
+ * Get current teletext page requested or 0 if it's disabled.
+ *
+ * Teletext is disabled by default, call libvlc_video_set_teletext() to enable
+ * it.
+ *
+ * \param p_mi the media player
+ * \return the current teletext page requested.
+ */
+LIBVLC_API int libvlc_video_get_teletext( libvlc_media_player_t *p_mi );
+
+/**
+ * Set new teletext page to retrieve.
+ *
+ * This function can also be used to send a teletext key.
+ *
+ * \param p_mi the media player
+ * \param i_page teletex page number requested. This value can be 0 to disable
+ * teletext, a number in the range ]0;1000[ to show the requested page, or a
+ * \ref libvlc_teletext_key_t. 100 is the default teletext page.
+ */
+LIBVLC_API void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page );
+
+/**
+ * Set teletext background transparency.
+ *
+ * \param p_mi the media player
+ * \param transparent whether background should be transparent.
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API void libvlc_video_set_teletext_transparency( libvlc_media_player_t *p_mi, bool transparent );
+
+/**
+ * Get teletext background transparency.
+ *
+ * \param p_mi the media player
+ * \retval true teletext has transparent background
+ * \retval false teletext has opaque background
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API bool libvlc_video_get_teletext_transparency( libvlc_media_player_t *p_mi );
+
+/**
+ * Take a snapshot of the current video window.
+ *
+ * If i_width AND i_height is 0, original size is used.
+ * If i_width XOR i_height is 0, original aspect-ratio is preserved.
+ *
+ * \param p_mi media player instance
+ * \param num number of video output (typically 0 for the first/only one)
+ * \param psz_filepath the path of a file or a folder to save the screenshot into
+ * \param i_width the snapshot's width
+ * \param i_height the snapshot's height
+ * \return 0 on success, -1 if the video was not found
+ */
+LIBVLC_API
+int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,
+ const char *psz_filepath, unsigned int i_width,
+ unsigned int i_height );
+
+/**
+ * Enable or disable deinterlace filter
+ *
+ * \param p_mi libvlc media player
+ * \param deinterlace state -1: auto (default), 0: disabled, 1: enabled
+ * \param psz_mode type of deinterlace filter, NULL for current/default filter
+ * \version LibVLC 4.0.0 and later
+ */
+LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
+ int deinterlace,
+ const char *psz_mode );
+
+/**
+ * Get an integer marquee option value
+ *
+ * \param p_mi libvlc media player
+ * \param option marq option to get \see libvlc_video_marquee_option_t
+ */
+LIBVLC_API int libvlc_video_get_marquee_int( libvlc_media_player_t *p_mi,
+ unsigned option );
+
+/**
+ * Enable, disable or set an integer marquee option
+ *
+ * Setting libvlc_marquee_Enable has the side effect of enabling (arg !0)
+ * or disabling (arg 0) the marq filter.
+ *
+ * \param p_mi libvlc media player
+ * \param option marq option to set \see libvlc_video_marquee_option_t
+ * \param i_val marq option value
+ */
+LIBVLC_API void libvlc_video_set_marquee_int( libvlc_media_player_t *p_mi,
+ unsigned option, int i_val );
+
+/**
+ * Set a marquee string option
+ *
+ * \param p_mi libvlc media player
+ * \param option marq option to set \see libvlc_video_marquee_option_t
+ * \param psz_text marq option value
+ */
+LIBVLC_API void libvlc_video_set_marquee_string( libvlc_media_player_t *p_mi,
+ unsigned option, const char *psz_text );
+
+/** option values for libvlc_video_{get,set}_logo_{int,string} */
+enum libvlc_video_logo_option_t {
+ libvlc_logo_enable,
+ libvlc_logo_file, /**< string argument, "file,d,t;file,d,t;..." */
+ libvlc_logo_x,
+ libvlc_logo_y,
+ libvlc_logo_delay,
+ libvlc_logo_repeat,
+ libvlc_logo_opacity,
+ libvlc_logo_position
+};
+
+/**
+ * Get integer logo option.
+ *
+ * \param p_mi libvlc media player instance
+ * \param option logo option to get, values of libvlc_video_logo_option_t
+ */
+LIBVLC_API int libvlc_video_get_logo_int( libvlc_media_player_t *p_mi,
+ unsigned option );
+
+/**
+ * Set logo option as integer. Options that take a different type value
+ * are ignored.
+ * Passing libvlc_logo_enable as option value has the side effect of
+ * starting (arg !0) or stopping (arg 0) the logo filter.
+ *
+ * \param p_mi libvlc media player instance
+ * \param option logo option to set, values of libvlc_video_logo_option_t
+ * \param value logo option value
+ */
+LIBVLC_API void libvlc_video_set_logo_int( libvlc_media_player_t *p_mi,
+ unsigned option, int value );
+
+/**
+ * Set logo option as string. Options that take a different type value
+ * are ignored.
+ *
+ * \param p_mi libvlc media player instance
+ * \param option logo option to set, values of libvlc_video_logo_option_t
+ * \param psz_value logo option value
+ */
+LIBVLC_API void libvlc_video_set_logo_string( libvlc_media_player_t *p_mi,
+ unsigned option, const char *psz_value );
+
+
+/** option values for libvlc_video_{get,set}_adjust_{int,float,bool} */
+enum libvlc_video_adjust_option_t {
+ libvlc_adjust_Enable = 0,
+ libvlc_adjust_Contrast,
+ libvlc_adjust_Brightness,
+ libvlc_adjust_Hue,
+ libvlc_adjust_Saturation,
+ libvlc_adjust_Gamma
+};
+
+/**
+ * Get integer adjust option.
+ *
+ * \param p_mi libvlc media player instance
+ * \param option adjust option to get, values of libvlc_video_adjust_option_t
+ * \version LibVLC 1.1.1 and later.
+ */
+LIBVLC_API int libvlc_video_get_adjust_int( libvlc_media_player_t *p_mi,
+ unsigned option );
+
+/**
+ * Set adjust option as integer. Options that take a different type value
+ * are ignored.
+ * Passing libvlc_adjust_enable as option value has the side effect of
+ * starting (arg !0) or stopping (arg 0) the adjust filter.
+ *
+ * \param p_mi libvlc media player instance
+ * \param option adjust option to set, values of libvlc_video_adjust_option_t
+ * \param value adjust option value
+ * \version LibVLC 1.1.1 and later.
+ */
+LIBVLC_API void libvlc_video_set_adjust_int( libvlc_media_player_t *p_mi,
+ unsigned option, int value );
+
+/**
+ * Get float adjust option.
+ *
+ * \param p_mi libvlc media player instance
+ * \param option adjust option to get, values of libvlc_video_adjust_option_t
+ * \version LibVLC 1.1.1 and later.
+ */
+LIBVLC_API float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
+ unsigned option );
+
+/**
+ * Set adjust option as float. Options that take a different type value
+ * are ignored.
+ *
+ * \param p_mi libvlc media player instance
+ * \param option adjust option to set, values of libvlc_video_adjust_option_t
+ * \param value adjust option value
+ * \version LibVLC 1.1.1 and later.
+ */
+LIBVLC_API void libvlc_video_set_adjust_float( libvlc_media_player_t *p_mi,
+ unsigned option, float value );
+/**
+ * Change the projection mode used for rendering the source.
+ *
+ * This changes how the source is mapped to the output w.r.t. 360 playback.
+ *
+ * \param p_mi libvlc media player instance
+ * \param projection_mode the considered projection mode for the source
+ * \version LibVLC 4.0.0 and later.
+ */
+LIBVLC_API void
+libvlc_video_set_projection_mode(libvlc_media_player_t *player,
+ libvlc_video_projection_t projection_mode);
+
+/**
+ * Remove previously set projection mode.
+ *
+ * Remove the effects from previous call to libvlc_video_set_projection_mode.
+ *
+ * \param p_mi libvlc media player instance
+ * \version LibVLC 4.0.0 and later.
+ */
+LIBVLC_API void
+libvlc_video_unset_projection_mode(libvlc_media_player_t *player);
+
+/** @} video */
+
+/** \defgroup libvlc_audio LibVLC audio controls
+ * @{
+ */
+
+/**
+ * Audio stereo modes
+ */
+typedef enum libvlc_audio_output_stereomode_t {
+ libvlc_AudioStereoMode_Unset = 0,
+ libvlc_AudioStereoMode_Stereo = 1,
+ libvlc_AudioStereoMode_RStereo = 2,
+ libvlc_AudioStereoMode_Left = 3,
+ libvlc_AudioStereoMode_Right = 4,
+ libvlc_AudioStereoMode_Dolbys = 5,
+ libvlc_AudioStereoMode_Mono = 7,
+} libvlc_audio_output_stereomode_t;
+
+/**
+ * Audio mix modes
+ */
+typedef enum libvlc_audio_output_mixmode_t {
+ libvlc_AudioMixMode_Unset = 0,
+ libvlc_AudioMixMode_Stereo = 1,
+ libvlc_AudioMixMode_Binaural = 2,
+ libvlc_AudioMixMode_4_0 = 3,
+ libvlc_AudioMixMode_5_1 = 4,
+ libvlc_AudioMixMode_7_1 = 5,
+} libvlc_audio_output_mixmode_t;
+
+/**
+ * Gets the list of available audio output modules.
+ *
+ * \param p_instance libvlc instance
+ * \return list of available audio outputs. It must be freed with
+* \see libvlc_audio_output_list_release \see libvlc_audio_output_t .
+ * In case of error, NULL is returned.
+ */
+LIBVLC_API libvlc_audio_output_t *
+libvlc_audio_output_list_get( libvlc_instance_t *p_instance );
+
+/**
+ * Frees the list of available audio output modules.
+ *
+ * \param p_list list with audio outputs for release
+ */
+LIBVLC_API
+void libvlc_audio_output_list_release( libvlc_audio_output_t *p_list );
+
+/**
+ * Selects an audio output module.
+ * \note Any change will take be effect only after playback is stopped and
+ * restarted. Audio output cannot be changed while playing.
+ *
+ * \param p_mi media player
+ * \param psz_name name of audio output,
+ * use psz_name of \see libvlc_audio_output_t
+ * \return 0 if function succeeded, -1 on error
+ */
+LIBVLC_API int libvlc_audio_output_set( libvlc_media_player_t *p_mi,
+ const char *psz_name );
+
+/**
+ * Gets a list of potential audio output devices.
+ *
+ * See also libvlc_audio_output_device_set().
+ *
+ * \note Not all audio outputs support enumerating devices.
+ * The audio output may be functional even if the list is empty (NULL).
+ *
+ * \note The list may not be exhaustive.
+ *
+ * \warning Some audio output devices in the list might not actually work in
+ * some circumstances. By default, it is recommended to not specify any
+ * explicit audio device.
+ *
+ * \param mp media player
+ * \return A NULL-terminated linked list of potential audio output devices.
+ * It must be freed with libvlc_audio_output_device_list_release()
+ * \version LibVLC 2.2.0 or later.
+ */
+LIBVLC_API libvlc_audio_output_device_t *
+libvlc_audio_output_device_enum( libvlc_media_player_t *mp );
+
+#if defined (__GNUC__) && !defined (__clang__)
+__attribute__((unused))
+__attribute__((noinline))
+__attribute__((error("Use libvlc_audio_output_device_enum() instead")))
+static libvlc_audio_output_device_t *
+libvlc_audio_output_device_list_get( libvlc_instance_t *p_instance,
+ const char *aout )
+{
+ (void) p_instance; (void) aout;
+ return NULL;
+}
+#endif
+
+/**
+ * Frees a list of available audio output devices.
+ *
+ * \param p_list list with audio outputs for release
+ * \version LibVLC 2.1.0 or later.
+ */
+LIBVLC_API void libvlc_audio_output_device_list_release(
+ libvlc_audio_output_device_t *p_list );
+
+/**
+ * Configures an explicit audio output device.
+ *
+ * A list of adequate potential device strings can be obtained with
+ * libvlc_audio_output_device_enum().
+ *
+ * \note This function does not select the specified audio output plugin.
+ * libvlc_audio_output_set() is used for that purpose.
+ *
+ * \warning The syntax for the device parameter depends on the audio output.
+ *
+ * Some audio output modules require further parameters (e.g. a channels map
+ * in the case of ALSA).
+ *
+ * \version This function originally expected three parameters.
+ * The middle parameter was removed from LibVLC 4.0 onward.
+ *
+ * \param mp media player
+ * \param device_id device identifier string
+ * (see \ref libvlc_audio_output_device_t::psz_device)
+ *
+ * \return If the change of device was requested successfully, zero is returned
+ * (the actual change is asynchronous and not guaranteed to succeed).
+ * On error, a non-zero value is returned.
+ */
+LIBVLC_API int libvlc_audio_output_device_set( libvlc_media_player_t *mp,
+ const char *device_id );
+
+/**
+ * Get the current audio output device identifier.
+ *
+ * This complements libvlc_audio_output_device_set().
+ *
+ * \warning The initial value for the current audio output device identifier
+ * may not be set or may be some unknown value. A LibVLC application should
+ * compare this value against the known device identifiers (e.g. those that
+ * were previously retrieved by a call to libvlc_audio_output_device_enum) to
+ * find the current audio output device.
+ *
+ * It is possible that the selected audio output device changes (an external
+ * change) without a call to libvlc_audio_output_device_set. That may make this
+ * method unsuitable to use if a LibVLC application is attempting to track
+ * dynamic audio device changes as they happen.
+ *
+ * \param mp media player
+ * \return the current audio output device identifier
+ * NULL if no device is selected or in case of error
+ * (the result must be released with free()).
+ * \version LibVLC 3.0.0 or later.
+ */
+LIBVLC_API char *libvlc_audio_output_device_get( libvlc_media_player_t *mp );
+
+/**
+ * Toggle mute status.
+ *
+ * \param p_mi media player
+ * \warning Toggling mute atomically is not always possible: On some platforms,
+ * other processes can mute the VLC audio playback stream asynchronously. Thus,
+ * there is a small race condition where toggling will not work.
+ * See also the limitations of libvlc_audio_set_mute().
+ */
+LIBVLC_API void libvlc_audio_toggle_mute( libvlc_media_player_t *p_mi );
+
+/**
+ * Get current mute status.
+ *
+ * \param p_mi media player
+ * \return the mute status (boolean) if defined, -1 if undefined/unapplicable
+ */
+LIBVLC_API int libvlc_audio_get_mute( libvlc_media_player_t *p_mi );
+
+/**
+ * Set mute status.
+ *
+ * \param p_mi media player
+ * \param status If status is true then mute, otherwise unmute
+ * \warning This function does not always work. If there are no active audio
+ * playback stream, the mute status might not be available. If digital
+ * pass-through (S/PDIF, HDMI...) is in use, muting may be unapplicable. Also
+ * some audio output plugins do not support muting at all.
+ * \note To force silent playback, disable all audio tracks. This is more
+ * efficient and reliable than mute.
+ */
+LIBVLC_API void libvlc_audio_set_mute( libvlc_media_player_t *p_mi, int status );
+
+/**
+ * Get current software audio volume.
+ *
+ * \param p_mi media player
+ * \return the software volume in percents
+ * (0 = mute, 100 = nominal / 0dB)
+ */
+LIBVLC_API int libvlc_audio_get_volume( libvlc_media_player_t *p_mi );
+
+/**
+ * Set current software audio volume.
+ *
+ * \param p_mi media player
+ * \param i_volume the volume in percents (0 = mute, 100 = 0dB)
+ * \return 0 if the volume was set, -1 if it was out of range
+ */
+LIBVLC_API int libvlc_audio_set_volume( libvlc_media_player_t *p_mi, int i_volume );
+
+/**
+ * Get current audio stereo-mode.
+ *
+ * \param p_mi media player
+ * \return the audio stereo-mode, \see libvlc_audio_output_stereomode_t
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API libvlc_audio_output_stereomode_t libvlc_audio_get_stereomode( libvlc_media_player_t *p_mi );
+
+/**
+ * Set current audio stereo-mode.
+ *
+ * \param p_mi media player
+ * \param mode the audio stereo-mode, \see libvlc_audio_output_stereomode_t
+ * \return 0 on success, -1 on error
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API int libvlc_audio_set_stereomode( libvlc_media_player_t *p_mi,
+ libvlc_audio_output_stereomode_t mode );
+
+/**
+ * Get current audio mix-mode.
+ *
+ * \param p_mi media player
+ * \return the audio mix-mode, \see libvlc_audio_output_mixmode_t
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API libvlc_audio_output_mixmode_t libvlc_audio_get_mixmode( libvlc_media_player_t *p_mi );
+
+/**
+ * Set current audio mix-mode.
+ *
+ * By default (::libvlc_AudioMixMode_Unset), the audio output will keep its
+ * original channel configuration (play stereo as stereo, or 5.1 as 5.1). Yet,
+ * the OS and Audio API might refuse a channel configuration and asks VLC to
+ * adapt (Stereo played as 5.1 or vice-versa).
+ *
+ * This function allows to force a channel configuration, it will only work if
+ * the OS and Audio API accept this configuration (otherwise, it won't have any
+ * effects). Here are some examples:
+ * - Play multi-channels (5.1, 7.1...) as stereo (::libvlc_AudioMixMode_Stereo)
+ * - Play Stereo or 5.1 as 7.1 (::libvlc_AudioMixMode_7_1)
+ * - Play multi-channels as stereo with a binaural effect
+ * (::libvlc_AudioMixMode_Binaural). It might be selected automatically if the
+ * OS and Audio API can detect if a headphone is plugged.
+ *
+ * \param p_mi media player
+ * \param mode the audio mix-mode, \see libvlc_audio_output_mixmode_t
+ * \return 0 on success, -1 on error
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API int libvlc_audio_set_mixmode( libvlc_media_player_t *p_mi,
+ libvlc_audio_output_mixmode_t mode );
+
+
+/**
+ * Get current audio delay.
+ *
+ * \param p_mi media player
+ * \return the audio delay (microseconds)
+ * \version LibVLC 1.1.1 or later
+ */
+LIBVLC_API int64_t libvlc_audio_get_delay( libvlc_media_player_t *p_mi );
+
+/**
+ * Set current audio delay. The audio delay will be reset to zero each time the media changes.
+ *
+ * \param p_mi media player
+ * \param i_delay the audio delay (microseconds)
+ * \return 0 on success, -1 on error
+ * \version LibVLC 1.1.1 or later
+ */
+LIBVLC_API int libvlc_audio_set_delay( libvlc_media_player_t *p_mi, int64_t i_delay );
+
+/**
+ * Get the number of equalizer presets.
+ *
+ * \return number of presets
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API unsigned libvlc_audio_equalizer_get_preset_count( void );
+
+/**
+ * Get the name of a particular equalizer preset.
+ *
+ * This name can be used, for example, to prepare a preset label or menu in a user
+ * interface.
+ *
+ * \param u_index index of the preset, counting from zero
+ * \return preset name, or NULL if there is no such preset
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API const char *libvlc_audio_equalizer_get_preset_name( unsigned u_index );
+
+/**
+ * Get the number of distinct frequency bands for an equalizer.
+ *
+ * \return number of frequency bands
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API unsigned libvlc_audio_equalizer_get_band_count( void );
+
+/**
+ * Get a particular equalizer band frequency.
+ *
+ * This value can be used, for example, to create a label for an equalizer band control
+ * in a user interface.
+ *
+ * \param u_index index of the band, counting from zero
+ * \return equalizer band frequency (Hz), or -1 if there is no such band
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API float libvlc_audio_equalizer_get_band_frequency( unsigned u_index );
+
+/**
+ * Create a new default equalizer, with all frequency values zeroed.
+ *
+ * The new equalizer can subsequently be applied to a media player by invoking
+ * libvlc_media_player_set_equalizer().
+ *
+ * The returned handle should be freed via libvlc_audio_equalizer_release() when
+ * it is no longer needed.
+ *
+ * \return opaque equalizer handle, or NULL on error
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API libvlc_equalizer_t *libvlc_audio_equalizer_new( void );
+
+/**
+ * Create a new equalizer, with initial frequency values copied from an existing
+ * preset.
+ *
+ * The new equalizer can subsequently be applied to a media player by invoking
+ * libvlc_media_player_set_equalizer().
+ *
+ * The returned handle should be freed via libvlc_audio_equalizer_release() when
+ * it is no longer needed.
+ *
+ * \param u_index index of the preset, counting from zero
+ * \return opaque equalizer handle, or NULL on error
+ * (it must be released with libvlc_audio_equalizer_release())
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API libvlc_equalizer_t *libvlc_audio_equalizer_new_from_preset( unsigned u_index );
+
+/**
+ * Release a previously created equalizer instance.
+ *
+ * The equalizer was previously created by using libvlc_audio_equalizer_new() or
+ * libvlc_audio_equalizer_new_from_preset().
+ *
+ * It is safe to invoke this method with a NULL p_equalizer parameter for no effect.
+ *
+ * \param p_equalizer opaque equalizer handle, or NULL
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API void libvlc_audio_equalizer_release( libvlc_equalizer_t *p_equalizer );
+
+/**
+ * Set a new pre-amplification value for an equalizer.
+ *
+ * The new equalizer settings are subsequently applied to a media player by invoking
+ * libvlc_media_player_set_equalizer().
+ *
+ * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
+ *
+ * \param p_equalizer valid equalizer handle, must not be NULL
+ * \param f_preamp preamp value (-20.0 to 20.0 Hz)
+ * \return zero on success, -1 on error
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API int libvlc_audio_equalizer_set_preamp( libvlc_equalizer_t *p_equalizer, float f_preamp );
+
+/**
+ * Get the current pre-amplification value from an equalizer.
+ *
+ * \param p_equalizer valid equalizer handle, must not be NULL
+ * \return preamp value (Hz)
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API float libvlc_audio_equalizer_get_preamp( libvlc_equalizer_t *p_equalizer );
+
+/**
+ * Set a new amplification value for a particular equalizer frequency band.
+ *
+ * The new equalizer settings are subsequently applied to a media player by invoking
+ * libvlc_media_player_set_equalizer().
+ *
+ * The supplied amplification value will be clamped to the -20.0 to +20.0 range.
+ *
+ * \param p_equalizer valid equalizer handle, must not be NULL
+ * \param f_amp amplification value (-20.0 to 20.0 Hz)
+ * \param u_band index, counting from zero, of the frequency band to set
+ * \return zero on success, -1 on error
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API int libvlc_audio_equalizer_set_amp_at_index( libvlc_equalizer_t *p_equalizer, float f_amp, unsigned u_band );
+
+/**
+ * Get the amplification value for a particular equalizer frequency band.
+ *
+ * \param p_equalizer valid equalizer handle, must not be NULL
+ * \param u_band index, counting from zero, of the frequency band to get
+ * \return amplification value (Hz); NaN if there is no such frequency band
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API float libvlc_audio_equalizer_get_amp_at_index( libvlc_equalizer_t *p_equalizer, unsigned u_band );
+
+/**
+ * Apply new equalizer settings to a media player.
+ *
+ * The equalizer is first created by invoking libvlc_audio_equalizer_new() or
+ * libvlc_audio_equalizer_new_from_preset().
+ *
+ * It is possible to apply new equalizer settings to a media player whether the media
+ * player is currently playing media or not.
+ *
+ * Invoking this method will immediately apply the new equalizer settings to the audio
+ * output of the currently playing media if there is any.
+ *
+ * If there is no currently playing media, the new equalizer settings will be applied
+ * later if and when new media is played.
+ *
+ * Equalizer settings will automatically be applied to subsequently played media.
+ *
+ * To disable the equalizer for a media player invoke this method passing NULL for the
+ * p_equalizer parameter.
+ *
+ * The media player does not keep a reference to the supplied equalizer so it is safe
+ * for an application to release the equalizer reference any time after this method
+ * returns.
+ *
+ * \param p_mi opaque media player handle
+ * \param p_equalizer opaque equalizer handle, or NULL to disable the equalizer for this media player
+ * \return zero on success, -1 on error
+ * \version LibVLC 2.2.0 or later
+ */
+LIBVLC_API int libvlc_media_player_set_equalizer( libvlc_media_player_t *p_mi, libvlc_equalizer_t *p_equalizer );
+
+/**
+ * Media player roles.
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * See \ref libvlc_media_player_set_role()
+ */
+typedef enum libvlc_media_player_role {
+ libvlc_role_None = 0, /**< Don't use a media player role */
+ libvlc_role_Music, /**< Music (or radio) playback */
+ libvlc_role_Video, /**< Video playback */
+ libvlc_role_Communication, /**< Speech, real-time communication */
+ libvlc_role_Game, /**< Video game */
+ libvlc_role_Notification, /**< User interaction feedback */
+ libvlc_role_Animation, /**< Embedded animation (e.g. in web page) */
+ libvlc_role_Production, /**< Audio editing/production */
+ libvlc_role_Accessibility, /**< Accessibility */
+ libvlc_role_Test /** Testing */
+#define libvlc_role_Last libvlc_role_Test
+} libvlc_media_player_role_t;
+
+/**
+ * Gets the media role.
+ *
+ * \version LibVLC 3.0.0 and later.
+ *
+ * \param p_mi media player
+ * \return the media player role (\ref libvlc_media_player_role_t)
+ */
+LIBVLC_API int libvlc_media_player_get_role(libvlc_media_player_t *p_mi);
+
+/**
+ * Sets the media role.
+ *
+ * \param p_mi media player
+ * \param role the media player role (\ref libvlc_media_player_role_t)
+ * \return 0 on success, -1 on error
+ */
+LIBVLC_API int libvlc_media_player_set_role(libvlc_media_player_t *p_mi,
+ unsigned role);
+
+/**
+ * Start/stop recording
+ *
+ * \note The user should listen to the libvlc_MediaPlayerRecordChanged event,
+ * to monitor the recording state.
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param p_mi media player
+ * \param enable true to start recording, false to stop
+ * \param dir_path path of the recording directory or NULL (use default path),
+ * has only an effect when first enabling recording.
+ */
+LIBVLC_API void libvlc_media_player_record(libvlc_media_player_t *p_mi,
+ bool enable, const char *dir_path);
+
+/** @} audio */
+
+/** \defgroup libvlc_media_player_watch_time LibVLC media player time watch API
+ * @{
+ */
+
+/**
+ * Media Player timer point
+ *
+ * \note ts and system_date values should not be used directly by the user.
+ * libvlc_media_player_time_point_interpolate() will read these values and
+ * return an interpolated ts.
+ *
+ * @see libvlc_media_player_watch_time_on_update
+ */
+typedef struct libvlc_media_player_time_point_t
+{
+ /** Position in the range [0.0f;1.0] */
+ double position;
+ /** Rate of the player */
+ double rate;
+ /** Valid time, in us >= 0 or -1 */
+ int64_t ts_us;
+ /** Valid length, in us >= 1 or 0 */
+ int64_t length_us;
+ /**
+ * System date, in us, of this record (always valid).
+ * Based on libvlc_clock(). This date can be in the future or in the past.
+ * The special value of INT64_MAX mean that the clock was paused when this
+ * point was updated. In that case,
+ * libvlc_media_player_time_point_interpolate() will return the current
+ * ts/pos of this point (there is nothing to interpolate).
+ * */
+ int64_t system_date_us;
+} libvlc_media_player_time_point_t;
+
+/**
+ * Callback prototype that notify when the player state or time changed.
+ *
+ * Get notified when the time is updated by the input or output source. The
+ * input source is the 'demux' or the 'access_demux'. The output source are
+ * audio and video outputs: an update is received each time a video frame is
+ * displayed or an audio sample is written. The delay between each updates may
+ * depend on the input and source type (it can be every 5ms, 30ms, 1s or
+ * 10s...). Users of this timer may need to update the position at a higher
+ * frequency from their own mainloop via
+ * libvlc_media_player_time_point_interpolate().
+ *
+ * \warning It is forbidden to call any Media Player functions from here.
+ *
+ * \param value always valid, the time corresponding to the state
+ * \param data opaque pointer set by libvlc_media_player_watch_time()
+ */
+typedef void (*libvlc_media_player_watch_time_on_update)(
+ const libvlc_media_player_time_point_t *value, void *data);
+
+/**
+ * Callback prototype that notify when the timer is paused.
+ *
+ * This event is sent when the player is paused or stopping. The player
+ * user should stop its "interpolate" timer.
+ *
+ * \note libvlc_media_player_watch_time_on_update() can be called when paused
+ * for those 2 reasons:
+ * - playback is resumed (libvlc_media_player_time_point_t.system_date is valid)
+ * - a track, likely video (next-frame) is outputted when paused
+ * (libvlc_media_player_time_point_t.system_date = INT64_MAX)
+ *
+ * \warning It is forbidden to call any Media Player functions from here.
+ *
+ * \param system_date_us system date, in us, of this event, only valid (> 0)
+ * when paused. It can be used to interpolate the last updated point to this
+ * date in order to get the last paused ts/position.
+ * \param data opaque pointer set by libvlc_media_player_watch_time()
+ */
+typedef void (*libvlc_media_player_watch_time_on_paused)(
+ int64_t system_date_us, void *data);
+
+/**
+ * Callback prototype that notify when the player is seeking or finished
+ * seeking
+ *
+ * \warning It is forbidden to call any Media Player functions from here.
+ *
+ * \note It is not possible to receive points via on_update() while seeking.
+ *
+ * \param value point of the seek request or NULL when seeking is finished
+ * \param data opaque pointer set by libvlc_media_player_watch_time()
+ */
+typedef void (*libvlc_media_player_watch_time_on_seek)(
+ const libvlc_media_player_time_point_t *value, void *data);
+
+/**
+ * Watch for times updates
+ *
+ * \warning Only one watcher can be registered at a time. Calling this function
+ * a second time (if libvlc_media_player_unwatch_time() was not called
+ * in-between) will fail.
+ *
+ * \param p_mi the media player
+ * \param min_period_us corresponds to the minimum period, in us, between each
+ * updates, use it to avoid flood from too many source updates, set it to 0 to
+ * receive all updates.
+ * \param on_update callback to listen to update events (must not be NULL)
+ * \param on_paused callback to listen to paused events (can be NULL)
+ * \param on_seek callback to listen to seek events (can be NULL)
+ * \param cbs_data opaque pointer used by the callbacks
+ * \return 0 on success, -1 on error (allocation error, or if already watching)
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API int
+libvlc_media_player_watch_time(libvlc_media_player_t *p_mi,
+ int64_t min_period_us,
+ libvlc_media_player_watch_time_on_update on_update,
+ libvlc_media_player_watch_time_on_paused on_paused,
+ libvlc_media_player_watch_time_on_seek on_seek,
+ void *cbs_data);
+
+/**
+ * Unwatch time updates
+ *
+ * \param p_mi the media player
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API void
+libvlc_media_player_unwatch_time(libvlc_media_player_t *p_mi);
+
+/**
+ * Interpolate a timer value to now
+
+ * \param point time update obtained via the
+ * libvlc_media_player_watch_time_on_update() callback
+ * \param system_now_us current system date, in us, returned by libvlc_clock()
+ * \param out_ts_us pointer where to set the interpolated ts, in us
+ * \param out_pos pointer where to set the interpolated position
+ * \return 0 in case of success, -1 if the interpolated ts is negative (could
+ * happen during the buffering step)
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API int
+libvlc_media_player_time_point_interpolate(const libvlc_media_player_time_point_t *point,
+ int64_t system_now_us,
+ int64_t *out_ts_us, double *out_pos);
+
+/**
+ * Get the date of the next interval
+ *
+ * Can be used to setup an UI timer in order to update some widgets at specific
+ * interval. A next_interval of VLC_TICK_FROM_SEC(1) can be used to update a
+ * time widget when the media reaches a new second.
+ *
+ * \note The media time doesn't necessarily correspond to the system time, that
+ * is why this function is needed and uses the rate of the current point.
+ *
+ * \param point time update obtained via the
+ * libvlc_media_player_watch_time_on_update()
+ * \param system_now_us same system date used by
+ * libvlc_media_player_time_point_interpolate()
+ * \param interpolated_ts_us ts returned by
+ * libvlc_media_player_time_point_interpolate()
+ * \param next_interval_us next interval, in us
+ * \return the absolute system date, in us, of the next interval,
+ * use libvlc_delay() to get a relative delay.
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API int64_t
+libvlc_media_player_time_point_get_next_date(const libvlc_media_player_time_point_t *point,
+ int64_t system_now_us,
+ int64_t interpolated_ts_us,
+ int64_t next_interval_us);
+
+/** @} libvlc_media_player_watch_time */
+
+/** \defgroup libvlc_media_player_concurrency LibVLC media player concurrency API
+ * @{
+ */
+
+/**
+ * Lock the media_player internal lock
+
+ * The lock is recursive, so it's safe to use it multiple times from the same
+ * thread. You must call libvlc_media_player_unlock() the same number of times
+ * you called libvlc_media_player_lock().
+ *
+ * Locking is not mandatory before calling a libvlc_media_player_t function
+ * since they will automatically hold the lock internally.
+ *
+ * This lock can be used to synchronise user variables that interact with the
+ * libvlc_media_player_t or can be used to call several functions together.
+ *
+ * \param mp media player object
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API void libvlc_media_player_lock( libvlc_media_player_t *mp );
+
+/**
+ * Unlock the media_player internal lock
+ *
+ * \see libvlc_media_player_lock
+ *
+ * \param mp media player object locked using /ref libvlc_media_player_lock
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API void libvlc_media_player_unlock( libvlc_media_player_t *mp );
+
+/**
+ * Wait for an event to be signalled
+ *
+ * \note this is equivalent to pthread_cond_wait() with the
+ * libvlc_media_player_t internal mutex and condition variable. This function
+ * may spuriously wake up even without libvlc_media_player_signal() being
+ * called.
+ *
+ * \warning this function must not be called from any libvlc callbacks and
+ * events. The lock should be held only one time before waiting.
+ *
+ * \param mp media player object locked using /ref libvlc_media_player_lock
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API void libvlc_media_player_wait( libvlc_media_player_t *mp );
+
+/**
+ * Signal all threads waiting for a signalling event
+ *
+ * \note this is equivalent to pthread_cond_broadcast() with the
+ * libvlc_media_player_t internal condition variable.
+ *
+ * \param mp media player object locked using /ref libvlc_media_player_lock
+ * \version LibVLC 4.0.0 or later
+ */
+LIBVLC_API void libvlc_media_player_signal( libvlc_media_player_t *mp );
+
+/** @} libvlc_media_player_concurrency */
+
+/** @} media_player */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* VLC_LIBVLC_MEDIA_PLAYER_H */
diff --git a/Libs/vlc/libvlc_media_track.h b/Libs/vlc/libvlc_media_track.h
new file mode 100644
index 000000000..d44c12e5e
--- /dev/null
+++ b/Libs/vlc/libvlc_media_track.h
@@ -0,0 +1,212 @@
+/*****************************************************************************
+ * libvlc_media_track.h: libvlc external API
+ *****************************************************************************
+ * Copyright (C) 1998-2020 VLC authors and VideoLAN
+ *
+ * Authors: Clément Stenac
+ * Jean-Paul Saman
+ * Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_LIBVLC_MEDIA_TRACK_H
+#define VLC_LIBVLC_MEDIA_TRACK_H 1
+
+# include "libvlc_video.h"
+
+# ifdef __cplusplus
+extern "C" {
+# else
+# include
+# endif
+
+/** \defgroup libvlc_media_track LibVLC media track
+ * \ingroup libvlc
+ * @ref libvlc_media_track_t is an abstract representation of a media track.
+ * @{
+ * \file
+ * LibVLC media track
+ */
+
+typedef enum libvlc_track_type_t
+{
+ libvlc_track_unknown = -1,
+ libvlc_track_audio = 0,
+ libvlc_track_video = 1,
+ libvlc_track_text = 2
+} libvlc_track_type_t;
+
+typedef struct libvlc_audio_track_t
+{
+ unsigned i_channels;
+ unsigned i_rate;
+} libvlc_audio_track_t;
+
+/**
+ * Viewpoint
+ *
+ * \warning allocate using libvlc_video_new_viewpoint()
+ */
+typedef struct libvlc_video_viewpoint_t
+{
+ float f_yaw; /**< view point yaw in degrees ]-180;180] */
+ float f_pitch; /**< view point pitch in degrees ]-90;90] */
+ float f_roll; /**< view point roll in degrees ]-180;180] */
+ float f_field_of_view; /**< field of view in degrees ]0;180[ (default 80.)*/
+} libvlc_video_viewpoint_t;
+
+typedef struct libvlc_video_track_t
+{
+ unsigned i_height;
+ unsigned i_width;
+ unsigned i_sar_num;
+ unsigned i_sar_den;
+ unsigned i_frame_rate_num;
+ unsigned i_frame_rate_den;
+
+ libvlc_video_orient_t i_orientation;
+ libvlc_video_projection_t i_projection;
+ libvlc_video_viewpoint_t pose; /**< Initial view point */
+ libvlc_video_multiview_t i_multiview;
+} libvlc_video_track_t;
+
+typedef struct libvlc_subtitle_track_t
+{
+ char *psz_encoding;
+} libvlc_subtitle_track_t;
+
+typedef struct libvlc_media_track_t
+{
+ /* Codec fourcc */
+ uint32_t i_codec;
+ uint32_t i_original_fourcc;
+ int i_id; /* DEPRECATED: use psz_id */
+ libvlc_track_type_t i_type;
+
+ /* Codec specific */
+ int i_profile;
+ int i_level;
+
+ union {
+ libvlc_audio_track_t *audio;
+ libvlc_video_track_t *video;
+ libvlc_subtitle_track_t *subtitle;
+ };
+
+ unsigned int i_bitrate;
+ char *psz_language;
+ char *psz_description;
+
+ /** String identifier of track, can be used to save the track preference
+ * from an other LibVLC run */
+ const char *psz_id;
+ /** A string identifier is stable when it is certified to be the same
+ * across different playback instances for the same track. */
+ bool id_stable;
+ /** Name of the track, only valid when the track is fetch from a
+ * media_player */
+ char *psz_name;
+ /** true if the track is selected, only valid when the track is fetch from
+ * a media_player */
+ bool selected;
+
+} libvlc_media_track_t;
+
+/**
+ * Opaque struct containing a list of tracks
+ */
+typedef struct libvlc_media_tracklist_t libvlc_media_tracklist_t;
+
+/**
+ * Get the number of tracks in a tracklist
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param list valid tracklist
+ *
+ * \return number of tracks, or 0 if the list is empty
+ */
+LIBVLC_API size_t
+libvlc_media_tracklist_count( const libvlc_media_tracklist_t *list );
+
+/**
+ * Get a track at a specific index
+ *
+ * \warning The behaviour is undefined if the index is not valid.
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \param list valid tracklist
+ * \param index valid index in the range [0; count[
+ *
+ * \return a valid track (can't be NULL if libvlc_media_tracklist_count()
+ * returned a valid count)
+ */
+LIBVLC_API libvlc_media_track_t *
+libvlc_media_tracklist_at( libvlc_media_tracklist_t *list, size_t index );
+
+/**
+ * Release a tracklist
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \see libvlc_media_get_tracklist
+ * \see libvlc_media_player_get_tracklist
+ *
+ * \param list valid tracklist
+ */
+LIBVLC_API void
+libvlc_media_tracklist_delete( libvlc_media_tracklist_t *list );
+
+
+/**
+ * Hold a single track reference
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * This function can be used to hold a track from a tracklist. In that case,
+ * the track can outlive its tracklist.
+ *
+ * \param track valid track
+ * \return the same track, need to be released with libvlc_media_track_release()
+ */
+LIBVLC_API libvlc_media_track_t *
+libvlc_media_track_hold( libvlc_media_track_t *track );
+
+/**
+ * Release a single track
+ *
+ * \version LibVLC 4.0.0 and later.
+ *
+ * \warning Tracks from a tracklist are released alongside the list with
+ * libvlc_media_tracklist_delete().
+ *
+ * \note You only need to release tracks previously held with
+ * libvlc_media_track_hold() or returned by
+ * libvlc_media_player_get_selected_track() and
+ * libvlc_media_player_get_track_from_id()
+ *
+ * \param track valid track
+ */
+LIBVLC_API void
+libvlc_media_track_release( libvlc_media_track_t *track );
+/** @}*/
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* VLC_LIBVLC_MEDIA_TRACK_H */
diff --git a/Libs/vlc/libvlc_picture.h b/Libs/vlc/libvlc_picture.h
new file mode 100644
index 000000000..24e1d565d
--- /dev/null
+++ b/Libs/vlc/libvlc_picture.h
@@ -0,0 +1,151 @@
+/*****************************************************************************
+ * libvlc_picture.h: libvlc external API
+ *****************************************************************************
+ * Copyright (C) 2018 VLC authors and VideoLAN
+ *
+ * Authors: Hugo Beauzée-Luyssen
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_LIBVLC_PICTURE_H
+#define VLC_LIBVLC_PICTURE_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+typedef struct libvlc_picture_t libvlc_picture_t;
+typedef struct libvlc_picture_list_t libvlc_picture_list_t;
+
+typedef enum libvlc_picture_type_t
+{
+ libvlc_picture_Argb,
+ libvlc_picture_Png,
+ libvlc_picture_Jpg,
+ libvlc_picture_WebP,
+} libvlc_picture_type_t;
+
+/**
+ * Increment the reference count of this picture.
+ *
+ * \see libvlc_picture_release()
+ * \param pic A picture object
+ * \return the same object
+ */
+LIBVLC_API libvlc_picture_t *
+libvlc_picture_retain( libvlc_picture_t* pic );
+
+/**
+ * Decrement the reference count of this picture.
+ * When the reference count reaches 0, the picture will be released.
+ * The picture must not be accessed after calling this function.
+ *
+ * \see libvlc_picture_retain
+ * \param pic A picture object
+ */
+LIBVLC_API void
+libvlc_picture_release( libvlc_picture_t* pic );
+
+/**
+ * Saves this picture to a file. The image format is the same as the one
+ * returned by \link libvlc_picture_type \endlink
+ *
+ * \param pic A picture object
+ * \param path The path to the generated file
+ * \return 0 in case of success, -1 otherwise
+ */
+LIBVLC_API int
+libvlc_picture_save( const libvlc_picture_t* pic, const char* path );
+
+/**
+ * Returns the image internal buffer, including potential padding.
+ * The libvlc_picture_t owns the returned buffer, which must not be modified nor
+ * freed.
+ *
+ * \param pic A picture object
+ * \param size A pointer to a size_t that will hold the size of the buffer [required]
+ * \return A pointer to the internal buffer.
+ */
+LIBVLC_API const unsigned char*
+libvlc_picture_get_buffer( const libvlc_picture_t* pic, size_t *size );
+
+/**
+ * Returns the picture type
+ *
+ * \param pic A picture object
+ * \see libvlc_picture_type_t
+ */
+LIBVLC_API libvlc_picture_type_t
+libvlc_picture_type( const libvlc_picture_t* pic );
+
+/**
+ * Returns the image stride, ie. the number of bytes per line.
+ * This can only be called on images of type libvlc_picture_Argb
+ *
+ * \param pic A picture object
+ */
+LIBVLC_API unsigned int
+libvlc_picture_get_stride( const libvlc_picture_t* pic );
+
+/**
+ * Returns the width of the image in pixels
+ *
+ * \param pic A picture object
+ */
+LIBVLC_API unsigned int
+libvlc_picture_get_width( const libvlc_picture_t* pic );
+
+/**
+ * Returns the height of the image in pixels
+ *
+ * \param pic A picture object
+ */
+LIBVLC_API unsigned int
+libvlc_picture_get_height( const libvlc_picture_t* pic );
+
+/**
+ * Returns the time at which this picture was generated, in milliseconds
+ * \param pic A picture object
+ */
+LIBVLC_API libvlc_time_t
+libvlc_picture_get_time( const libvlc_picture_t* pic );
+
+/**
+ * Returns the number of pictures in the list
+ */
+LIBVLC_API size_t libvlc_picture_list_count( const libvlc_picture_list_t* list );
+
+/**
+ * Returns the picture at the provided index.
+ *
+ * If the index is out of bound, the result is undefined.
+ */
+LIBVLC_API libvlc_picture_t* libvlc_picture_list_at( const libvlc_picture_list_t* list,
+ size_t index );
+
+/**
+ * Destroys a picture list and releases the pictures it contains
+ * \param list The list to destroy
+ *
+ * Calling this function with a NULL list is safe and will return immediately
+ */
+LIBVLC_API void libvlc_picture_list_destroy( libvlc_picture_list_t* list );
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif // VLC_LIBVLC_PICTURE_H
diff --git a/Libs/vlc/libvlc_renderer_discoverer.h b/Libs/vlc/libvlc_renderer_discoverer.h
new file mode 100644
index 000000000..e63a8c9c2
--- /dev/null
+++ b/Libs/vlc/libvlc_renderer_discoverer.h
@@ -0,0 +1,255 @@
+/*****************************************************************************
+ * libvlc_renderer_discoverer.h: libvlc external API
+ *****************************************************************************
+ * Copyright © 2016 VLC authors and VideoLAN
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_LIBVLC_RENDERER_DISCOVERER_H
+#define VLC_LIBVLC_RENDERER_DISCOVERER_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/**
+ * @defgroup libvlc_renderer_discoverer LibVLC renderer discoverer
+ * @ingroup libvlc
+ * LibVLC renderer discoverer finds available renderers available on the local
+ * network
+ * @{
+ * @file
+ * LibVLC renderer discoverer external API
+ */
+
+typedef struct libvlc_renderer_discoverer_t libvlc_renderer_discoverer_t;
+
+/**
+ * Renderer discoverer description
+ *
+ * \see libvlc_renderer_discoverer_list_get()
+ */
+typedef struct libvlc_rd_description_t
+{
+ char *psz_name;
+ char *psz_longname;
+} libvlc_rd_description_t;
+
+/** The renderer can render audio */
+#define LIBVLC_RENDERER_CAN_AUDIO 0x0001
+/** The renderer can render video */
+#define LIBVLC_RENDERER_CAN_VIDEO 0x0002
+
+/**
+ * Renderer item
+ *
+ * This struct is passed by a @ref libvlc_event_t when a new renderer is added
+ * or deleted.
+ *
+ * An item is valid until the @ref libvlc_RendererDiscovererItemDeleted event
+ * is called with the same pointer.
+ *
+ * \see libvlc_renderer_discoverer_event_manager()
+ */
+typedef struct libvlc_renderer_item_t libvlc_renderer_item_t;
+
+
+/**
+ * Hold a renderer item, i.e. creates a new reference
+ *
+ * This functions need to called from the libvlc_RendererDiscovererItemAdded
+ * callback if the libvlc user wants to use this item after. (for display or
+ * for passing it to the mediaplayer for example).
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \return the current item
+ */
+LIBVLC_API libvlc_renderer_item_t *
+libvlc_renderer_item_hold(libvlc_renderer_item_t *p_item);
+
+/**
+ * Releases a renderer item, i.e. decrements its reference counter
+ *
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API void
+libvlc_renderer_item_release(libvlc_renderer_item_t *p_item);
+
+/**
+ * Get the human readable name of a renderer item
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \return the name of the item (can't be NULL, must *not* be freed)
+ */
+LIBVLC_API const char *
+libvlc_renderer_item_name(const libvlc_renderer_item_t *p_item);
+
+/**
+ * Get the type (not translated) of a renderer item. For now, the type can only
+ * be "chromecast" ("upnp", "airplay" may come later).
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \return the type of the item (can't be NULL, must *not* be freed)
+ */
+LIBVLC_API const char *
+libvlc_renderer_item_type(const libvlc_renderer_item_t *p_item);
+
+/**
+ * Get the icon uri of a renderer item
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \return the uri of the item's icon (can be NULL, must *not* be freed)
+ */
+LIBVLC_API const char *
+libvlc_renderer_item_icon_uri(const libvlc_renderer_item_t *p_item);
+
+/**
+ * Get the flags of a renderer item
+ *
+ * \see LIBVLC_RENDERER_CAN_AUDIO
+ * \see LIBVLC_RENDERER_CAN_VIDEO
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \return bitwise flag: capabilities of the renderer, see
+ */
+LIBVLC_API int
+libvlc_renderer_item_flags(const libvlc_renderer_item_t *p_item);
+
+/**
+ * Create a renderer discoverer object by name
+ *
+ * After this object is created, you should attach to events in order to be
+ * notified of the discoverer events.
+ *
+ * You need to call libvlc_renderer_discoverer_start() in order to start the
+ * discovery.
+ *
+ * \see libvlc_renderer_discoverer_event_manager()
+ * \see libvlc_renderer_discoverer_start()
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \param p_inst libvlc instance
+ * \param psz_name service name; use libvlc_renderer_discoverer_list_get() to
+ * get a list of the discoverer names available in this libVLC instance
+ * \return media discover object or NULL in case of error
+ */
+LIBVLC_API libvlc_renderer_discoverer_t *
+libvlc_renderer_discoverer_new( libvlc_instance_t *p_inst,
+ const char *psz_name );
+
+/**
+ * Release a renderer discoverer object
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \param p_rd renderer discoverer object
+ */
+LIBVLC_API void
+libvlc_renderer_discoverer_release( libvlc_renderer_discoverer_t *p_rd );
+
+/**
+ * Start renderer discovery
+ *
+ * To stop it, call libvlc_renderer_discoverer_stop() or
+ * libvlc_renderer_discoverer_release() directly.
+ *
+ * \see libvlc_renderer_discoverer_stop()
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \param p_rd renderer discoverer object
+ * \return -1 in case of error, 0 otherwise
+ */
+LIBVLC_API int
+libvlc_renderer_discoverer_start( libvlc_renderer_discoverer_t *p_rd );
+
+/**
+ * Stop renderer discovery.
+ *
+ * \see libvlc_renderer_discoverer_start()
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \param p_rd renderer discoverer object
+ */
+LIBVLC_API void
+libvlc_renderer_discoverer_stop( libvlc_renderer_discoverer_t *p_rd );
+
+/**
+ * Get the event manager of the renderer discoverer
+ *
+ * The possible events to attach are @ref libvlc_RendererDiscovererItemAdded
+ * and @ref libvlc_RendererDiscovererItemDeleted.
+ *
+ * The @ref libvlc_renderer_item_t struct passed to event callbacks is owned by
+ * VLC, users should take care of holding/releasing this struct for their
+ * internal usage.
+ *
+ * \see libvlc_event_t.u.renderer_discoverer_item_added.item
+ * \see libvlc_event_t.u.renderer_discoverer_item_removed.item
+ *
+ * \version LibVLC 3.0.0 or later
+ *
+ * \return a valid event manager (can't fail)
+ */
+LIBVLC_API libvlc_event_manager_t *
+libvlc_renderer_discoverer_event_manager( libvlc_renderer_discoverer_t *p_rd );
+
+/**
+ * Get media discoverer services
+ *
+ * \see libvlc_renderer_list_release()
+ *
+ * \version LibVLC 3.0.0 and later
+ *
+ * \param p_inst libvlc instance
+ * \param ppp_services address to store an allocated array of renderer
+ * discoverer services (must be freed with libvlc_renderer_list_release() by
+ * the caller) [OUT]
+ *
+ * \return the number of media discoverer services (0 on error)
+ */
+LIBVLC_API size_t
+libvlc_renderer_discoverer_list_get( libvlc_instance_t *p_inst,
+ libvlc_rd_description_t ***ppp_services );
+
+/**
+ * Release an array of media discoverer services
+ *
+ * \see libvlc_renderer_discoverer_list_get()
+ *
+ * \version LibVLC 3.0.0 and later
+ *
+ * \param pp_services array to release
+ * \param i_count number of elements in the array
+ */
+LIBVLC_API void
+libvlc_renderer_discoverer_list_release( libvlc_rd_description_t **pp_services,
+ size_t i_count );
+
+/** @} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/Libs/vlc/libvlc_version.h b/Libs/vlc/libvlc_version.h
new file mode 100644
index 000000000..a7fd2cddf
--- /dev/null
+++ b/Libs/vlc/libvlc_version.h
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * libvlc_version.h
+ *****************************************************************************
+ * Copyright (C) 2010 Rémi Denis-Courmont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+/**
+ * \file
+ * This file defines version macros for LibVLC.
+ * Those macros are primilarly intended for conditional (pre)compilation.
+ * To get the run-time LibVLC version, use libvlc_get_version() instead
+ * (the run-time version may be more recent than build-time one, thanks to
+ * backward binary compatibility).
+ *
+ * \version This header file is available in LibVLC 1.1.4 and higher.
+ */
+
+#ifndef LIBVLC_VERSION_H
+# define LIBVLC_VERSION_H 1
+
+/** LibVLC major version number */
+# define LIBVLC_VERSION_MAJOR (4)
+
+/** LibVLC minor version number */
+# define LIBVLC_VERSION_MINOR (0)
+
+/** LibVLC revision */
+# define LIBVLC_VERSION_REVISION (0)
+
+# define LIBVLC_VERSION_EXTRA (0)
+
+/** Makes a single integer from a LibVLC version numbers */
+# define LIBVLC_VERSION(maj,min,rev,extra) \
+ ((maj << 24) | (min << 16) | (rev << 8) | (extra))
+
+/** LibVLC full version as a single integer (for comparison) */
+# define LIBVLC_VERSION_INT \
+ LIBVLC_VERSION(LIBVLC_VERSION_MAJOR, LIBVLC_VERSION_MINOR, \
+ LIBVLC_VERSION_REVISION, LIBVLC_VERSION_EXTRA)
+
+
+/** LibVLC ABI major version number, updated when incompatible changes are added */
+# define LIBVLC_ABI_VERSION_MAJOR (12)
+
+/** LibVLC ABI minor version number, updated when compatible changes are added */
+# define LIBVLC_ABI_VERSION_MINOR (0)
+
+/** LibVLC ABI micro version number, updated with new releases */
+# define LIBVLC_ABI_VERSION_MICRO (0)
+
+/** LibVLC full ABI version combining the major VLC version and the .so version:
+ * - A 0xFF000000 mask gives the VLC major version,
+ * - A 0x00FF0000 mask gives the LibVLC major ABI version,
+ * - A 0x0000FF00 mask gives the LibVLC minor ABI version,
+ * - A 0x000000FF mask gives the LibVLC ABI revision.
+ *
+ * LibVLC is considered compatible with your code if the VLC major and LibVLC
+ * major values are equal and the minor ABI version is equal or higher than the
+ * value you compiled with.
+ */
+# define LIBVLC_ABI_VERSION_INT \
+ LIBVLC_VERSION(LIBVLC_VERSION_MAJOR, LIBVLC_ABI_VERSION_MAJOR, \
+ LIBVLC_ABI_VERSION_MINOR, LIBVLC_ABI_VERSION_MICRO )
+
+#endif
diff --git a/Libs/vlc/libvlc_video.h b/Libs/vlc/libvlc_video.h
new file mode 100644
index 000000000..afe2b45a7
--- /dev/null
+++ b/Libs/vlc/libvlc_video.h
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * libvlc_video.h: libvlc video-related enumerations
+ *****************************************************************************
+ * Copyright (C) 1998-2010 VLC authors and VideoLAN
+ * Copyright (C) 2023 Videolabs
+ *
+ * Authors: Filippo Carone
+ * Pierre d'Herbemont
+ * Alexandre Janniaux
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+#ifndef VLC_LIBVLC_VIDEO_H
+#define VLC_LIBVLC_VIDEO_H 1
+
+# ifdef __cplusplus
+extern "C"{
+# endif
+
+typedef enum libvlc_video_orient_t
+{
+ libvlc_video_orient_top_left, /**< Normal. Top line represents top, left column left. */
+ libvlc_video_orient_top_right, /**< Flipped horizontally */
+ libvlc_video_orient_bottom_left, /**< Flipped vertically */
+ libvlc_video_orient_bottom_right, /**< Rotated 180 degrees */
+ libvlc_video_orient_left_top, /**< Transposed */
+ libvlc_video_orient_left_bottom, /**< Rotated 90 degrees clockwise (or 270 anti-clockwise) */
+ libvlc_video_orient_right_top, /**< Rotated 90 degrees anti-clockwise */
+ libvlc_video_orient_right_bottom /**< Anti-transposed */
+} libvlc_video_orient_t;
+
+typedef enum libvlc_video_projection_t
+{
+ libvlc_video_projection_rectangular,
+ libvlc_video_projection_equirectangular, /**< 360 spherical */
+
+ libvlc_video_projection_cubemap_layout_standard = 0x100,
+} libvlc_video_projection_t;
+
+typedef enum libvlc_video_multiview_t
+{
+ libvlc_video_multiview_2d, /**< No stereoscopy: 2D picture. */
+ libvlc_video_multiview_stereo_sbs, /**< Side-by-side */
+ libvlc_video_multiview_stereo_tb, /**< Top-bottom */
+ libvlc_video_multiview_stereo_row, /**< Row sequential */
+ libvlc_video_multiview_stereo_col, /**< Column sequential */
+ libvlc_video_multiview_stereo_frame, /**< Frame sequential */
+ libvlc_video_multiview_stereo_checkerboard, /**< Checkerboard pattern */
+} libvlc_video_multiview_t;
+
+# ifdef __cplusplus
+} // extern "C"
+# endif
+
+#endif
diff --git a/Libs/vlc/vlc.h b/Libs/vlc/vlc.h
new file mode 100644
index 000000000..1413d9b1b
--- /dev/null
+++ b/Libs/vlc/vlc.h
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * vlc.h: global header for libvlc
+ *****************************************************************************
+ * Copyright (C) 1998-2008 VLC authors and VideoLAN
+ *
+ * Authors: Vincent Seguin
+ * Samuel Hocevar
+ * Gildas Bazin
+ * Derk-Jan Hartman
+ * Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_VLC_H
+#define VLC_VLC_H 1
+
+/**
+ * \file
+ * This file defines libvlc new external API
+ */
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+#include "libvlc.h"
+#include "libvlc_renderer_discoverer.h"
+#include "libvlc_picture.h"
+#include "libvlc_media.h"
+#include "libvlc_media_player.h"
+#include "libvlc_media_list.h"
+#include "libvlc_media_list_player.h"
+#include "libvlc_media_discoverer.h"
+#include "libvlc_events.h"
+#include "libvlc_dialog.h"
+#include "libvlc_version.h"
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* _VLC_VLC_H */
diff --git a/Libs/vlc/x64/libvlc.dll b/Libs/vlc/x64/libvlc.dll
new file mode 100644
index 0000000000000000000000000000000000000000..f66e2b5a4fdd589d410b1aae3a6a65116fd70da1
GIT binary patch
literal 170496
zcmeZ`s$gJbU|?WjKm`t{T&%nb1_lN``CWVrTR6`u?qKves~D1zS*%b{l%HOdn5&SS
zn3tDdqL7rTP*j?ykeR38;vcM#o1c=Zr^3Jx;L5;|(#FZKJo9xr!we>{`5zdR6u6oA
z7#NN*GBBJ23o$GZWME(r0J9xH?gX=$7#P^VLI|3Hff?=zCWZt?m?p4#uv&;A2tGu`
z4`C*TI6Vf2FefI40Fb&1Obi?x3=9klm>6PYKmt(wfQjJ_h}pozfGi9W0^t*UObi+z
z1{yZ-Vq)lEM-xQi>XoEclrS(b96JhiGRW^}k)goAkf2wTl30?+z_4N#0|UbYMh1pC
z3=9mXz##%R&4GczK`*H^Gbbf8B?Tnfz{J1+3feRf0TO^M}6Y
z9ndR)C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