diff --git a/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj b/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj
new file mode 100644
index 0000000..e12d302
--- /dev/null
+++ b/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj
@@ -0,0 +1,86 @@
+
+
+
+
+ Debug
+ PSVita
+
+
+ Release
+ PSVita
+
+
+
+
+
+
+
+ {D9477093-D1DF-4A70-B333-C114DDF9EC04}
+
+
+
+ DynamicLibrary
+
+
+ DynamicLibrary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions);
+ Level3
+ NotUsing
+ $(SCE_PSP2_SDK_DIR)\target\include\vdsuite\user;$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\common;%(AdditionalIncludeDirectories)
+ Cpp11
+
+
+ $(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;%(AdditionalLibraryDirectories)
+ -lScePafStdc_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lSceLibKernel_stub;-lSceAppMgrUser_stub;-ltaihen_stub;-lsnc;%(AdditionalDependencies)
+ StripSymsAndDebug
+ --no-standard-libraries
+ StripFuncsAndData
+ true
+
+
+ "$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubprx.exe" --strip --compress "$(LocalDebuggerCommand)" "$(OutDir)download_enabler_empva.suprx"
+copy /Y "$(OutDir)download_enabler_empva.suprx" "$(SolutionDir)\ElevenMPV-A\CONTENTS\module\download_enabler_empva.suprx"
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions);
+ true
+ NotUsing
+ $(SCE_PSP2_SDK_DIR)\target\include\vdsuite\user;$(SCE_PSP2_SDK_DIR)\target\include\vdsuite\common;%(AdditionalIncludeDirectories)
+ Cpp11
+
+
+ $(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;%(AdditionalLibraryDirectories)
+ -lScePafStdc_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lSceLibKernel_stub;-lSceAppMgrUser_stub;-ltaihen_stub;-lsnc;%(AdditionalDependencies)
+ --no-standard-libraries
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj.filters b/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj.filters
new file mode 100644
index 0000000..67de2f6
--- /dev/null
+++ b/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj.filters
@@ -0,0 +1,21 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cxx;cc;s;asm
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hpp
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj.user b/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj.user
new file mode 100644
index 0000000..be25078
--- /dev/null
+++ b/ElevenMPV-A-DE/ElevenMPV-A-DE.vcxproj.user
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/ElevenMPV-A-DE/download_enabler.cpp b/ElevenMPV-A-DE/download_enabler.cpp
new file mode 100644
index 0000000..c864528
--- /dev/null
+++ b/ElevenMPV-A-DE/download_enabler.cpp
@@ -0,0 +1,193 @@
+/*
+ VitaTweaks: Download Enabler
+ Copyright (C) 2018, TheFloW
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+#include
+#include
+#include
+
+using namespace paf;
+
+static tai_hook_ref_t ExportFileRef;
+static tai_hook_ref_t GetFileTypeRef;
+
+static SceUID hooks[3];
+
+static SceInt32 ExportFilePatched(uint32_t *data)
+{
+ int res = TAI_NEXT(ExportFilePatched, ExportFileRef, data);
+
+ if (res == 0x80101A09) {
+ char download_path[1024];
+ char bgdl_path[1024];
+ char file_name[256];
+ char short_name[256];
+ uint16_t url_length = 0;
+ uint32_t count = 0;
+
+ uint32_t num = *(uint32_t *)data[0];
+
+ sce_paf_snprintf(bgdl_path, sizeof(bgdl_path), "ux0:bgdl/t/%08x/d0.pdb", num);
+
+ SceUID fd = sceIoOpen(bgdl_path, SCE_O_RDONLY, 0);
+ if (fd < 0)
+ return fd;
+
+ sceIoPread(fd, &url_length, sizeof(uint16_t), 0xD6);
+ sceIoPread(fd, file_name, sizeof(file_name), 0xF7 + url_length);
+ sceIoClose(fd);
+
+ sce_paf_snprintf(bgdl_path, sizeof(bgdl_path), "ux0:bgdl/t/%08x/%s", num, file_name);
+
+ char *ext = sce_paf_strrchr(file_name, '.');
+
+ if (!ext || sce_paf_strcmp(ext, ".webmyt")) {
+ return 0x80101A09;
+ }
+
+ ext[5] = '\0';
+ int len = ext - file_name;
+ if (len > sizeof(short_name) - 1)
+ len = sizeof(short_name) - 1;
+ sce_paf_strncpy(short_name, file_name, len);
+ short_name[len] = '\0';
+
+ while (1) {
+ if (count == 0)
+ sce_paf_snprintf(download_path, sizeof(download_path), "ux0:empva_download/%s", file_name);
+ else
+ sce_paf_snprintf(download_path, sizeof(download_path), "ux0:empva_download/%s (%d)%s", short_name, count, ext);
+
+ if (!io::Misc::Exists(download_path))
+ break;
+
+ count++;
+ }
+
+ res = io::Misc::MkdirRWSYS("ux0:empva_download");
+ if (res < 0 && res != 0x80010011)
+ return res;
+
+ return io::Misc::Rename(bgdl_path, download_path);
+ }
+
+ return res;
+}
+
+static SceInt32 GetFileTypePatched(int unk, int *type, char **filename, char **mime_type)
+{
+ int res = TAI_NEXT(GetFileTypePatched, GetFileTypeRef, unk, type, filename, mime_type);
+
+ if (res == 0x80103A21) {
+ *type = 1; // Type photo
+ return 0;
+ }
+
+ return res;
+}
+
+extern "C" {
+
+ #include
+
+ SCE_MODULE_INFO(ElevenMPV_A_DE, 2, 1, 1)
+
+ int module_start(SceSize args, const void * argp)
+ {
+ tai_module_info_t info;
+ info.size = sizeof(info);
+ if (taiGetModuleInfo("SceShell", &info) >= 0) {
+ switch (info.module_nid) {
+ case 0x0552F692: // 3.60 retail
+ {
+ hooks[0] = taiInjectData(info.modid, 0, 0x50A4A8, "GET", 4);
+ hooks[1] = taiHookFunctionOffset(&ExportFileRef, info.modid, 0, 0x1163F6, 1, ExportFilePatched);
+ hooks[2] = taiHookFunctionOffset(&GetFileTypeRef, info.modid, 0, 0x11B5E4, 1, GetFileTypePatched);
+ break;
+ }
+
+ case 0x6CB01295: // 3.60 PDEL
+ {
+ hooks[0] = taiInjectData(info.modid, 0, 0x4F9A18, "GET", 4);
+ hooks[1] = taiHookFunctionOffset(&ExportFileRef, info.modid, 0, 0x111D5A, 1, ExportFilePatched);
+ hooks[2] = taiHookFunctionOffset(&GetFileTypeRef, info.modid, 0, 0x116F48, 1, GetFileTypePatched);
+ break;
+ }
+
+ case 0xEAB89D5C: // 3.60 PTEL
+ {
+ hooks[0] = taiInjectData(info.modid, 0, 0x4FEBF8, "GET", 4);
+ hooks[1] = taiHookFunctionOffset(&ExportFileRef, info.modid, 0, 0x112756, 1, ExportFilePatched);
+ hooks[2] = taiHookFunctionOffset(&GetFileTypeRef, info.modid, 0, 0x117944, 1, GetFileTypePatched);
+ break;
+ }
+
+ case 0x5549BF1F: // 3.65 retail
+ case 0x34B4D82E: // 3.67 retail
+ case 0x12DAC0F3: // 3.68 retail
+ {
+ hooks[0] = taiInjectData(info.modid, 0, 0x50A9E8, "GET", 4);
+ hooks[1] = taiHookFunctionOffset(&ExportFileRef, info.modid, 0, 0x11644E, 1, ExportFilePatched);
+ hooks[2] = taiHookFunctionOffset(&GetFileTypeRef, info.modid, 0, 0x11B63C, 1, GetFileTypePatched);
+ break;
+ }
+
+ case 0x0703C828: // 3.69 retail
+ case 0x2053B5A5: // 3.70 retail
+ case 0xF476E785: // 3.71 retail
+ case 0x939FFBE9: // 3.72 retail
+ case 0x734D476A: // 3.73 retail
+ {
+ hooks[0] = taiInjectData(info.modid, 0, 0x50AA28, "GET", 4);
+ hooks[1] = taiHookFunctionOffset(&ExportFileRef, info.modid, 0, 0x11644E, 1, ExportFilePatched);
+ hooks[2] = taiHookFunctionOffset(&GetFileTypeRef, info.modid, 0, 0x11B63C, 1, GetFileTypePatched);
+ break;
+ }
+
+ case 0xE6A02F2B: // 3.65 PDEL
+ {
+ hooks[0] = taiInjectData(info.modid, 0, 0x4F9F58, "GET", 4);
+ hooks[1] = taiHookFunctionOffset(&ExportFileRef, info.modid, 0, 0x111DB2, 1, ExportFilePatched);
+ hooks[2] = taiHookFunctionOffset(&GetFileTypeRef, info.modid, 0, 0x116FA0, 1, GetFileTypePatched);
+ break;
+ }
+
+ case 0x587F9CED: // 3.65 PTEL
+ {
+ hooks[0] = taiInjectData(info.modid, 0, 0x4FF0F8, "GET", 4);
+ hooks[1] = taiHookFunctionOffset(&ExportFileRef, info.modid, 0, 0x1127AE, 1, ExportFilePatched);
+ hooks[2] = taiHookFunctionOffset(&GetFileTypeRef, info.modid, 0, 0x11799C, 1, GetFileTypePatched);
+ break;
+ }
+ }
+ }
+
+ return SCE_KERNEL_START_SUCCESS;
+ }
+
+ int module_stop(SceSize args, const void * argp)
+ {
+ if (hooks[2] >= 0)
+ taiHookRelease(hooks[2], GetFileTypeRef);
+ if (hooks[1] >= 0)
+ taiHookRelease(hooks[1], ExportFileRef);
+ if (hooks[0] >= 0)
+ taiInjectRelease(hooks[0]);
+ return SCE_KERNEL_STOP_SUCCESS;
+ }
+
+}
\ No newline at end of file
diff --git a/ElevenMPV-A-DE/paf_runtime.cpp b/ElevenMPV-A-DE/paf_runtime.cpp
new file mode 100644
index 0000000..7da6819
--- /dev/null
+++ b/ElevenMPV-A-DE/paf_runtime.cpp
@@ -0,0 +1,18 @@
+
+extern "C" {
+
+ int _sceLdTlsRegisterModuleInfo()
+ {
+ return 0;
+ }
+
+ int _sceLdTlsUnregisterModuleInfo()
+ {
+ return 0;
+ }
+
+ int __at_quick_exit()
+ {
+ return 0;
+ }
+}
\ No newline at end of file
diff --git a/ElevenMPV-A-ShellPlugin/ElevenMPV-A-ShellPlugin.vcxproj b/ElevenMPV-A-ShellPlugin/ElevenMPV-A-ShellPlugin.vcxproj
index 4ffb143..50f7d66 100644
--- a/ElevenMPV-A-ShellPlugin/ElevenMPV-A-ShellPlugin.vcxproj
+++ b/ElevenMPV-A-ShellPlugin/ElevenMPV-A-ShellPlugin.vcxproj
@@ -59,7 +59,7 @@
--no-standard-libraries
$(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;%(AdditionalLibraryDirectories)
- -lSceDbg_stub;-lScePafTopLevel_stub;-lScePafStdc_stub;-lScePafCommon_stub;-lScePafWidget_stub;-lScePafThread_stub;-lSceLibKernel_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceAppMgrUser_stub;-ltaihen_stub;%(AdditionalDependencies)
+ -lSceDbg_stub;-lScePafTopLevel_stub;-lScePafStdc_stub;-lScePafCommon_stub;-lScePafWidget_stub;-lScePafThread_stub;-lSceLibKernel_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceAppMgrUser_stub;-ltaihen_stub;-lsnc;%(AdditionalDependencies)
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubprx.exe" --strip --compress "$(LocalDebuggerCommand)" "$(OutDir)shell_plugin.suprx"
@@ -75,9 +75,12 @@ copy /Y "$(OutDir)shell_plugin.suprx" "$(SolutionDir)\ElevenMPV-A\CONTENTS\modul
Cpp11
- -lSceDbg_stub;-lScePafTopLevel_stub;-lScePafStdc_stub;-lScePafCommon_stub;-lScePafWidget_stub;-lScePafThread_stub;-lSceLibKernel_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceAppMgrUser_stub;-ltaihen_stub;%(AdditionalDependencies)
+ -lSceDbg_stub;-lScePafTopLevel_stub;-lScePafStdc_stub;-lScePafCommon_stub;-lScePafWidget_stub;-lScePafThread_stub;-lSceLibKernel_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceAppMgrUser_stub;-ltaihen_stub;-lsnc;%(AdditionalDependencies)
$(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;%(AdditionalLibraryDirectories)
- --no-standard-libraries %(AdditionalOptions)
+ --no-standard-libraries
+ StripSymsAndDebug
+ StripFuncsAndData
+ true
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubprx.exe" --strip --compress "$(LocalDebuggerCommand)" "$(OutDir)shell_plugin.suprx"
diff --git a/ElevenMPV-A-ShellPlugin/main.cpp b/ElevenMPV-A-ShellPlugin/main.cpp
index 870764e..5ef89ba 100644
--- a/ElevenMPV-A-ShellPlugin/main.cpp
+++ b/ElevenMPV-A-ShellPlugin/main.cpp
@@ -13,18 +13,18 @@
using namespace paf;
-static widget::Widget *imposeRoot = SCE_NULL;
+static ui::Widget *imposeRoot = SCE_NULL;
static ImposeThread *mainThread = SCE_NULL;
static RxThread *rxThread = SCE_NULL;
static SceUID ipcPipeRX = SCE_UID_INVALID_UID;
static SceUID ipcPipeTX = SCE_UID_INVALID_UID;
-static widget::Widget *buttonREW = SCE_NULL;
-static widget::Widget *buttonPLAY = SCE_NULL;
-static widget::Widget *buttonFF = SCE_NULL;
-static widget::Widget *textTop = SCE_NULL;
-static widget::Widget *textBottom = SCE_NULL;
+static ui::Widget *buttonREW = SCE_NULL;
+static ui::Widget *buttonPLAY = SCE_NULL;
+static ui::Widget *buttonFF = SCE_NULL;
+static ui::Widget *textTop = SCE_NULL;
+static ui::Widget *textBottom = SCE_NULL;
static tai_hook_ref_t hookRef[1];
static SceUID hookId[1];
@@ -38,23 +38,26 @@ static SceBool imposeIpcActive = SCE_FALSE;
int setup_stage1()
{
+ Plugin *imposePlugin = SCE_NULL;
+ ScePVoid powerRoot = SCE_NULL;
+
//Get power manage plugin object
- Plugin *imposePlugin = Plugin::Find("power_manage_plugin");
+ imposePlugin = Plugin::Find("power_manage_plugin");
if (imposePlugin == NULL) {
SCE_DBG_LOG_ERROR("Power manage plugin not found\n");
goto setup_error_return;
}
//Power manage plugin -> power manage root
- widget::Widget *powerRoot = imposePlugin->GetInterface(1);
+ powerRoot = imposePlugin->GetInterface(1);
if (powerRoot == NULL) {
SCE_DBG_LOG_ERROR("Power root not found\n");
goto setup_error_return;
}
//Power manage root -> impose root (some virtual function)
- widget::Widget *(*getImposeRoot)();
- getImposeRoot = (widget::Widget *(*)()) *(int *)((void *)powerRoot + 0x54);
+ ui::Widget *(*getImposeRoot)();
+ getImposeRoot = (ui::Widget *(*)()) *(int *)((void *)powerRoot + 0x54);
imposeRoot = getImposeRoot();
if (imposeRoot == NULL) {
SCE_DBG_LOG_ERROR("Impose root not found\n");
@@ -77,11 +80,11 @@ void setup_stage2()
ipcPipeRX = sceKernelCreateMsgPipe("ElevenMPVA::ShellIPC_RX", SCE_KERNEL_MSG_PIPE_TYPE_USER_MAIN, IPC_PIPE_ATTR, sizeof(IpcDataRX), SCE_NULL);
ipcPipeTX = sceKernelCreateMsgPipe("ElevenMPVA::ShellIPC_TX", SCE_KERNEL_MSG_PIPE_TYPE_USER_MAIN, IPC_PIPE_ATTR, sizeof(IpcDataTX), SCE_NULL);
- mainThread = new ImposeThread(250, 0x1000, "ElevenMPVA::ShellControl");
+ mainThread = new ImposeThread(SCE_KERNEL_LOWEST_PRIORITY_USER, SCE_KERNEL_4KiB, "ElevenMPVA::ShellControl");
mainThread->done = SCE_FALSE;
mainThread->Start();
- rxThread = new RxThread(249, 0x1000, "ElevenMPVA::ShellRx");
+ rxThread = new RxThread(SCE_KERNEL_LOWEST_PRIORITY_USER, SCE_KERNEL_4KiB, "ElevenMPVA::ShellRx");
rxThread->Start();
}
@@ -107,6 +110,9 @@ void cleanup()
if (ipcPipeTX > 0)
sceKernelDeleteMsgPipe(ipcPipeTX);
+
+ if (hookId[0] > 0)
+ taiHookRelease(hookId[0], hookRef[0]);
}
int findWidgets()
@@ -118,7 +124,7 @@ int findWidgets()
buttonREW = SCE_NULL;
while (buttonREW == NULL) {
buttonREW = imposeRoot->GetChildByHash(&widgetSearchResult, 0);
- thread::Thread::Sleep(100);
+ thread::Sleep(100);
}
widgetSearchResult.hash = PlayerButtonCB::ButtonHash_Ff;
@@ -163,6 +169,8 @@ int resetWidgets()
buttonFF = SCE_NULL;
textTop = SCE_NULL;
textBottom = SCE_NULL;
+
+ return 0;
}
void setButtonState()
@@ -183,19 +191,19 @@ void setButtonState()
void setText()
{
- widget::Widget::Color col;
+ ui::Widget::Color col;
col.r = 1.0f;
col.g = 1.0f;
col.b = 1.0f;
col.a = 1.0f;
- textTop->SetFilterColor(&col);
- textBottom->SetFilterColor(&col);
+ textTop->SetColor(&col);
+ textBottom->SetColor(&col);
textTop->SetLabel(topText);
textBottom->SetLabel(bottomText);
}
-SceVoid PlayerButtonCB::PlayerButtonCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData)
+SceVoid PlayerButtonCB::PlayerButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData)
{
IpcDataTX ipcDataTX;
ipcDataTX.cmd = 0;
@@ -226,7 +234,7 @@ SceVoid RxThread::EntryFunction()
IpcDataRX ipcDataRX;
WString text16;
SceUInt32 artLen, albLen;
- widget::Widget::Color col;
+ ui::Widget::Color col;
col.r = 1.0f;
col.g = 1.0f;
col.b = 1.0f;
@@ -255,32 +263,30 @@ SceVoid RxThread::EntryFunction()
if ((ipcDataRX.flags & EMPVA_IPC_REFRESH_TEXT) == EMPVA_IPC_REFRESH_TEXT) {
- text16.Set(ipcDataRX.title);
+ text16 = (wchar_t *)ipcDataRX.title;
if (textTop != SCE_NULL && impose) {
textTop->SetLabel(&text16);
- textTop->SetFilterColor(&col);
+ textTop->SetColor(&col);
}
topText->Clear();
- topText->Set(text16.data, text16.length);
- text16.Clear();
+ topText->Append(text16.data, text16.length);
- text16.Set(ipcDataRX.artist);
+ text16 = (wchar_t *)ipcDataRX.artist;
artLen = sce_paf_wcslen((wchar_t *)ipcDataRX.artist);
albLen = sce_paf_wcslen((wchar_t *)ipcDataRX.album);
if (artLen != 0 && albLen != 0)
- text16.Append((SceWChar16 *)L" / ", 4);
- text16.Append(ipcDataRX.album, albLen);
+ text16.Append(L" / ", 4);
+ text16.Append((wchar_t *)ipcDataRX.album, albLen);
if (textBottom != SCE_NULL && impose) {
textBottom->SetLabel(&text16);
- textBottom->SetFilterColor(&col);
+ textBottom->SetColor(&col);
}
bottomText->Clear();
- bottomText->Set(text16.data, text16.length);
- text16.Clear();
+ bottomText->Append(text16.data, text16.length);
}
break;
@@ -301,7 +307,7 @@ SceVoid ImposeThread::EntryFunction()
if (impose != appState.isSystemUiOverlaid && appState.isSystemUiOverlaid == SCE_TRUE) {
SCE_DBG_LOG_INFO("Impose detected\n");
if (imposeIpcActive) {
- thread::Thread::Sleep(100);
+ thread::Sleep(100);
findWidgets();
setButtonState();
setText();
@@ -312,7 +318,7 @@ SceVoid ImposeThread::EntryFunction()
resetWidgets();
}
impose = appState.isSystemUiOverlaid;
- thread::Thread::Sleep(100);
+ thread::Sleep(100);
}
sceKernelExitDeleteThread(0);
@@ -350,14 +356,14 @@ extern "C" {
setup_stage2();
- hookId[0] = taiHookFunctionImport(&hookRef[0], "SceShell", 0xA6605D6F, 0x62BEBD65, sceAppMgrGetCurrentBgmState2_patched);
+ hookId[0] = taiHookFunctionImport(&hookRef[0], "SceShell", 0xA6605D6F, 0x62BEBD65, (const void *)sceAppMgrGetCurrentBgmState2_patched);
+
+ return ret;
}
int module_stop(SceSize args, const void * argp)
{
cleanup();
- if (hookId[0] > 0)
- taiHookRelease(hookId[0], hookRef[0]);
return SCE_KERNEL_STOP_SUCCESS;
}
diff --git a/ElevenMPV-A-ShellPlugin/main.h b/ElevenMPV-A-ShellPlugin/main.h
index f1e646c..e81d175 100644
--- a/ElevenMPV-A-ShellPlugin/main.h
+++ b/ElevenMPV-A-ShellPlugin/main.h
@@ -1,3 +1,4 @@
+#pragma once
#include
using namespace paf;
@@ -22,7 +23,7 @@ class RxThread : public paf::thread::Thread
virtual SceVoid EntryFunction();
};
-class PlayerButtonCB : public widget::Widget::EventCallback
+class PlayerButtonCB : public ui::Widget::EventCallback
{
public:
@@ -43,6 +44,6 @@ class PlayerButtonCB : public widget::Widget::EventCallback
};
- static SceVoid PlayerButtonCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ static SceVoid PlayerButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
};
\ No newline at end of file
diff --git a/ElevenMPV-A-ShellPlugin/paf_runtime.cpp b/ElevenMPV-A-ShellPlugin/paf_runtime.cpp
index a5d6212..7da6819 100644
--- a/ElevenMPV-A-ShellPlugin/paf_runtime.cpp
+++ b/ElevenMPV-A-ShellPlugin/paf_runtime.cpp
@@ -1,11 +1,6 @@
extern "C" {
- void __cxa_set_dso_handle_main(void *dso)
- {
-
- }
-
int _sceLdTlsRegisterModuleInfo()
{
return 0;
@@ -16,13 +11,8 @@ extern "C" {
return 0;
}
- int __aeabi_unwind_cpp_pr0()
+ int __at_quick_exit()
{
- return 9;
- }
-
- int __aeabi_unwind_cpp_pr1()
- {
- return 9;
+ return 0;
}
}
\ No newline at end of file
diff --git a/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj b/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj
new file mode 100644
index 0000000..946fb97
--- /dev/null
+++ b/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj
@@ -0,0 +1,79 @@
+
+
+
+
+ Debug
+ PSVita
+
+
+ Release
+ PSVita
+
+
+
+ {584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D}
+
+
+
+ DynamicLibrary
+
+
+ DynamicLibrary
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions);
+ true
+ NotUsing
+
+
+ --no-required-files
+ -lSceSysmodule_stub;-lSceAppmgr_stub;%(AdditionalDependencies)
+ $(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;%(AdditionalLibraryDirectories)
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions);
+ Level3
+ NotUsing
+
+
+ --no-required-files
+ StripSymsAndDebug
+ -lSceSysmodule_stub;-lSceAppmgr_stub;%(AdditionalDependencies)
+ $(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;%(AdditionalLibraryDirectories)
+
+
+ "$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubprx.exe" --strip --compress "$(LocalDebuggerCommand)" "$(OutDir)paf_preload.suprx"
+copy /Y "$(OutDir)paf_preload.suprx" "$(SolutionDir)\ElevenMPV-A\CONTENTS\module\libScePafPreload.suprx"
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj.filters b/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj.filters
new file mode 100644
index 0000000..d7e45bc
--- /dev/null
+++ b/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj.filters
@@ -0,0 +1,18 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cxx;cc;s;asm
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hpp
+
+
+
+
+ Source Files
+
+
+
\ No newline at end of file
diff --git a/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj.user b/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj.user
new file mode 100644
index 0000000..be25078
--- /dev/null
+++ b/ElevenMPV-A-libScePafPreload/libScePafPreload.vcxproj.user
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/ElevenMPV-A-libScePafPreload/prx.c b/ElevenMPV-A-libScePafPreload/prx.c
new file mode 100644
index 0000000..2aded10
--- /dev/null
+++ b/ElevenMPV-A-libScePafPreload/prx.c
@@ -0,0 +1,74 @@
+#include
+#include
+
+int sceAppMgrGrowMemory3(unsigned int a1, int a2);
+
+#define GROW_MEMORY
+
+typedef struct SceSysmoduleOpt {
+ int flags;
+ int *result;
+ int unused[2];
+} SceSysmoduleOpt;
+
+typedef struct ScePafInit {
+ SceSize global_heap_size;
+ int a2;
+ int a3;
+ int cdlg_mode;
+ int heap_opt_param1;
+ int heap_opt_param2;
+} ScePafInit; // size is 0x18
+
+int __module_stop(SceSize argc, const void *args)
+{
+ return SCE_KERNEL_STOP_SUCCESS;
+}
+
+int __module_exit()
+{
+ return SCE_KERNEL_STOP_SUCCESS;
+}
+
+int __module_start(SceSize argc, void *args)
+{
+ SceInt32 ret = -1, load_res;
+ void* pRet = 0;
+
+ ScePafInit init_param;
+ SceSysmoduleOpt sysmodule_opt;
+
+#ifdef GROW_MEMORY
+
+ init_param.global_heap_size = 4 * 1024 * 1024 + 512 * 1024;
+
+ //Grow memory if possible
+ ret = sceAppMgrGrowMemory3(41 * 1024 * 1024, 1); // 57 MB
+ if (ret < 0) {
+ ret = sceAppMgrGrowMemory3(16 * 1024 * 1024, 1); // 32 MB
+ if (ret == 0)
+ init_param.global_heap_size = 12 * 1024 * 1024;
+ }
+ else
+ init_param.global_heap_size = 23 * 1024 * 1024;
+#else
+ init_param.global_heap_size = 12 * 1024 * 1024;
+#endif
+ init_param.a2 = 0x0000EA60;
+ init_param.a3 = 0x00040000;
+ init_param.cdlg_mode = 0;
+ init_param.heap_opt_param1 = 0;
+ init_param.heap_opt_param2 = 0;
+
+ sysmodule_opt.flags = 0; // with arg
+ sysmodule_opt.result = &load_res;
+
+ ret = sceSysmoduleLoadModuleInternalWithArg(SCE_SYSMODULE_INTERNAL_PAF, sizeof(init_param), &init_param, &sysmodule_opt);
+
+ if (ret < 0) {
+ sceClibPrintf("[PAF PRX] Loader: 0x%x\n", ret);
+ sceClibPrintf("[PAF PRX] Loader result: 0x%x\n", load_res);
+ }
+
+ return SCE_KERNEL_START_NO_RESIDENT;
+}
\ No newline at end of file
diff --git a/ElevenMPV-A.sln b/ElevenMPV-A.sln
index 8ea022f..2c9fcb8 100644
--- a/ElevenMPV-A.sln
+++ b/ElevenMPV-A.sln
@@ -6,10 +6,16 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ElevenMPV-A", "ElevenMPV-A\ElevenMPV-A.vcxproj", "{C1CA520F-B824-44D0-91F4-33EE6287D6EB}"
ProjectSection(ProjectDependencies) = postProject
{08427615-73E3-4334-B91C-89425EFCA190} = {08427615-73E3-4334-B91C-89425EFCA190}
+ {D9477093-D1DF-4A70-B333-C114DDF9EC04} = {D9477093-D1DF-4A70-B333-C114DDF9EC04}
+ {584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D} = {584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ElevenMPV-A-ShellPlugin", "ElevenMPV-A-ShellPlugin\ElevenMPV-A-ShellPlugin.vcxproj", "{08427615-73E3-4334-B91C-89425EFCA190}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ElevenMPV-A-DE", "ElevenMPV-A-DE\ElevenMPV-A-DE.vcxproj", "{D9477093-D1DF-4A70-B333-C114DDF9EC04}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libScePafPreload", "ElevenMPV-A-libScePafPreload\libScePafPreload.vcxproj", "{584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|PSVita = Debug|PSVita
@@ -24,6 +30,14 @@ Global
{08427615-73E3-4334-B91C-89425EFCA190}.Debug|PSVita.Build.0 = Debug|PSVita
{08427615-73E3-4334-B91C-89425EFCA190}.Release|PSVita.ActiveCfg = Release|PSVita
{08427615-73E3-4334-B91C-89425EFCA190}.Release|PSVita.Build.0 = Release|PSVita
+ {D9477093-D1DF-4A70-B333-C114DDF9EC04}.Debug|PSVita.ActiveCfg = Debug|PSVita
+ {D9477093-D1DF-4A70-B333-C114DDF9EC04}.Debug|PSVita.Build.0 = Debug|PSVita
+ {D9477093-D1DF-4A70-B333-C114DDF9EC04}.Release|PSVita.ActiveCfg = Release|PSVita
+ {D9477093-D1DF-4A70-B333-C114DDF9EC04}.Release|PSVita.Build.0 = Release|PSVita
+ {584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D}.Debug|PSVita.ActiveCfg = Debug|PSVita
+ {584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D}.Debug|PSVita.Build.0 = Debug|PSVita
+ {584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D}.Release|PSVita.ActiveCfg = Release|PSVita
+ {584C4FE4-880C-4EF6-9E2A-22BBE98EBA2D}.Release|PSVita.Build.0 = Release|PSVita
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/ElevenMPV-A/CONTENTS/empva_plugin.rco b/ElevenMPV-A/CONTENTS/empva_plugin.rco
index 79fb912..6895bd1 100644
Binary files a/ElevenMPV-A/CONTENTS/empva_plugin.rco and b/ElevenMPV-A/CONTENTS/empva_plugin.rco differ
diff --git a/ElevenMPV-A/CONTENTS/empva_settings.xml b/ElevenMPV-A/CONTENTS/empva_settings.xml
new file mode 100644
index 0000000..d7e10d8
--- /dev/null
+++ b/ElevenMPV-A/CONTENTS/empva_settings.xml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ElevenMPV-A/CONTENTS/module/download_enabler_empva.suprx b/ElevenMPV-A/CONTENTS/module/download_enabler_empva.suprx
new file mode 100644
index 0000000..cfcbdf8
Binary files /dev/null and b/ElevenMPV-A/CONTENTS/module/download_enabler_empva.suprx differ
diff --git a/ElevenMPV-A/CONTENTS/module/libLocalMedia.suprx b/ElevenMPV-A/CONTENTS/module/libLocalMedia.suprx
new file mode 100644
index 0000000..88ffabf
Binary files /dev/null and b/ElevenMPV-A/CONTENTS/module/libLocalMedia.suprx differ
diff --git a/ElevenMPV-A/CONTENTS/module/libNetMedia.suprx b/ElevenMPV-A/CONTENTS/module/libNetMedia.suprx
new file mode 100644
index 0000000..a3cb2b7
Binary files /dev/null and b/ElevenMPV-A/CONTENTS/module/libNetMedia.suprx differ
diff --git a/ElevenMPV-A/CONTENTS/module/libScePafPreload.suprx b/ElevenMPV-A/CONTENTS/module/libScePafPreload.suprx
index e8b0763..bca797e 100644
Binary files a/ElevenMPV-A/CONTENTS/module/libScePafPreload.suprx and b/ElevenMPV-A/CONTENTS/module/libScePafPreload.suprx differ
diff --git a/ElevenMPV-A/CONTENTS/module/libThirdTube.suprx b/ElevenMPV-A/CONTENTS/module/libThirdTube.suprx
new file mode 100644
index 0000000..45e2a93
Binary files /dev/null and b/ElevenMPV-A/CONTENTS/module/libThirdTube.suprx differ
diff --git a/ElevenMPV-A/CONTENTS/module/shell_plugin.suprx b/ElevenMPV-A/CONTENTS/module/shell_plugin.suprx
index ea28485..c76a82f 100644
Binary files a/ElevenMPV-A/CONTENTS/module/shell_plugin.suprx and b/ElevenMPV-A/CONTENTS/module/shell_plugin.suprx differ
diff --git a/ElevenMPV-A/ElevenMPV-A.vcxproj b/ElevenMPV-A/ElevenMPV-A.vcxproj
index fb9f961..2c312af 100644
--- a/ElevenMPV-A/ElevenMPV-A.vcxproj
+++ b/ElevenMPV-A/ElevenMPV-A.vcxproj
@@ -51,14 +51,14 @@
Level3
- -lvita2d_sys;-lopusfile;-lopus;-lvorbisfile;-lvorbis;-logg;-lxmp-lite;-lScePng;-lSceDeflt;-lShellAudio;-lSceSysmem_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceModuleMgr_stub;-lSceProcessMgr_stub;-lSceIofilemgr_stub;-lSceLibRng_stub;-lSceAppMgr_stub;-lSceAppMgrUser_stub;-lSceSharedFb_stub;-lSceAppUtil_stub;-lSceAudio_stub;-lSceCtrl_stub;-lSceCommonDialog_stub;-lSceDisplayUser_stub;-lSceDisplay_stub;-lSceNotificationUtilProgress_stub;-lSceGxm_stub;-lSceGxmInternalForVsh_stub;-lSceGxmInternalForTest_stub;-lSceGxmInternal_stub;-lSceGpuEs4User_stub;-lSceGpuEs4UserForVsh_stub;-lScePower_stub;-lSceShellSvc_stub;-lSceSysmodule_stub;-lSceTouch_stub;-lSceShellUtil_stub;-lSceSystemGesture_stub;-lSceIme_stub;-lSceMotion_stub;-lSceVshBridge_stub;-lSceNotificationUtil_stub;-lSceJpegArm_stub;-lScePvf_stub;-lSceDbg_stub;-lSceFios2_stub;-lSceDmacMgr_stub;-lSceAudiocodec_stub;-lSceJpegUser_stub;-lSceRtabi_stub;-ltaihenUnsafe_stub;-lScePafThread_stub;-lScePafStdc_stub;-lScePafToplevel_stub;-lScePafResource_stub;-lScePafWidget_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lScePafGraphics_stub;-lSceLibKernel_stub;-lSceVideodec_stub;-lSceJpegEnc_stub;-lSceFpu;-lsnc;%(AdditionalDependencies)
+ -lopusfile;-lopus;-lvorbisfile;-lvorbis;-logg;-lxmp-lite;-lnestegg;-lShellAudio;-lSceSysmem_stub;-lSceKernelForMono_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceModuleMgr_stub;-lSceProcessMgr_stub;-lSceLibRng_stub;-lSceAppMgr_stub;-lSceAppMgrUser_stub;-lSceAppUtil_stub;-lSceAudio_stub;-lSceCtrl_stub;-lSceDisplay_stub;-lScePower_stub;-lSceShellSvc_stub;-lSceShellUtil_stub;-lSceSysmodule_stub;-lSceMotion_stub;-lSceDbg_stub;-lSceAudiocodec_stub;-ltaihenUnsafe_stub;-lScePafThread_stub;-lScePafStdc_stub;-lScePafToplevel_stub;-lScePafResource_stub;-lScePafWidget_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lScePafGraphics_stub;-lSceLibKernel_stub;-lSceNet_stub;-lSceNetCtl_stub;-lSceHttp_stub;-lSceSsl_stub;-lSceAppSettings_stub;-lScebXCe_stub;-lSceIniFileProcessor_stub;-lSceCommonDialog_stub;-lSceIpmi_stub;-lNetMedia_stub;-lLocalMedia_stub;-lThirdTube_stub;-lsnc;%(AdditionalDependencies)
$(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;$(ProjectDir)libs\lib;%(AdditionalLibraryDirectories)
FullMapFile
--no-standard-libraries
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubprx.exe" --strip --compress --boot-param "$(ProjectDir)ebootparam.bin" "$(LocalDebuggerCommand)" "$(OutDir)eboot.bin"
-"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubsfo.exe" "$(ProjectDir)param.sfx" "$(OutDir)param.sfo"
+"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubsfo.exe" "$(ProjectDir)param_for_debug.sfx" "$(OutDir)param.sfo"
"$(SCE_PSP2_SDK_DIR)/host_tools/build/bin/vdsuite-pubgen.exe" --file "$(OutDir)eboot.bin" eboot.bin --file "$(OutDir)param.sfo" sce_sys/param.sfo --file "$(ProjectDir)CONTENTS/sce_sys/icon0.png" sce_sys/icon0.png --file "$(ProjectDir)CONTENTS/sce_sys/pic0.png" sce_sys/pic0.png --file "$(ProjectDir)CONTENTS/sce_sys/livearea" sce_sys/livearea --file "$(ProjectDir)CONTENTS/module" module --file "$(ProjectDir)CONTENTS/empva_plugin.rco" empva_plugin.rco "$(OutDir)$(ProjectName).vpk"
copy /Y "$(OutDir)eboot.bin" "$(ProjectDir)CONTENTS/eboot.bin"
copy /Y "$(OutDir)param.sfo" "$(ProjectDir)CONTENTS/sce_sys/param.sfo"
@@ -77,7 +77,7 @@ copy /Y "$(OutDir)param.sfo" "$(ProjectDir)CONTENTS/sce_sys/param.sfo"
StripSymsAndDebug
- -lvita2d_sys;-lopusfile;-lopus;-lvorbisfile;-lvorbis;-logg;-lxmp-lite;-lScePng;-lSceDeflt;-lShellAudio;-lSceSysmem_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceModuleMgr_stub;-lSceProcessMgr_stub;-lSceIofilemgr_stub;-lSceLibRng_stub;-lSceAppMgr_stub;-lSceAppMgrUser_stub;-lSceSharedFb_stub;-lSceAppUtil_stub;-lSceAudio_stub;-lSceCtrl_stub;-lSceCommonDialog_stub;-lSceDisplayUser_stub;-lSceDisplay_stub;-lSceNotificationUtilProgress_stub;-lSceGxm_stub;-lSceGxmInternalForVsh_stub;-lSceGxmInternalForTest_stub;-lSceGxmInternal_stub;-lSceGpuEs4User_stub;-lSceGpuEs4UserForVsh_stub;-lScePower_stub;-lSceShellSvc_stub;-lSceSysmodule_stub;-lSceTouch_stub;-lSceShellUtil_stub;-lSceSystemGesture_stub;-lSceIme_stub;-lSceMotion_stub;-lSceVshBridge_stub;-lSceNotificationUtil_stub;-lSceJpegArm_stub;-lScePvf_stub;-lSceDbg_stub;-lSceFios2_stub;-lSceDmacMgr_stub;-lSceAudiocodec_stub;-lSceJpegUser_stub;-lSceRtabi_stub;-ltaihenUnsafe_stub;-lScePafThread_stub;-lScePafStdc_stub;-lScePafToplevel_stub;-lScePafResource_stub;-lScePafWidget_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lScePafGraphics_stub;-lSceLibKernel_stub;-lSceVideodec_stub;-lSceJpegEnc_stub;-lSceFpu;-lsnc;%(AdditionalDependencies)
+ -lopusfile;-lopus;-lvorbisfile;-lvorbis;-logg;-lxmp-lite;-lnestegg;-lShellAudio;-lSceSysmem_stub;-lSceThreadMgr_stub;-lSceThreadmgrCoredumpTime_stub;-lSceModuleMgr_stub;-lSceProcessMgr_stub;-lSceLibRng_stub;-lSceAppMgr_stub;-lSceAppMgrUser_stub;-lSceAppUtil_stub;-lSceAudio_stub;-lSceCtrl_stub;-lSceDisplay_stub;-lScePower_stub;-lSceShellSvc_stub;-lSceShellUtil_stub;-lSceSysmodule_stub;-lSceMotion_stub;-lSceDbg_stub;-lSceAudiocodec_stub;-ltaihenUnsafe_stub;-lScePafThread_stub;-lScePafStdc_stub;-lScePafToplevel_stub;-lScePafResource_stub;-lScePafWidget_stub;-lScePafMisc_stub;-lScePafCommon_stub;-lScePafGraphics_stub;-lSceLibKernel_stub;-lSceNet_stub;-lSceNetCtl_stub;-lSceHttp_stub;-lSceSsl_stub;-lSceAppSettings_stub;-lScebXCe_stub;-lSceIniFileProcessor_stub;-lSceCommonDialog_stub;-lSceIpmi_stub;-lNetMedia_stub;-lLocalMedia_stub;-lThirdTube_stub;-lsnc;%(AdditionalDependencies)
$(SCE_PSP2_SDK_DIR)\target\lib\vdsuite;$(ProjectDir)libs\lib;%(AdditionalLibraryDirectories)
--no-standard-libraries %(AdditionalOptions)
StripFuncsAndData
@@ -103,12 +103,19 @@ copy /Y "$(OutDir)param.sfo" "$(ProjectDir)CONTENTS/sce_sys/param.sfo"
+
-
+
+
+
+
+
+
+
@@ -116,6 +123,7 @@ copy /Y "$(OutDir)param.sfo" "$(ProjectDir)CONTENTS/sce_sys/param.sfo"
+
@@ -123,12 +131,16 @@ copy /Y "$(OutDir)param.sfo" "$(ProjectDir)CONTENTS/sce_sys/param.sfo"
-
+
+
+
+
+
diff --git a/ElevenMPV-A/ElevenMPV-A.vcxproj.filters b/ElevenMPV-A/ElevenMPV-A.vcxproj.filters
index ec3235e..2f7fa5c 100644
--- a/ElevenMPV-A/ElevenMPV-A.vcxproj.filters
+++ b/ElevenMPV-A/ElevenMPV-A.vcxproj.filters
@@ -21,6 +21,9 @@
{c3baaaeb-6690-40f1-9e98-88b5e91479ed}
+
+ {cf655e4d-8cf4-4dbd-a485-d601805ba8b5}
+
@@ -38,9 +41,6 @@
Source Files\menus
-
- Source Files
-
Source Files\audio
@@ -83,6 +83,33 @@
Source Files
+
+ Source Files\audio
+
+
+ Source Files
+
+
+ Source Files\menus\youtube
+
+
+ Source Files
+
+
+ Source Files\menus\youtube
+
+
+ Source Files\menus\youtube
+
+
+ Source Files\menus\youtube
+
+
+ Source Files\audio
+
+
+ Source Files
+
@@ -112,10 +139,22 @@
Header Files
-
+
Header Files
-
+
+ Header Files\menus
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
Header Files
diff --git a/ElevenMPV-A/include/audio/audio.h b/ElevenMPV-A/include/audio/audio.h
index f79cb7f..39e6972 100644
--- a/ElevenMPV-A/include/audio/audio.h
+++ b/ElevenMPV-A/include/audio/audio.h
@@ -3,10 +3,15 @@
#include
+#include
#include
#include
#include
+#include
+#include "nestegg.h"
+#include "netmedia.h"
+#include "localmedia.h"
#include "xmp.h"
#include "audiocodec.h"
@@ -17,13 +22,26 @@ typedef SceInt64 ogg_int64_t;
namespace audio {
- class PlayerCoverLoaderThread : public thread::Thread
+ class PlayerCoverLoaderJob : public paf::thread::JobQueue::Item
{
public:
- using thread::Thread::Thread;
+ using thread::JobQueue::Item::Item;
- SceVoid EntryFunction();
+ ~PlayerCoverLoaderJob()
+ {
+
+ }
+
+ SceVoid Run();
+
+ SceVoid Finish();
+
+ static SceVoid JobKiller(thread::JobQueue::Item *job)
+ {
+ if (job)
+ delete job;
+ }
ScePVoid workptr;
SceSize size;
@@ -31,6 +49,32 @@ namespace audio {
graphics::Texture coverTex;
};
+ class YoutubePlayerCoverLoaderJob : public paf::thread::JobQueue::Item
+ {
+ public:
+
+ using thread::JobQueue::Item::Item;
+
+ ~YoutubePlayerCoverLoaderJob()
+ {
+
+ }
+
+ SceVoid Run();
+
+ SceVoid Finish();
+
+ static SceVoid JobKiller(thread::JobQueue::Item *job)
+ {
+ if (job)
+ delete job;
+ }
+
+ String url;
+
+ graphics::Texture coverTex;
+ };
+
class Utils
{
public:
@@ -38,6 +82,14 @@ namespace audio {
static SceVoid ResetBgmMode();
};
+ class DualIo
+ {
+ public:
+
+ SceAvPlayerFileReplacement fio;
+ io::File *mio;
+ };
+
class GenericDecoder
{
public:
@@ -77,10 +129,13 @@ namespace audio {
virtual Metadata *GetMetadataLocation();
+ SceBool IsValid();
+
SceBool isPlaying;
SceBool isPaused;
+ SceBool isValid;
Metadata *metadata;
- PlayerCoverLoaderThread *coverLoader;
+ String dataPath;
};
class FlacDecoder : public GenericDecoder
@@ -109,19 +164,22 @@ namespace audio {
SceUInt64 GetLength();
+ DualIo io;
+
private:
+ SceNmHandle nmHandle;
ScePVoid flac;
drflac_uint64 framesRead;
};
- class OpusDecoder : public GenericDecoder
+ class OpDecoder : public GenericDecoder
{
public:
- OpusDecoder(const char *path, SceBool isSwDecoderUsed);
+ OpDecoder(const char *path, SceBool isSwDecoderUsed);
- ~OpusDecoder();
+ ~OpDecoder();
SceUInt64 Seek(SceFloat32 percent);
@@ -135,13 +193,65 @@ namespace audio {
SceUInt64 GetLength();
+ DualIo io;
+
private:
+ static SceInt32 OpRead(ScePVoid _stream, SceUChar8 *_ptr, SceInt32 _nbytes);
+
+ static SceInt32 OpSeek(ScePVoid _stream, SceInt64 _offset, SceInt32 _whence);
+
+ static SceInt64 OpTell(ScePVoid _stream);
+
+ static SceInt32 OpClose(ScePVoid _stream);
+
+ SceNmHandle nmHandle;
ScePVoid opus;
ogg_int64_t samplesRead;
ogg_int64_t maxSamples;
};
+ class WebmOpusDecoder : public GenericDecoder
+ {
+ public:
+
+ WebmOpusDecoder(const char *path, SceBool isSwDecoderUsed);
+
+ ~WebmOpusDecoder();
+
+ SceUInt64 Seek(SceFloat32 percent);
+
+ SceVoid Decode(ScePVoid stream, SceUInt32 length, ScePVoid userdata);
+
+ SceUInt32 GetSampleRate();
+
+ SceUInt8 GetChannels();
+
+ SceUInt64 GetPosition();
+
+ SceUInt64 GetLength();
+
+ SceAvPlayerFileReplacement fio;
+
+ private:
+
+ static SceInt32 NeRead(ScePVoid buffer, SceSize length, ScePVoid userdata);
+
+ static SceInt32 NeSeek(SceInt64 offset, SceInt32 whence, ScePVoid userdata);
+
+ static SceInt64 NeTell(ScePVoid userdata);
+
+ nestegg *ne;
+ OpusDecoder *opusDec;
+ SceNmHandle nmHandle;
+ SceUInt64 totalTime;
+ SceUInt64 samplesRead;
+ SceUInt32 sampleRate;
+ SceInt32 maxSamples;
+ SceUInt8 channelNum;
+ SceBool isSeeking;
+ };
+
class OggDecoder : public GenericDecoder
{
public:
@@ -162,10 +272,21 @@ namespace audio {
SceUInt64 GetLength();
+ SceAvPlayerFileReplacement fio;
+
private:
+ static SceUInt32 OggRead(ScePVoid ptr, SceUInt32 size, SceUInt32 nmemb, ScePVoid datasource);
+
+ static SceInt32 OggSeek(ScePVoid datasource, ogg_int64_t offset, SceInt32 whence);
+
+ static long OggTell(ScePVoid datasource);
+
+ static SceInt32 OggClose(ScePVoid datasource);
+
SceUInt64 FillBuffer(char *out);
+ SceNmHandle nmHandle;
OggVorbis_File ogg;
vorbis_info *oggInfo;
ogg_int64_t samplesRead;
@@ -228,6 +349,8 @@ namespace audio {
SceUInt64 GetLength();
+ SceAvPlayerFileReplacement fio;
+
private:
static SceInt32 sceAudiocodecGetAt3ConfigPSP2(SceUInt32 cmode, SceUInt32 nbytes);
@@ -238,17 +361,13 @@ namespace audio {
SceVoid InitCommon(const char *path, SceUInt8 type, SceUInt8 param1, SceUInt8 param2, SceSize dataOffset);
+ SceNmHandle nmHandle;
SceAudiocodecCtrl codecCtrl;
- ScePVoid streamBuffer[2];
- io::File *at3File;
+ ScePVoid esBuffer;
SceSize dataBeginOffset;
- SceSize readOffset;
- SceSize currentOffset;
SceUInt64 totalEsSamples;
SceUInt64 totalEsPlayed;
SceUInt32 codecType;
- SceUInt32 bufindex;
- SceUInt32 callCount;
};
class ShellCommonDecoder : public GenericDecoder
@@ -283,6 +402,47 @@ namespace audio {
Mp3Decoder(const char *path, SceBool isSwDecoderUsed);
};
+
+ class YoutubeDecoder : public GenericDecoder
+ {
+ public:
+
+ YoutubeDecoder(const char *path, SceBool isSwDecoderUsed);
+
+ ~YoutubeDecoder();
+
+ SceUInt64 Seek(SceFloat32 percent);
+
+ SceVoid Decode(ScePVoid stream, SceUInt32 length, ScePVoid userdata);
+
+ SceUInt32 GetSampleRate();
+
+ SceUInt8 GetChannels();
+
+ SceUInt64 GetPosition();
+
+ SceUInt64 GetLength();
+
+ SceAvPlayerFileReplacement fio;
+
+ private:
+
+ static SceInt32 NeRead(ScePVoid buffer, SceSize length, ScePVoid userdata);
+
+ static SceInt32 NeSeek(SceInt64 offset, SceInt32 whence, ScePVoid userdata);
+
+ static SceInt64 NeTell(ScePVoid userdata);
+
+ nestegg *ne;
+ OpusDecoder *opusDec;
+ SceNmHandle nmHandle;
+ SceUInt64 totalTime;
+ SceUInt64 samplesRead;
+ SceUInt32 sampleRate;
+ SceInt32 maxSamples;
+ SceUInt8 channelNum;
+ SceBool isSeeking;
+ };
}
#endif
diff --git a/ElevenMPV-A/include/audio/vitaaudiolib.h b/ElevenMPV-A/include/audio/vitaaudiolib.h
index fdfb2c2..0a79d38 100644
--- a/ElevenMPV-A/include/audio/vitaaudiolib.h
+++ b/ElevenMPV-A/include/audio/vitaaudiolib.h
@@ -33,7 +33,7 @@ namespace audio {
SceInt32 handle;
audio::GenericDecoder *decoder;
ScePVoid userdata;
- };
+ } VITA_audio_channelinfo;
static SceInt32 Init(SceUInt32 frequency, SceUInt32 mode);
diff --git a/ElevenMPV-A/include/common.h b/ElevenMPV-A/include/common.h
index ef7f475..37d305b 100644
--- a/ElevenMPV-A/include/common.h
+++ b/ElevenMPV-A/include/common.h
@@ -4,13 +4,10 @@
#include
#include
#include
-#include
-#include
#include "menu_displayfiles.h"
#include "menu_settings.h"
#include "menu_audioplayer.h"
-#include "config.h"
using namespace paf;
@@ -21,16 +18,15 @@ extern SceUID g_eventFlagUid;
extern SceBool g_isPlayerActive;
extern Plugin *g_empvaPlugin;
-extern widget::Widget *g_root;
-extern widget::Widget *g_root_page;
-extern widget::Widget *g_settings_page;
-extern widget::Widget *g_player_page;
-extern widget::Widget *g_settings_option;
-extern widget::Widget *g_top_text;
+extern ui::Widget *g_root;
+extern ui::Widget *g_rootPage;
+extern ui::Widget *g_player_page;
+extern ui::Widget *g_topText;
extern graphics::Texture *g_commonBgTex;
extern graphics::Texture *g_coverBgTex;
-extern widget::BusyIndicator *g_commonBusyInidcator;
-extern widget::Widget *g_commonOptionDialog;
+extern ui::BusyIndicator *g_commonBusyInidcator;
+
+extern thread::JobQueue *g_coverJobQueue;
extern graphics::Texture *g_texCheckMark;
extern graphics::Texture *g_texTransparent;
@@ -39,8 +35,5 @@ extern graphics::Surface *g_currentCoverSurf;
extern menu::audioplayer::Audioplayer *g_currentPlayerInstance;
extern menu::displayfiles::Page *g_currentDispFilePage;
extern menu::settings::SettingsButtonCB *g_settingsButtonCB;
-extern config::Config *g_config;
-
-extern menu::displayfiles::CoverLoaderThread *g_currentCoverLoader;
#endif
diff --git a/ElevenMPV-A/include/config.h b/ElevenMPV-A/include/config.h
deleted file mode 100644
index 2bc83e2..0000000
--- a/ElevenMPV-A/include/config.h
+++ /dev/null
@@ -1,83 +0,0 @@
-#ifndef _ELEVENMPV_CONFIG_H_
-#define _ELEVENMPV_CONFIG_H_
-
-#include
-#include
-
-/* Config layout in safemem:
-
-0: EMPVAConfig
-sizeof(EMPVAConfig): cwd_exist
-sizeof(EMPVAConfig) + 4: cwd string
-
-*/
-
-namespace config {
-
- class Config
- {
- public:
-
- class EMPVAConfig
- {
- public:
-
- SceUInt32 version;
- SceBool meta_flac;
- SceBool meta_mp3;
- SceBool meta_opus;
- SceUInt32 sort;
- SceBool alc_mode;
- SceUInt32 eq_mode;
- SceBool eq_volume;
- SceBool motion_mode;
- SceUInt32 motion_timer;
- SceUInt32 motion_degree;
- SceBool stick_skip;
- SceBool power_saving;
- SceUInt32 power_timer;
- SceUInt32 notify_mode;
- SceUInt32 device;
- SceUInt32 last_pagemode;
-
- };
-
- Config();
-
- ~Config();
-
- SceVoid Save();
-
- EMPVAConfig *GetConfigLocation();
-
- SceVoid GetLastDirectory(paf::String *cwd);
-
- SceVoid SetLastDirectory(const char *cwd);
-
- private:
-
- EMPVAConfig *localConfig;
-
- char rootPath[8];
-
- SceBool configReset;
-
- const SceUInt32 k_configVersion = 16;
- const SceUInt32 k_defSort = 0;
- const SceUInt32 k_defAlcMode = 0;
- const SceUInt32 k_defEqMode = 0;
- const SceUInt32 k_defEqVolume = 0;
- const SceUInt32 k_defMotionMode = 0;
- const SceUInt32 k_defMotionTimer = 3;
- const SceUInt32 k_defMotionDeg = 45;
- const SceUInt32 k_defStickSkip = 1;
- const SceUInt32 k_defPowerSaving = 1;
- const SceUInt32 k_defPowerTimer = 1;
- const SceUInt32 k_defDevice = 0;
- const SceUInt32 k_defLastPagemode = 0;
-
- SceUInt32 config_version_holder;
- };
-}
-
-#endif
diff --git a/ElevenMPV-A/include/debug.h b/ElevenMPV-A/include/debug.h
new file mode 100644
index 0000000..a53779d
--- /dev/null
+++ b/ElevenMPV-A/include/debug.h
@@ -0,0 +1,12 @@
+#ifndef _ELEVENMPV_DEBUG_H_
+#define _ELEVENMPV_DEBUG_H_
+
+#include
+
+#ifdef _DEBUG
+
+void InitDebug();
+
+#endif
+
+#endif
diff --git a/ElevenMPV-A/include/downloader.h b/ElevenMPV-A/include/downloader.h
new file mode 100644
index 0000000..c96ebdb
--- /dev/null
+++ b/ElevenMPV-A/include/downloader.h
@@ -0,0 +1,55 @@
+#ifndef _ELEVENMPV_DOWNLOADER_H_
+#define _ELEVENMPV_DOWNLOADER_H_
+
+#include
+#include
+#include
+#include
+
+using namespace paf;
+
+class Downloader
+{
+public:
+
+ Downloader();
+
+ ~Downloader();
+
+ SceInt32 Enqueue(const char *url, const char *name);
+
+ SceInt32 EnqueueAsync(const char *url, const char *name);
+
+private:
+
+ class AsyncEnqueue : public paf::thread::JobQueue::Item
+ {
+ public:
+
+ using thread::JobQueue::Item::Item;
+
+ ~AsyncEnqueue() {}
+
+ SceVoid Run()
+ {
+ Downloader *pdownloader = (Downloader *)downloader;
+ pdownloader->Enqueue(url8.data, name8.data);
+ }
+
+ SceVoid Finish() {}
+
+ static SceVoid JobKiller(thread::JobQueue::Item *job)
+ {
+ if (job)
+ delete job;
+ }
+
+ String url8;
+ String name8;
+ ScePVoid downloader;
+ };
+
+ sce::Download dw;
+};
+
+#endif
diff --git a/ElevenMPV-A/include/main.h b/ElevenMPV-A/include/main.h
new file mode 100644
index 0000000..fc3f3cd
--- /dev/null
+++ b/ElevenMPV-A/include/main.h
@@ -0,0 +1,37 @@
+#ifndef _ELEVENMPV_MAIN_H_
+#define _ELEVENMPV_MAIN_H_
+
+#include
+#include
+#include
+#include
+
+using namespace paf;
+
+namespace menu {
+ namespace main {
+
+ class PagemodeButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ PagemodeButtonCB()
+ {
+ eventHandler = PagemodeButtonCBFun;
+ };
+
+ virtual ~PagemodeButtonCB()
+ {
+
+ };
+
+ static SceInt32 LoadYoutubeStuff();
+
+ static SceVoid PagemodeButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+ }
+}
+
+
+#endif
diff --git a/ElevenMPV-A/include/menus/menu_audioplayer.h b/ElevenMPV-A/include/menus/menu_audioplayer.h
index f78afe4..d54219a 100644
--- a/ElevenMPV-A/include/menus/menu_audioplayer.h
+++ b/ElevenMPV-A/include/menus/menu_audioplayer.h
@@ -11,7 +11,7 @@ using namespace paf;
namespace menu {
namespace audioplayer {
- class PlayerButtonCB : public widget::Widget::EventCallback
+ class PlayerButtonCB : public ui::Widget::EventCallback
{
public:
@@ -22,7 +22,9 @@ namespace menu {
ButtonHash_Ff = 0x373fc526,
ButtonHash_Repeat = 0x28bfa2c9,
ButtonHash_Shuffle = 0x46be756f,
- ButtonHash_Progressbar = 0x354adaae
+ ButtonHash_Progressbar = 0x354adaae,
+ ButtonHash_Close = 0xf6ac8379,
+ ButtonHash_Favourite = 0xb59196e3
};
PlayerButtonCB()
@@ -35,11 +37,11 @@ namespace menu {
};
- static SceVoid PlayerButtonCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ static SceVoid PlayerButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
};
- class BackButtonCB : public widget::Widget::EventCallback
+ class BackButtonCB : public ui::Widget::EventCallback
{
public:
@@ -53,7 +55,7 @@ namespace menu {
};
- static SceVoid BackButtonCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ static SceVoid BackButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
};
@@ -71,15 +73,26 @@ namespace menu {
SceVoid SetMetadata(const char *file);
+ SceBool IsValid();
+
private:
+ static const SceUInt8 k_ytRetryAttemptNum = 3;
+
audio::GenericDecoder *decoder;
+ SceBool isValid;
};
class Audioplayer
{
public:
+ enum Mode
+ {
+ Mode_Normal,
+ Mode_Youtube
+ };
+
class Playlist
{
public:
@@ -88,31 +101,40 @@ namespace menu {
SceUInt8 isConsumed[1024];
};
- Audioplayer(const char *cwd, menu::displayfiles::File *startFile);
+ Audioplayer(const char *cwd, menu::displayfiles::File *startFile, Mode mode);
~Audioplayer();
static SceVoid RegularTask(ScePVoid pUserData);
- static SceVoid PowerOffTask(ScePVoid pUserData);
-
static SceVoid HandleNext(SceBool fromHandlePrev, SceBool fromFfButton);
static SceVoid ReloadCoverForNext();
static SceVoid HandlePrev();
+ static SceVoid _HandleNext(SceBool fromHandlePrev, SceBool fromFfButton);
+
+ static SceVoid _HandlePrev();
+
+ static SceVoid YtJobFinishHandler();
+
static SceVoid ConvertSecondsToString(String *string, SceUInt64 seconds, SceBool needSeparator);
+
+ static SceVoid Return();
+
+ static SceVoid Close();
SceVoid GetMusicList(menu::displayfiles::File *startFile);
AudioplayerCore *GetCore();
+ Playlist playlist;
+ SceInt32 playlistIdx;
+
private:
AudioplayerCore *core;
- Playlist playlist;
- SceInt32 playlistIdx;
SceUInt32 startIdx;
SceUInt32 totalIdx;
SceUInt32 totalConsumedIdx;
@@ -121,7 +143,4 @@ namespace menu {
}
}
-/*void Menu_PlayAudio(char *path);
-void Menu_UnloadExternalCover(void);*/
-
#endif
diff --git a/ElevenMPV-A/include/menus/menu_displayfiles.h b/ElevenMPV-A/include/menus/menu_displayfiles.h
index 1d4ade8..b33fd21 100644
--- a/ElevenMPV-A/include/menus/menu_displayfiles.h
+++ b/ElevenMPV-A/include/menus/menu_displayfiles.h
@@ -11,19 +11,32 @@ namespace menu {
class Page;
class File;
- class CoverLoaderThread : public thread::Thread
+ class CoverLoaderJob : public paf::thread::JobQueue::Item
{
public:
- using thread::Thread::Thread;
+ using thread::JobQueue::Item::Item;
- SceVoid EntryFunction();
+ ~CoverLoaderJob()
+ {
+
+ }
+
+ SceVoid Run();
+
+ SceVoid Finish();
+
+ static SceVoid JobKiller(thread::JobQueue::Item *job)
+ {
+ if (job)
+ delete job;
+ }
Page *workPage;
File *workFile;
};
- class BackButtonCB : public widget::Widget::EventCallback
+ class BackButtonCB : public ui::Widget::EventCallback
{
public:
@@ -37,11 +50,29 @@ namespace menu {
};
- static SceVoid BackButtonCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ static SceVoid BackButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+
+ class PlayerButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ PlayerButtonCB()
+ {
+ eventHandler = PlayerButtonCBFun;
+ };
+
+ virtual ~PlayerButtonCB()
+ {
+
+ };
+
+ static SceVoid PlayerButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
};
- class ButtonCB : public widget::Widget::EventCallback
+ class ButtonCB : public ui::Widget::EventCallback
{
public:
@@ -55,11 +86,12 @@ namespace menu {
};
- static SceVoid ButtonCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ static SceVoid ButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ static SceVoid StartNewPlayer(menu::displayfiles::File *startFile);
};
- class BusyCB : public widget::Widget::EventCallback
+ class BusyCB : public ui::Widget::EventCallback
{
public:
@@ -73,7 +105,7 @@ namespace menu {
};
- static SceVoid BusyCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ static SceVoid BusyCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
};
@@ -106,7 +138,7 @@ namespace menu {
SWString *name;
char ext[5];
Type type;
- widget::ImageButton *button;
+ ui::ImageButton *button;
ButtonCB *buttonCB;
};
@@ -122,13 +154,13 @@ namespace menu {
static SceVoid Init();
- widget::Plane *root;
- widget::Box *box;
+ ui::Plane *root;
+ ui::Box *box;
String *cwd;
Page *prev;
File *files;
BusyCB *busyCB;
- CoverLoaderThread *coverLoader;
+ CoverLoaderJob *coverLoader;
SceUInt32 fileNum;
SceBool coverState;
File *coverWork;
diff --git a/ElevenMPV-A/include/menus/menu_settings.h b/ElevenMPV-A/include/menus/menu_settings.h
index 9993a6f..1601767 100644
--- a/ElevenMPV-A/include/menus/menu_settings.h
+++ b/ElevenMPV-A/include/menus/menu_settings.h
@@ -2,13 +2,140 @@
#define _ELEVENMPV_MENU_SETTINGS_H_
#include
+#include
using namespace paf;
namespace menu {
namespace settings {
- class SettingsBackButtonCB : public widget::Widget::EventCallback
+ class Settings
+ {
+ public:
+
+ enum PageMode
+ {
+ PageMode_Normal,
+ PageMode_YouTube
+ };
+
+ enum Hash
+ {
+ Hash_Device = 0xd3d05f84,
+ Hash_Sort = 0xbc47f234,
+ Hash_AudioEq = 0x7c296cc5,
+ Hash_AudioAlc = 0xa1f24c03,
+ Hash_AudioLimitVolume = 0xf18da3ee,
+ Hash_PowerFps = 0xb86f7b54,
+ Hash_PowerSuspend = 0xa9538556,
+ Hash_PowerTimer = 0x1f178760,
+ Hash_ControlsSkip = 0x9af3a9e9,
+ Hash_ControlsMotion = 0xe165ed76,
+ Hash_ControlsTimeout = 0x4e96f7bc,
+ Hash_ControlsAngle = 0x21112208,
+ Hash_YoutubeCleanHistory = 0x26dd8c17,
+ Hash_YoutubeCleanFav = 0xe79d8bdc,
+ Hash_YoutubeDownload = 0x15fb99aa
+ };
+
+ Settings();
+
+ ~Settings();
+
+ static Settings *GetInstance();
+
+ static sce::AppSettings *GetAppSetInstance();
+
+ SceVoid Open(SceUInt32 mode);
+
+ SceVoid SetLastDirectory(const char *cwd);
+
+ SceVoid GetLastDirectory(String *cwd);
+
+ SceInt32 device;
+ SceInt32 sort;
+ SceInt32 eq_mode;
+ SceInt32 eq_volume;
+ SceInt32 alc_mode;
+ SceInt32 power_saving;
+ SceInt32 power_timer;
+ SceInt32 stick_skip;
+ SceInt32 motion_mode;
+ SceInt32 motion_timer;
+ SceInt32 motion_degree;
+ SceInt32 last_pagemode;
+ SceInt32 fps_limit;
+
+ const SceUInt32 k_safeMemIniLimit = 0x400;
+ const SceInt32 k_settingsVersion = 4;
+
+ private:
+
+ static SceVoid CBListChange(const char *elementId);
+
+ static SceVoid CBListForwardChange(const char *elementId);
+
+ static SceVoid CBListBackChange(const char *elementId);
+
+ static SceInt32 CBIsVisible(const char *elementId, SceBool *pIsVisible);
+
+ static SceInt32 CBElemInit(const char *elementId);
+
+ static SceInt32 CBElemAdd(const char *elementId, paf::ui::Widget *widget);
+
+ static SceInt32 CBValueChange(const char *elementId, const char *newValue);
+
+ static SceInt32 CBValueChange2(const char *elementId, const char *newValue);
+
+ static SceVoid CBTerm();
+
+ static SceWChar16 *CBGetString(const char *elementId);
+
+ static SceInt32 CBGetTex(graphics::Texture *tex, const char *elementId);
+
+ sce::AppSettings *appSet;
+ SceBool settingsReset;
+ char rootPath[8];
+
+ const SceInt32 k_defSort = 0;
+ const SceInt32 k_defAlcMode = 0;
+ const SceInt32 k_defEqMode = 0;
+ const SceInt32 k_defEqVolume = 0;
+ const SceInt32 k_defMotionMode = 0;
+ const SceInt32 k_defMotionTimer = 3;
+ const SceInt32 k_defMotionDeg = 45;
+ const SceInt32 k_defStickSkip = 0;
+ const SceInt32 k_defPowerSaving = 1;
+ const SceInt32 k_defPowerTimer = 5;
+ const SceInt32 k_defDevice = 0;
+ const SceInt32 k_defLastPagemode = 0;
+ const SceInt32 k_defFpsLimit = 1;
+ };
+
+ class SettingsButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ enum Parent
+ {
+ Parent_Displayfiles,
+ Parent_Player
+ };
+
+ SettingsButtonCB()
+ {
+ eventHandler = SettingsButtonCBFun;
+ };
+
+ virtual ~SettingsButtonCB()
+ {
+
+ };
+
+ static SceVoid SettingsButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+ };
+
+ /*class SettingsBackButtonCB : public widget::Widget::EventCallback
{
public:
@@ -121,7 +248,7 @@ namespace menu {
static SceVoid CloseButtonCBFun(SceInt32 eventId, widget::Widget *self, SceInt32 a3, ScePVoid pUserData);
- };
+ };*/
}
}
diff --git a/ElevenMPV-A/include/menus/menu_youtube.h b/ElevenMPV-A/include/menus/menu_youtube.h
new file mode 100644
index 0000000..36d78f9
--- /dev/null
+++ b/ElevenMPV-A/include/menus/menu_youtube.h
@@ -0,0 +1,332 @@
+#ifndef _ELEVENMPV_MENU_YOUTUBE_H_
+#define _ELEVENMPV_MENU_YOUTUBE_H_
+
+#include
+
+#include "utils.h"
+#include "youtube_parser.hpp"
+
+using namespace paf;
+
+namespace menu {
+ namespace youtube {
+
+ class SearchPage;
+ class HistoryPage;
+ class FavPage;
+
+ class VideoButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ VideoButtonCB()
+ {
+ eventHandler = VideoButtonCBFun;
+ };
+
+ virtual SceInt32 HandleEvent(SceInt32 eventId, ui::Widget *self, SceInt32 a3)
+ {
+ SceInt32 ret;
+
+ if ((this->state & 1) == 0) {
+ if (this->eventHandler != 0) {
+ EMPVAUtils::RunCallbackAsJob(this->eventHandler, SCE_NULL, eventId, self, a3, this->pUserData);
+ }
+ ret = SCE_OK;
+ }
+ else {
+ ret = SCE_PAF_ERROR_UI_EVENT_CALLBACK_UNHANDLED;
+ }
+
+ return ret;
+ };
+
+ virtual ~VideoButtonCB()
+ {
+
+ };
+
+ static SceVoid VideoButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ String url;
+ SceUInt32 mode;
+ };
+
+ class SearchParserThread : public thread::Thread
+ {
+ public:
+
+ using thread::Thread::Thread;
+
+ SceVoid EntryFunction();
+
+ static SceVoid CreateVideoButton(SearchPage *page, SceUInt32 index);
+
+ String newRequset;
+ SearchPage *prevPage;
+ SearchPage *workPage;
+ SceBool cancel;
+ };
+
+ class FavParserThread : public thread::Thread
+ {
+ public:
+
+ using thread::Thread::Thread;
+
+ SceVoid EntryFunction();
+
+ static SceVoid CreateVideoButton(FavPage *page, const char *data, SceUInt32 index, const char *keyWord);
+
+ String newRequset;
+ FavPage *prevPage;
+ FavPage *workPage;
+ SceBool cancel;
+ String keyWord;
+ };
+
+ class HistoryParserThread : public thread::Thread
+ {
+ public:
+
+ using thread::Thread::Thread;
+
+ SceVoid EntryFunction();
+
+ static SceVoid CreateVideoButton(HistoryPage *page, const char *data, SceUInt32 index);
+
+ String newRequset;
+ HistoryPage *workPage;
+ SceBool cancel;
+ };
+
+ class SearchActionButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ SearchActionButtonCB()
+ {
+ eventHandler = SearchActionButtonCBFun;
+ };
+
+ virtual ~SearchActionButtonCB()
+ {
+
+ };
+
+ static SceVoid SearchActionButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+
+ class SearchButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ SearchButtonCB()
+ {
+ eventHandler = SearchButtonCBFun;
+ };
+
+ virtual ~SearchButtonCB()
+ {
+
+ };
+
+ static SceVoid SearchButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+
+ class HistoryButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ HistoryButtonCB()
+ {
+ eventHandler = HistoryButtonCBFun;
+ };
+
+ virtual ~HistoryButtonCB()
+ {
+
+ };
+
+ static SceVoid HistoryButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+
+ class FavButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ FavButtonCB()
+ {
+ eventHandler = FavButtonCBFun;
+ };
+
+ virtual ~FavButtonCB()
+ {
+
+ };
+
+ static SceVoid FavButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+
+ class LeftButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ LeftButtonCB()
+ {
+ eventHandler = LeftButtonCBFun;
+ };
+
+ virtual ~LeftButtonCB()
+ {
+
+ };
+
+ static SceVoid LeftButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+
+ class RightButtonCB : public ui::Widget::EventCallback
+ {
+ public:
+
+ RightButtonCB()
+ {
+ eventHandler = RightButtonCBFun;
+ };
+
+ virtual ~RightButtonCB()
+ {
+
+ };
+
+ static SceVoid RightButtonCBFun(SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
+
+ };
+
+ class Base
+ {
+ public:
+
+ class NetCheckThread : public thread::Thread
+ {
+ public:
+
+ using thread::Thread::Thread;
+
+ SceVoid EntryFunction();
+ };
+
+ enum Mode
+ {
+ Mode_Search,
+ Mode_History,
+ Mode_Fav
+ };
+
+ static SceVoid InitCommon();
+
+ static SceVoid InitSearch();
+
+ static SceVoid InitHistory();
+
+ static SceVoid InitFav();
+
+ static SceVoid TermCommon();
+
+ static SceVoid TermCurrentMode();
+
+ static SceUInt32 GetCurrentMode();
+
+ static SceVoid FirstTimeInit();
+
+ private:
+
+ static const SceUInt32 k_netMemSize = 16 * 1024;
+
+ static SceInt32 InitYtStuff();
+
+ static SceVoid netCtlStateCB(SceInt32 event_type, ScePVoid arg);
+ };
+
+ class SearchPage
+ {
+ public:
+
+ SearchPage(SearchPage *prevPage);
+
+ SearchPage(const char *searchWord);
+
+ ~SearchPage();
+
+ static SceVoid LeftButtonOp();
+
+ static SceVoid RightButtonOp();
+
+ static SceVoid TermOp();
+
+ static SceVoid SearchActionButtonOp();
+
+ SearchPage *prev;
+ SearchPage *next;
+ YouTubeSearchResult *parseResult;
+ SearchParserThread *parserThread;
+ ui::Widget *thisPage;
+ SceUInt32 resultCount;
+
+ };
+
+ class HistoryPage
+ {
+ public:
+
+ HistoryPage();
+
+ ~HistoryPage();
+
+ static SceVoid LeftButtonOp();
+
+ static SceVoid RightButtonOp();
+
+ static SceVoid TermOp();
+
+ HistoryParserThread *parserThread;
+ ui::Widget *thisPage;
+ SceUInt32 resultCount;
+ };
+
+ class FavPage
+ {
+ public:
+
+ FavPage(FavPage *prevPage);
+
+ FavPage();
+
+ FavPage(const char *keyWord);
+
+ ~FavPage();
+
+ static SceVoid LeftButtonOp();
+
+ static SceVoid RightButtonOp();
+
+ static SceVoid TermOp();
+
+ static SceVoid SearchActionButtonOp();
+
+ FavPage *prev;
+ FavPage *next;
+ FavParserThread *parserThread;
+ ui::Widget *thisPage;
+ SceUInt32 resNum;
+ static const SceInt32 k_resPerPage = 10;
+ };
+ }
+}
+
+#endif
diff --git a/ElevenMPV-A/include/utils.h b/ElevenMPV-A/include/utils.h
index f26c07e..d4b8542 100644
--- a/ElevenMPV-A/include/utils.h
+++ b/ElevenMPV-A/include/utils.h
@@ -1,8 +1,6 @@
#ifndef _ELEVENMPV_UTILS_H_
#define _ELEVENMPV_UTILS_H_
-#include
-#include
#include
#include
@@ -29,7 +27,7 @@ extern "C" {
int sceShellUtilExitToLiveBoard();
}
-static const SceUInt32 k_supportedExtNum = 15;
+static const SceUInt32 k_supportedExtNum = 16;
static const SceUInt32 k_supportedCoverExtNum = 4;
static const char *k_supportedExtList[] =
@@ -48,7 +46,8 @@ static const char *k_supportedExtList[] =
"wav",
"at9",
"m4a",
- "aac"
+ "aac",
+ "webm"
};
static const char *k_supportedCoverExtList[] =
@@ -63,6 +62,77 @@ class EMPVAUtils
{
public:
+ enum MemState
+ {
+ MemState_Low,
+ MemState_Mid,
+ MemState_Full,
+ };
+
+ class PleaseWaitThread : public thread::Thread
+ {
+ public:
+
+ using thread::Thread::Thread;
+
+ SceVoid EntryFunction();
+
+ SceBool withCancel;
+ SceBool forceCancel;
+ SceBool userCancel;
+ };
+
+ class AsyncEnqueue : public paf::thread::JobQueue::Item
+ {
+ public:
+
+ using thread::JobQueue::Item::Item;
+
+ typedef void(*FinishHandler)();
+
+ ~AsyncEnqueue() {}
+
+ SceVoid Run()
+ {
+ EMPVAUtils::BeginPleaseWait();
+ eventHandler(eventId, self, a3, pUserData);
+ EMPVAUtils::EndPleaseWait();
+ }
+
+ SceVoid Finish()
+ {
+ if (finishHandler)
+ finishHandler();
+ }
+
+ static SceVoid JobKiller(thread::JobQueue::Item *job)
+ {
+ if (job)
+ delete job;
+ }
+
+ ui::Widget::EventCallback::EventHandler eventHandler;
+ FinishHandler finishHandler;
+ SceInt32 eventId;
+ ui::Widget *self;
+ SceInt32 a3;
+ ScePVoid pUserData;
+ };
+
+ class IPC
+ {
+ public:
+
+ static SceVoid Enable();
+
+ static SceVoid Disable();
+
+ static SceUInt32 PeekTx();
+
+ static SceVoid SendInfo(WString *title, WString *artist, WString *album, SceInt32 playBtState);
+
+ };
+
static SceVoid Init();
static SceBool IsSupportedExtension(const char *ext);
@@ -75,7 +145,7 @@ class EMPVAUtils
static SceUInt32 GetHash(const char *name);
- static SceWChar16 *GetStringWithNum(const char *name, SceUInt32 num);
+ static wchar_t *GetStringWithNum(const char *name, SceUInt32 num);
static SceUInt32 Downscale(SceInt32 ix, SceInt32 iy, ScePVoid ibuf, SceInt32 ox, SceInt32 oy, ScePVoid obuf);
@@ -95,19 +165,19 @@ class EMPVAUtils
static SceVoid Deactivate();
- class IPC
- {
- public:
+ static SceVoid SetMemStatus();
- static SceVoid Enable();
+ static SceInt32 GetMemStatus();
- static SceVoid Disable();
+ static SceInt32 GetPagemode();
- static SceUInt32 PeekTx();
+ static SceVoid SetPagemode(SceInt32 mode);
- static SceVoid SendInfo(WString *title, WString *artist, WString *album, SceInt32 playBtState);
+ static SceVoid RunCallbackAsJob(ui::Widget::EventCallback::EventHandler eventHandler, EMPVAUtils::AsyncEnqueue::FinishHandler finishHandler, SceInt32 eventId, ui::Widget *self, SceInt32 a3, ScePVoid pUserData);
- };
+ static SceVoid EMPVAUtils::BeginPleaseWait(SceBool withCancel = SCE_FALSE);
+
+ static SceVoid EMPVAUtils::EndPleaseWait();
private:
diff --git a/ElevenMPV-A/include/yt_utils.h b/ElevenMPV-A/include/yt_utils.h
new file mode 100644
index 0000000..850a491
--- /dev/null
+++ b/ElevenMPV-A/include/yt_utils.h
@@ -0,0 +1,92 @@
+#ifndef _ELEVENMPV_YTUTILS_H_
+#define _ELEVENMPV_YTUTILS_H_
+
+#include
+#include
+#include
+#include
+
+#include "netmedia.h"
+#include "downloader.h"
+
+using namespace paf;
+
+class YTUtils
+{
+public:
+
+ class Log
+ {
+ public:
+
+ Log()
+ {
+
+ }
+
+ ~Log()
+ {
+ ini->flush();
+ ini->close();
+ delete ini;
+ }
+
+ virtual SceInt32 GetNext(char *data);
+
+ virtual SceInt32 Get(const char *data);
+
+ virtual SceVoid Reset();
+
+ virtual SceVoid Add(const char *data);
+
+ virtual SceVoid Remove(const char *data);
+
+ virtual SceVoid Flush();
+
+ virtual SceInt32 GetSize();
+
+ protected:
+
+ sce::Ini::IniFileProcessor *ini;
+ };
+
+ class HistLog : public Log
+ {
+ public:
+
+ HistLog();
+
+ static SceVoid Clean();
+
+ static const SceUInt32 k_maxHistItems = 20;
+ };
+
+ class FavLog : public Log
+ {
+ public:
+
+ FavLog();
+
+ static SceVoid Clean();
+ };
+
+ static SceVoid Init();
+
+ static SceVoid Term(SceBool isFullTerm = SCE_FALSE);
+
+ static HistLog *GetHistLog();
+
+ static FavLog *GetFavLog();
+
+ static Downloader *GetDownloader();
+
+ static thread::Sema *GetMenuSema();
+
+ static SceVoid GetNETMedia(SceNmHandle *handle, SceAvPlayerFileReplacement *fio);
+
+ static ScePVoid NMAllocate(ScePVoid argP, SceUInt32 argAlignment, SceUInt32 argSize);
+
+ static SceVoid NMDeallocate(ScePVoid argP, ScePVoid argMemory);
+};
+
+#endif
diff --git a/ElevenMPV-A/libs/include/dr_flac.h b/ElevenMPV-A/libs/include/dr_flac.h
index 30dd48e..bbb04c6 100644
--- a/ElevenMPV-A/libs/include/dr_flac.h
+++ b/ElevenMPV-A/libs/include/dr_flac.h
@@ -1457,7 +1457,7 @@ static drflac_bool32 drflac__read_uint32(drflac_bs* bs, unsigned int bitCount,
static drflac_bool32 drflac__read_int32(drflac_bs* bs, unsigned int bitCount, drflac_int32* pResult)
{
- drflac_uint32 result;
+ drflac_uint32 result = 0;
drflac_uint32 signbit;
if (!drflac__read_uint32(bs, bitCount, &result)) {
@@ -1473,7 +1473,7 @@ static drflac_bool32 drflac__read_int32(drflac_bs* bs, unsigned int bitCount, dr
static drflac_bool32 drflac__read_uint16(drflac_bs* bs, unsigned int bitCount, drflac_uint16* pResult)
{
- drflac_uint32 result;
+ drflac_uint32 result = 0;
if (!drflac__read_uint32(bs, bitCount, &result)) {
return DRFLAC_FALSE;
@@ -3328,7 +3328,7 @@ static drflac_bool32 drflac__read_subframe_header(drflac_bs* bs, drflac_subframe
/* Wasted bits per sample. */
pSubframe->wastedBitsPerSample = 0;
if ((header & 0x01) == 1) {
- unsigned int wastedBitsPerSample;
+ unsigned int wastedBitsPerSample = 0;
if (!drflac__seek_past_next_set_bit(bs, &wastedBitsPerSample)) {
return DRFLAC_FALSE;
}
@@ -4242,8 +4242,6 @@ drflac_bool32 drflac__read_streaminfo(drflac_read_proc onRead, void* pUserData,
return DRFLAC_TRUE;
}
-#define ROUND_UP(x, a) ((((unsigned int)x)+((a)-1u))&(~((a)-1u)))
-
static void* drflac__malloc_default(size_t sz, void* pUserData)
{
(void)pUserData;
@@ -4659,7 +4657,7 @@ drflac_bool32 drflac__init_private__native(drflac_init_info* pInit, drflac_read_
/* Pre Condition: The bit stream should be sitting just past the 4-byte id header. */
drflac_uint8 isLastBlock = 0;
- drflac_uint8 blockType;
+ drflac_uint8 blockType = 0;
drflac_uint32 blockSize;
(void)onSeek;
diff --git a/ElevenMPV-A/libs/include/localmedia.h b/ElevenMPV-A/libs/include/localmedia.h
new file mode 100644
index 0000000..28b3970
--- /dev/null
+++ b/ElevenMPV-A/libs/include/localmedia.h
@@ -0,0 +1,85 @@
+/* SIE CONFIDENTIAL
+PlayStation(R)4 Programmer Tool Runtime Library Release 04.508.001
+* Copyright (C) 2015 Sony Interactive Entertainment Inc.
+* All Rights Reserved.
+*/
+
+#ifndef _LOCALMEDIA_H
+#define _LOCALMEDIA_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NM_PRX_BUILD
+#define PRX_EXPORT __declspec(dllexport)
+#else
+#define PRX_EXPORT
+#endif
+
+/// @brief
+/// The NETMedia library handle definition.
+///
+/// @ingroup libNetMedia
+ typedef void* SceNmHandle;
+
+/// @brief
+/// Initialises the NETMedia library.
+///
+/// @param nmHandle [O] Pointer to receive the handle of the initialised NETMedia library.
+/// @param pFileReplacement [O] Pointer to a file replacement structure that will receive the functions to be used
+/// for the NETMedia library. These should be passed in the call to sceAvPlayerInit.
+/// @param pNetBuffer [I] User allocated buffer to use as the download buffer. If NULL then a buffer of size
+/// buffsz will be allocated internally (the allocation will use pMemAllocator if set).
+/// @param buffsz [I] Size of the user allocated buffer or the size to allocate internally.
+/// @param sslCtxId [I] Identifier returned when the SSL stack was initialised.
+/// @param httpCtxId [I] Context received when the underlying HTTP stack was initialised.
+/// @param pMemAllocator [I] Pointer to the memory allocator instance to be used for all allocations.
+/// Optional parameter that may be set to NULL (default OS allocators will be used).
+/// @retval
+/// 0 The NETMedia library was initialised successfully.
+/// @retval
+/// <0 Initialisation failed.
+///
+/// @ingroup libNetMedia
+PRX_EXPORT int32_t LOCALMediaInit(SceNmHandle* nmHandle,
+ SceAvPlayerFileReplacement* pFileReplacement,
+ uint8_t* pNetBuffer,
+ size_t buffsz,
+ int32_t sslCtxId,
+ int32_t httpCtxId,
+ SceAvPlayerMemAllocator* pMemAllocator = NULL);
+
+/// @brief
+/// Terminates the NETMedia library.
+///
+/// @param nmHandle [I] The NETMedia library handle as returned by NETMediaInit.
+/// @param pMemAllocator [I] Pointer to the memory allocator instance passed in to NETMediaInit.
+// This must match what was passed in to NETMediaInit.
+/// @retval
+/// 0 The NETMedia library was terminated successfully.
+/// @retval
+/// <0 Termination failed. The return value will contain an error from SceLsmResult.
+///
+/// @ingroup libNetMedia
+PRX_EXPORT int32_t LOCALMediaDeInit(SceNmHandle nmHandle, SceAvPlayerMemAllocator* pMemAllocator = NULL);
+
+/// @brief
+/// Invalidates all NETMedia buffers.
+///
+/// @param nmHandle [I] The NETMedia library handle as returned by NETMediaInit.
+///
+/// @retval
+/// 0 Buffers invalidated.
+/// @retval
+/// <0 Invalidation failed.
+///
+/// @ingroup libNetMedia
+PRX_EXPORT int32_t LOCALMediaInvalidateAllBuffers(SceNmHandle nmHandle);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_LOCALMEDIA_H
diff --git a/ElevenMPV-A/libs/include/nestegg.h b/ElevenMPV-A/libs/include/nestegg.h
new file mode 100644
index 0000000..dc035e9
--- /dev/null
+++ b/ElevenMPV-A/libs/include/nestegg.h
@@ -0,0 +1,508 @@
+/*
+ * Copyright © 2010 Mozilla Foundation
+ *
+ * This program is made available under an ISC-style license. See the
+ * accompanying file LICENSE for details.
+ */
+#if !defined(NESTEGG_671cac2a_365d_ed69_d7a3_4491d3538d79)
+#define NESTEGG_671cac2a_365d_ed69_d7a3_4491d3538d79
+
+#include
+#include
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+/** @mainpage
+
+ @section intro Introduction
+
+ This is the documentation for the libnestegg C API.
+ libnestegg is a demultiplexing library for WebM
+ media files.
+
+ @section example Example code
+
+ @code
+ nestegg * demux_ctx;
+ nestegg_init(&demux_ctx, io, NULL, -1);
+
+ nestegg_packet * pkt;
+ while ((r = nestegg_read_packet(demux_ctx, &pkt)) > 0) {
+ unsigned int track;
+
+ nestegg_packet_track(pkt, &track);
+
+ // This example decodes the first track only.
+ if (track == 0) {
+ unsigned int chunk, chunks;
+
+ nestegg_packet_count(pkt, &chunks);
+
+ // Decode each chunk of data.
+ for (chunk = 0; chunk < chunks; ++chunk) {
+ unsigned char * data;
+ size_t data_size;
+
+ nestegg_packet_data(pkt, chunk, &data, &data_size);
+
+ example_codec_decode(codec_ctx, data, data_size);
+ }
+ }
+
+ nestegg_free_packet(pkt);
+ }
+
+ nestegg_destroy(demux_ctx);
+ @endcode
+*/
+
+
+/** @file
+ The libnestegg C API. */
+
+#define NESTEGG_TRACK_VIDEO 0 /**< Track is of type video. */
+#define NESTEGG_TRACK_AUDIO 1 /**< Track is of type audio. */
+#define NESTEGG_TRACK_UNKNOWN INT_MAX /**< Track is of type unknown. */
+
+#define NESTEGG_CODEC_VP8 0 /**< Track uses Google On2 VP8 codec. */
+#define NESTEGG_CODEC_VORBIS 1 /**< Track uses Xiph Vorbis codec. */
+#define NESTEGG_CODEC_VP9 2 /**< Track uses Google On2 VP9 codec. */
+#define NESTEGG_CODEC_OPUS 3 /**< Track uses Xiph Opus codec. */
+#define NESTEGG_CODEC_AV1 4 /**< Track uses AOMedia AV1 codec. */
+#define NESTEGG_CODEC_UNKNOWN INT_MAX /**< Track uses unknown codec. */
+
+#define NESTEGG_VIDEO_MONO 0 /**< Track is mono video. */
+#define NESTEGG_VIDEO_STEREO_LEFT_RIGHT 1 /**< Track is side-by-side stereo video. Left first. */
+#define NESTEGG_VIDEO_STEREO_BOTTOM_TOP 2 /**< Track is top-bottom stereo video. Right first. */
+#define NESTEGG_VIDEO_STEREO_TOP_BOTTOM 3 /**< Track is top-bottom stereo video. Left first. */
+#define NESTEGG_VIDEO_STEREO_RIGHT_LEFT 11 /**< Track is side-by-side stereo video. Right first. */
+
+#define NESTEGG_SEEK_SET 0 /**< Seek offset relative to beginning of stream. */
+#define NESTEGG_SEEK_CUR 1 /**< Seek offset relative to current position in stream. */
+#define NESTEGG_SEEK_END 2 /**< Seek offset relative to end of stream. */
+
+#define NESTEGG_LOG_DEBUG 1 /**< Debug level log message. */
+#define NESTEGG_LOG_INFO 10 /**< Informational level log message. */
+#define NESTEGG_LOG_WARNING 100 /**< Warning level log message. */
+#define NESTEGG_LOG_ERROR 1000 /**< Error level log message. */
+#define NESTEGG_LOG_CRITICAL 10000 /**< Critical level log message. */
+
+#define NESTEGG_ENCODING_COMPRESSION 0 /**< Content encoding type is compression. */
+#define NESTEGG_ENCODING_ENCRYPTION 1 /**< Content encoding type is encryption. */
+
+#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_FALSE 0 /**< Packet does not have signal byte */
+#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_UNENCRYPTED 1 /**< Packet has signal byte and is unencrypted */
+#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_ENCRYPTED 2 /**< Packet has signal byte and is encrypted */
+#define NESTEGG_PACKET_HAS_SIGNAL_BYTE_PARTITIONED 4 /**< Packet has signal byte and is partitioned */
+
+#define NESTEGG_PACKET_HAS_KEYFRAME_FALSE 0 /**< Packet contains only keyframes. */
+#define NESTEGG_PACKET_HAS_KEYFRAME_TRUE 1 /**< Packet does not contain any keyframes */
+#define NESTEGG_PACKET_HAS_KEYFRAME_UNKNOWN 2 /**< Packet may or may not contain keyframes */
+
+typedef struct nestegg nestegg; /**< Opaque handle referencing the stream state. */
+typedef struct nestegg_packet nestegg_packet; /**< Opaque handle referencing a packet of data. */
+
+/** User supplied IO context. */
+typedef struct {
+ /** User supplied read callback.
+ @param buffer Buffer to read data into.
+ @param length Length of supplied buffer in bytes.
+ @param userdata The #userdata supplied by the user.
+ @retval 1 Read succeeded.
+ @retval 0 End of stream.
+ @retval -1 Error. */
+ int (* read)(void * buffer, size_t length, void * userdata);
+
+ /** User supplied seek callback.
+ @param offset Offset within the stream to seek to.
+ @param whence Seek direction. One of #NESTEGG_SEEK_SET,
+ #NESTEGG_SEEK_CUR, or #NESTEGG_SEEK_END.
+ @param userdata The #userdata supplied by the user.
+ @retval 0 Seek succeeded.
+ @retval -1 Error. */
+ int (* seek)(int64_t offset, int whence, void * userdata);
+
+ /** User supplied tell callback.
+ @param userdata The #userdata supplied by the user.
+ @returns Current position within the stream.
+ @retval -1 Error. */
+ int64_t (* tell)(void * userdata);
+
+ /** User supplied pointer to be passed to the IO callbacks. */
+ void * userdata;
+} nestegg_io;
+
+/** Parameters specific to a video track. */
+typedef struct {
+ unsigned int stereo_mode; /**< Video mode. One of #NESTEGG_VIDEO_MONO,
+ #NESTEGG_VIDEO_STEREO_LEFT_RIGHT,
+ #NESTEGG_VIDEO_STEREO_BOTTOM_TOP, or
+ #NESTEGG_VIDEO_STEREO_TOP_BOTTOM. */
+ unsigned int width; /**< Width of the video frame in pixels. */
+ unsigned int height; /**< Height of the video frame in pixels. */
+ unsigned int display_width; /**< Display width of the video frame in pixels. */
+ unsigned int display_height; /**< Display height of the video frame in pixels. */
+ unsigned int crop_bottom; /**< Pixels to crop from the bottom of the frame. */
+ unsigned int crop_top; /**< Pixels to crop from the top of the frame. */
+ unsigned int crop_left; /**< Pixels to crop from the left of the frame. */
+ unsigned int crop_right; /**< Pixels to crop from the right of the frame. */
+ unsigned int alpha_mode; /**< 1 if an additional opacity stream is available, otherwise 0. */
+ unsigned int matrix_coefficients; /**< See Table 4 of ISO/IEC 23001-8:2016. */
+ unsigned int range; /**< Clipping of color ranges. */
+ unsigned int transfer_characteristics; /**< See Table 3 of ISO/IEC 23091-4. */
+ unsigned int primaries; /**< See Table 2 of ISO/IEC 23091-4. */
+ double primary_r_chromacity_x; /**< Red X chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double primary_r_chromacity_y; /**< Red Y chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double primary_g_chromacity_x; /**< Green X chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double primary_g_chromacity_y; /**< Green Y chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double primary_b_chromacity_x; /**< Blue X chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double primary_b_chromacity_y; /**< Blue Y chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double white_point_chromaticity_x; /**< White X chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double white_point_chromaticity_y; /**< White Y chromaticity coordinate per CIE 1931.
+ NaN means element not present. */
+ double luminance_max; /**< Maximum luminance in cd/m2.
+ NaN means element not present. */
+ double luminance_min; /**< Minimum luminance in cd/m2.
+ NaN means element not present. */
+} nestegg_video_params;
+
+/** Parameters specific to an audio track. */
+typedef struct {
+ double rate; /**< Sampling rate in Hz. */
+ unsigned int channels; /**< Number of audio channels. */
+ unsigned int depth; /**< Bits per sample. */
+ uint64_t codec_delay; /**< Nanoseconds that must be discarded from the start. */
+ uint64_t seek_preroll;/**< Nanoseconds that must be discarded after a seek. */
+} nestegg_audio_params;
+
+/** Logging callback function pointer. */
+typedef void (* nestegg_log)(nestegg * context, unsigned int severity, char const * format, ...);
+
+/** Initialize a nestegg context. During initialization the parser will
+ read forward in the stream processing all elements until the first
+ block of media is reached. All track metadata has been processed at this point.
+ @param context Storage for the new nestegg context. @see nestegg_destroy
+ @param io User supplied IO context.
+ @param callback Optional logging callback function pointer. May be NULL.
+ @param max_offset Optional maximum offset to be read. Set -1 to ignore.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_init(nestegg ** context, nestegg_io io, nestegg_log callback, int64_t max_offset);
+
+/** Destroy a nestegg context and free associated memory.
+ @param context #nestegg context to be freed. @see nestegg_init */
+void nestegg_destroy(nestegg * context);
+
+/** Query the duration of the media stream in nanoseconds.
+ @param context Stream context initialized by #nestegg_init.
+ @param duration Storage for the queried duration.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_duration(nestegg * context, uint64_t * duration);
+
+/** Query the tstamp scale of the media stream in nanoseconds.
+ @note Timestamps presented by nestegg have been scaled by this value
+ before presentation to the caller.
+ @param context Stream context initialized by #nestegg_init.
+ @param scale Storage for the queried scale factor.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_tstamp_scale(nestegg * context, uint64_t * scale);
+
+/** Query the number of tracks in the media stream.
+ @param context Stream context initialized by #nestegg_init.
+ @param tracks Storage for the queried track count.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_count(nestegg * context, unsigned int * tracks);
+
+/** Query the start and end offset for a particular cluster.
+ @param context Stream context initialized by #nestegg_init.
+ @param cluster_num Zero-based cluster number; order they appear in cues.
+ @param max_offset Optional maximum offset to be read. Set -1 to ignore.
+ @param start_pos Starting offset of the cluster. -1 means non-existant.
+ @param end_pos Starting offset of the cluster. -1 means non-existant or
+ final cluster.
+ @param tstamp Starting timestamp of the cluster.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_get_cue_point(nestegg * context, unsigned int cluster_num,
+ int64_t max_offset, int64_t * start_pos,
+ int64_t * end_pos, uint64_t * tstamp);
+
+/** Seek to @a offset. Stream will seek directly to offset.
+ Must be used to seek to the start of a cluster; the parser will not be
+ able to understand other offsets.
+ @param context Stream context initialized by #nestegg_init.
+ @param offset Absolute offset in bytes.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_offset_seek(nestegg * context, uint64_t offset);
+
+/** Seek @a track to @a tstamp. Stream seek will terminate at the earliest
+ key point in the stream at or before @a tstamp. Other tracks in the
+ stream will output packets with unspecified but nearby timestamps.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @param tstamp Absolute timestamp in nanoseconds.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_seek(nestegg * context, unsigned int track, uint64_t tstamp);
+
+/** Query the type specified by @a track.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @retval #NESTEGG_TRACK_VIDEO Track type is video.
+ @retval #NESTEGG_TRACK_AUDIO Track type is audio.
+ @retval #NESTEGG_TRACK_UNKNOWN Track type is unknown.
+ @retval -1 Error. */
+int nestegg_track_type(nestegg * context, unsigned int track);
+
+/** Query the codec ID specified by @a track.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @retval #NESTEGG_CODEC_VP8 Track codec is VP8.
+ @retval #NESTEGG_CODEC_VP9 Track codec is VP9.
+ @retval #NESTEGG_CODEC_AV1 Track codec is AV1.
+ @retval #NESTEGG_CODEC_VORBIS Track codec is Vorbis.
+ @retval #NESTEGG_CODEC_OPUS Track codec is Opus.
+ @retval #NESTEGG_CODEC_UNKNOWN Track codec is unknown.
+ @retval -1 Error. */
+int nestegg_track_codec_id(nestegg * context, unsigned int track);
+
+/** Query the number of codec initialization chunks for @a track. Each
+ chunk of data should be passed to the codec initialization functions in
+ the order returned.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @param count Storage for the queried chunk count.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_codec_data_count(nestegg * context, unsigned int track,
+ unsigned int * count);
+
+/** Get a pointer to chunk number @a item of codec initialization data for
+ @a track.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @param item Zero based chunk item number.
+ @param data Storage for the queried data pointer.
+ The data is owned by the #nestegg context.
+ @param length Storage for the queried data size.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_codec_data(nestegg * context, unsigned int track, unsigned int item,
+ unsigned char ** data, size_t * length);
+
+/** Query the video parameters specified by @a track.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @param params Storage for the queried video parameters.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_video_params(nestegg * context, unsigned int track,
+ nestegg_video_params * params);
+
+/** Query the audio parameters specified by @a track.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @param params Storage for the queried audio parameters.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_audio_params(nestegg * context, unsigned int track,
+ nestegg_audio_params * params);
+
+/** Query the encoding status for @a track. If a track has multiple encodings
+ the first will be returned.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @retval #NESTEGG_ENCODING_COMPRESSION The track is compressed, but not encrypted.
+ @retval #NESTEGG_ENCODING_ENCRYPTION The track is encrypted and compressed.
+ @retval -1 Error. */
+int nestegg_track_encoding(nestegg * context, unsigned int track);
+
+/** Query the ContentEncKeyId for @a track. Will return an error if the track
+ in not encrypted, or is not recognized.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @param content_enc_key_id Storage for queried id. The content encryption key used.
+ Owned by nestegg and will be freed separately.
+ @param content_enc_key_id_length Length of the queried ContentEncKeyId in bytes.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_content_enc_key_id(nestegg * context, unsigned int track,
+ unsigned char const ** content_enc_key_id,
+ size_t * content_enc_key_id_length);
+
+/** Query the default frame duration for @a track. For a video track, this
+ is typically the inverse of the video frame rate.
+ @param context Stream context initialized by #nestegg_init.
+ @param track Zero based track number.
+ @param duration Storage for the default duration in nanoseconds.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_track_default_duration(nestegg * context, unsigned int track,
+ uint64_t * duration);
+
+/** Reset parser state to the last valid state before nestegg_read_packet failed.
+ @param context Stream context initialized by #nestegg_init.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_read_reset(nestegg * context);
+
+/** Read a packet of media data. A packet consists of one or more chunks of
+ data associated with a single track. nestegg_read_packet should be
+ called in a loop while the return value is 1 to drive the stream parser
+ forward. @see nestegg_free_packet
+ @param context Context returned by #nestegg_init.
+ @param packet Storage for the returned nestegg_packet.
+ @retval 1 Additional packets may be read in subsequent calls.
+ @retval 0 End of stream.
+ @retval -1 Error. */
+int nestegg_read_packet(nestegg * context, nestegg_packet ** packet);
+
+/** Destroy a nestegg_packet and free associated memory.
+ @param packet #nestegg_packet to be freed. @see nestegg_read_packet */
+void nestegg_free_packet(nestegg_packet * packet);
+
+/** Query the keyframe status for a given packet.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @retval #NESTEGG_PACKET_HAS_KEYFRAME_FALSE Packet contains no keyframes.
+ @retval #NESTEGG_PACKET_HAS_KEYFRAME_TRUE Packet contains keyframes.
+ @retval #NESTEGG_PACKET_HAS_KEYFRAME_UNKNOWN Unknown packet keyframe content.
+ @retval -1 Error. */
+int nestegg_packet_has_keyframe(nestegg_packet * packet);
+
+/** Query the track number of @a packet.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param track Storage for the queried zero based track index.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_track(nestegg_packet * packet, unsigned int * track);
+
+/** Query the timestamp in nanoseconds of @a packet.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param tstamp Storage for the queried timestamp in nanoseconds.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_tstamp(nestegg_packet * packet, uint64_t * tstamp);
+
+/** Query the duration in nanoseconds of @a packet.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param duration Storage for the queried duration in nanoseconds.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_duration(nestegg_packet * packet, uint64_t * duration);
+
+/** Query the number of data chunks contained in @a packet.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param count Storage for the queried chunk count.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_count(nestegg_packet * packet, unsigned int * count);
+
+/** Get a pointer to chunk number @a item of packet data.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param item Zero based chunk item number.
+ @param data Storage for the queried data pointer.
+ The data is owned by the #nestegg_packet packet.
+ @param length Storage for the queried data size.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_data(nestegg_packet * packet, unsigned int item,
+ unsigned char ** data, size_t * length);
+
+/** Get a pointer to additional data with identifier @a id of additional packet
+ data. If @a id isn't present in the packet, returns -1.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param id Codec specific identifer. For VP8, use 1 to get a VP8 encoded
+ frame containing an alpha channel in its Y plane.
+ @param data Storage for the queried data pointer.
+ The data is owned by the #nestegg_packet packet.
+ @param length Storage for the queried data size.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_additional_data(nestegg_packet * packet, unsigned int id,
+ unsigned char ** data, size_t * length);
+
+/** Returns discard_padding for given packet
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param discard_padding pointer to store discard padding in.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_discard_padding(nestegg_packet * packet,
+ int64_t * discard_padding);
+
+/** Query if a packet is encrypted.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @retval #NESTEGG_PACKET_HAS_SIGNAL_BYTE_FALSE No signal byte, encryption
+ information not read from packet.
+ @retval #NESTEGG_PACKET_HAS_SIGNAL_BYTE_UNENCRYPTED Encrypted bit not
+ set, encryption information not read from packet.
+ @retval #NESTEGG_PACKET_HAS_SIGNAL_BYTE_ENCRYPTED Encrypted bit set,
+ encryption infomation read from packet.
+ @retval #NESTEGG_PACKET_HAS_SIGNAL_BYTE_PARTITIONED Partitioned bit set,
+ encryption and parition information read from packet.
+ @retval -1 Error.*/
+int nestegg_packet_encryption(nestegg_packet * packet);
+
+/** Query the IV for an encrypted packet. Expects a packet from an encrypted
+ track, and will return error if given a packet that has no signal btye.
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param iv Storage for queried iv.
+ @param length Length of returned iv, may be 0.
+ The data is owned by the #nestegg_packet packet.
+ @retval 0 Success.
+ @retval -1 Error.
+ */
+int nestegg_packet_iv(nestegg_packet * packet, unsigned char const ** iv,
+ size_t * length);
+
+/** Query the packet for offsets.
+@param packet Packet initialized by #nestegg_read_packet.
+@param partition_offsets Storage for queried offsets.
+@param num_offsets Length of returned offsets, may be 0.
+The data is owned by the #nestegg_packet packet.
+@retval 0 Success.
+@retval -1 Error.
+*/
+int nestegg_packet_offsets(nestegg_packet * packet,
+ uint32_t const ** partition_offsets,
+ uint8_t * num_offsets);
+
+/** Returns reference_block given packet
+ @param packet Packet initialized by #nestegg_read_packet.
+ @param reference_block pointer to store reference block in.
+ @retval 0 Success.
+ @retval -1 Error. */
+int nestegg_packet_reference_block(nestegg_packet * packet,
+ int64_t * reference_block);
+
+/** Query the presence of cues.
+ @param context Stream context initialized by #nestegg_init.
+ @retval 0 The media has no cues.
+ @retval 1 The media has cues. */
+int nestegg_has_cues(nestegg * context);
+
+/** Try to determine if the buffer looks like the beginning of a WebM file.
+ @param buffer A buffer containing the beginning of a media file.
+ @param length The size of the buffer.
+ @retval 0 The file is not a WebM file.
+ @retval 1 The file is a WebM file. */
+int nestegg_sniff(unsigned char const * buffer, size_t length);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* NESTEGG_671cac2a_365d_ed69_d7a3_4491d3538d79 */
diff --git a/ElevenMPV-A/libs/include/netmedia.h b/ElevenMPV-A/libs/include/netmedia.h
new file mode 100644
index 0000000..741d4df
--- /dev/null
+++ b/ElevenMPV-A/libs/include/netmedia.h
@@ -0,0 +1,85 @@
+/* SIE CONFIDENTIAL
+PlayStation(R)4 Programmer Tool Runtime Library Release 04.508.001
+* Copyright (C) 2015 Sony Interactive Entertainment Inc.
+* All Rights Reserved.
+*/
+
+#ifndef _NETMEDIA_H
+#define _NETMEDIA_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef NM_PRX_BUILD
+#define PRX_EXPORT __declspec(dllexport)
+#else
+#define PRX_EXPORT
+#endif
+
+/// @brief
+/// The NETMedia library handle definition.
+///
+/// @ingroup libNetMedia
+ typedef void* SceNmHandle;
+
+/// @brief
+/// Initialises the NETMedia library.
+///
+/// @param nmHandle [O] Pointer to receive the handle of the initialised NETMedia library.
+/// @param pFileReplacement [O] Pointer to a file replacement structure that will receive the functions to be used
+/// for the NETMedia library. These should be passed in the call to sceAvPlayerInit.
+/// @param pNetBuffer [I] User allocated buffer to use as the download buffer. If NULL then a buffer of size
+/// buffsz will be allocated internally (the allocation will use pMemAllocator if set).
+/// @param buffsz [I] Size of the user allocated buffer or the size to allocate internally.
+/// @param sslCtxId [I] Identifier returned when the SSL stack was initialised.
+/// @param httpCtxId [I] Context received when the underlying HTTP stack was initialised.
+/// @param pMemAllocator [I] Pointer to the memory allocator instance to be used for all allocations.
+/// Optional parameter that may be set to NULL (default OS allocators will be used).
+/// @retval
+/// 0 The NETMedia library was initialised successfully.
+/// @retval
+/// <0 Initialisation failed.
+///
+/// @ingroup libNetMedia
+PRX_EXPORT int32_t NETMediaInit(SceNmHandle* nmHandle,
+ SceAvPlayerFileReplacement* pFileReplacement,
+ uint8_t* pNetBuffer,
+ size_t buffsz,
+ int32_t sslCtxId,
+ int32_t httpCtxId,
+ SceAvPlayerMemAllocator* pMemAllocator = NULL);
+
+/// @brief
+/// Terminates the NETMedia library.
+///
+/// @param nmHandle [I] The NETMedia library handle as returned by NETMediaInit.
+/// @param pMemAllocator [I] Pointer to the memory allocator instance passed in to NETMediaInit.
+// This must match what was passed in to NETMediaInit.
+/// @retval
+/// 0 The NETMedia library was terminated successfully.
+/// @retval
+/// <0 Termination failed. The return value will contain an error from SceLsmResult.
+///
+/// @ingroup libNetMedia
+PRX_EXPORT int32_t NETMediaDeInit(SceNmHandle nmHandle, SceAvPlayerMemAllocator* pMemAllocator = NULL);
+
+/// @brief
+/// Invalidates all NETMedia buffers.
+///
+/// @param nmHandle [I] The NETMedia library handle as returned by NETMediaInit.
+///
+/// @retval
+/// 0 Buffers invalidated.
+/// @retval
+/// <0 Invalidation failed.
+///
+/// @ingroup libNetMedia
+PRX_EXPORT int32_t NETMediaInvalidateAllBuffers(SceNmHandle nmHandle);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif //_NETMEDIA_H
diff --git a/ElevenMPV-A/libs/include/youtube_parser.hpp b/ElevenMPV-A/libs/include/youtube_parser.hpp
new file mode 100644
index 0000000..071befe
--- /dev/null
+++ b/ElevenMPV-A/libs/include/youtube_parser.hpp
@@ -0,0 +1,174 @@
+#pragma once
+#include
+#include
+#include