Skip to content

Commit

Permalink
Stub cellVideoUpload module (#2642)
Browse files Browse the repository at this point in the history
  • Loading branch information
scribam authored and Nekotekina committed Apr 7, 2017
1 parent 22ec8c4 commit 4c4b353
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 2 deletions.
8 changes: 6 additions & 2 deletions rpcs3/Emu/Cell/Modules/cellVideoUpload.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"

#include "cellVideoUpload.h"

logs::channel cellVideoUpload("cellVideoUpload", logs::level::notice);

s32 cellVideoUploadInitialize()
s32 cellVideoUploadInitialize(vm::cptr<CellVideoUploadParam> pParam, vm::ptr<CellVideoUploadCallback> cb, vm::ptr<void> userdata)
{
fmt::throw_exception("Unimplemented" HERE);
cellVideoUpload.todo("cellVideoUploadInitialize(pParam=*0x%x, cb=*0x%x, userdata=*0x%x)", pParam, cb, userdata);

return CELL_OK;
}

DECLARE(ppu_module_manager::cellVideoUpload)("cellVideoUpload", []()
Expand Down
61 changes: 61 additions & 0 deletions rpcs3/Emu/Cell/Modules/cellVideoUpload.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#pragma once

namespace vm { using namespace ps3; }

struct CellVideoUploadOption
{
be_t<s32> type;
be_t<u64> value;
};

struct CellVideoUploadParam
{
be_t<s32> siteID;
vm::bcptr<char> pFilePath;
union
{
struct
{
vm::bcptr<char> pClientId;
vm::bcptr<char> pDeveloperKey;
vm::bcptr<char> pTitle_UTF8;
vm::bcptr<char> pDescription_UTF8;
vm::bcptr<char> pKeyword_1_UTF8;
vm::bcptr<char> pKeyword_2_UTF8;
vm::bcptr<char> pKeyword_3_UTF8;
u8 isPrivate;
u8 rating;
} youtube;
} u;
be_t<s32> numOfOption;
vm::bptr<CellVideoUploadOption> pOption;
};

typedef void(CellVideoUploadCallback)(s32 status, s32 errorCode, vm::cptr<char> pResultURL, vm::ptr<void> userdata);

enum
{
CELL_VIDEO_UPLOAD_MAX_FILE_PATH_LEN = 1023,
CELL_VIDEO_UPLOAD_MAX_YOUTUBE_CLIENT_ID_LEN = 64,
CELL_VIDEO_UPLOAD_MAX_YOUTUBE_DEVELOPER_KEY_LEN = 128,
CELL_VIDEO_UPLOAD_MAX_YOUTUBE_TITLE_LEN = 61,
CELL_VIDEO_UPLOAD_MAX_YOUTUBE_DESCRIPTION_LEN = 1024,
CELL_VIDEO_UPLOAD_MAX_YOUTUBE_KEYWORD_LEN = 25
};

// Return Codes
enum
{
CELL_VIDEO_UPLOAD_ERROR_CANCEL = 0x8002d000,
CELL_VIDEO_UPLOAD_ERROR_NETWORK = 0x8002d001,
CELL_VIDEO_UPLOAD_ERROR_SERVICE_STOP = 0x8002d002,
CELL_VIDEO_UPLOAD_ERROR_SERVICE_BUSY = 0x8002d003,
CELL_VIDEO_UPLOAD_ERROR_SERVICE_UNAVAILABLE = 0x8002d004,
CELL_VIDEO_UPLOAD_ERROR_SERVICE_QUOTA = 0x8002d005,
CELL_VIDEO_UPLOAD_ERROR_ACCOUNT_STOP = 0x8002d006,
CELL_VIDEO_UPLOAD_ERROR_OUT_OF_MEMORY = 0x8002d020,
CELL_VIDEO_UPLOAD_ERROR_FATAL = 0x8002d021,
CELL_VIDEO_UPLOAD_ERROR_INVALID_VALUE = 0x8002d022,
CELL_VIDEO_UPLOAD_ERROR_FILE_OPEN = 0x8002d023,
CELL_VIDEO_UPLOAD_ERROR_INVALID_STATE = 0x8002d024
};
1 change: 1 addition & 0 deletions rpcs3/emucore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,7 @@
<ClInclude Include="Emu\Cell\Modules\cellUserInfo.h" />
<ClInclude Include="Emu\Cell\Modules\cellVdec.h" />
<ClInclude Include="Emu\Cell\Modules\cellVideoOut.h" />
<ClInclude Include="Emu\Cell\Modules\cellVideoUpload.h" />
<ClInclude Include="Emu\Cell\Modules\cellVpost.h" />
<ClInclude Include="Emu\Cell\Modules\cellWebBrowser.h" />
<ClInclude Include="Emu\Cell\Modules\libmixer.h" />
Expand Down
3 changes: 3 additions & 0 deletions rpcs3/emucore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1384,6 +1384,9 @@
<ClInclude Include="Emu\Cell\Modules\cellVideoOut.h">
<Filter>Emu\Cell\Modules</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\Modules\cellVideoUpload.h">
<Filter>Emu\Cell\Modules</Filter>
</ClInclude>
<ClInclude Include="Emu\Cell\Modules\cellVpost.h">
<Filter>Emu\Cell\Modules</Filter>
</ClInclude>
Expand Down

0 comments on commit 4c4b353

Please sign in to comment.