Skip to content

Commit

Permalink
Add MFPlayer.dll
Browse files Browse the repository at this point in the history
Add MFPlayer.dll for x86 and x64 with headers
  • Loading branch information
mrfearless committed Jan 17, 2025
1 parent ae857aa commit 84b279d
Show file tree
Hide file tree
Showing 34 changed files with 3,982 additions and 0 deletions.
533 changes: 533 additions & 0 deletions MFPlayer-x64/MFPlayer.h

Large diffs are not rendered by default.

533 changes: 533 additions & 0 deletions MFPlayer-x86/MFPlayer.h

Large diffs are not rendered by default.

Binary file added MFPlayerDll-x64/MFPlayer.dll
Binary file not shown.
533 changes: 533 additions & 0 deletions MFPlayerDll-x64/MFPlayer.h

Large diffs are not rendered by default.

579 changes: 579 additions & 0 deletions MFPlayerDll-x64/MFPlayer.inc

Large diffs are not rendered by default.

Binary file added MFPlayerDll-x64/MFPlayer.lib
Binary file not shown.
78 changes: 78 additions & 0 deletions MFPlayerDll-x64/MFPlayerDll.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
;==============================================================================
;
; MFPlayer x64 DLL
;
; http://github.com/mrfearless
;
; This software is provided 'as-is', without any express or implied warranty.
; In no event will the author be held liable for any damages arising from the
; use of this software.
;
;==============================================================================
;
; MFPlayer Library consists of functions that wrap the MFPlay COM
; implementation of the IMFPMediaPlayer and IMFPMediaItem objects. MFPlay is a
; Microsoft Media Foundation API for creating media playback applications. Thus
; the MFPlayer Library functions hide the complexities of interacting with the
; COM objects.
;
;-------------------------------------------------------------------------------
.686
.MMX
.XMM
.x64

option casemap : none
option win64 : 11
option frame : auto

includelib user32.lib
includelib kernel32.lib
includelib MFPlay.lib

IFNDEF MFPCreateMediaPlayer
MFPCreateMediaPlayer PROTO pwszURL:QWORD, fStartPlayback:QWORD, creationOptions:QWORD, pCallback:QWORD, hWnd:QWORD, ppMediaPlayer:QWORD
ENDIF

DLL_PROCESS_ATTACH EQU 1
DLL_THREAD_ATTACH EQU 2
DLL_THREAD_DETACH EQU 3
DLL_PROCESS_DETACH EQU 0
DLL_PROCESS_VERIFIER EQU 4

FALSE EQU 0
TRUE EQU 1

HINSTANCE typedef ptr
LPVOID typedef ptr

;--------------------------------------
; Conditionals
;--------------------------------------
MFPLAYER_DLL EQU 1

;--------------------------------------
; Main Include File
;--------------------------------------
Include .\..\MFPlayer.inc

;--------------------------------------
; Main Library Files
;--------------------------------------
Include .\..\MFPlayer.asm


.CODE

;=====================================================================================
; Main entry function for a DLL file - required.
;-------------------------------------------------------------------------------------
DllMain PROC hinstDLL:HINSTANCE, fdwReason:DWORD, lpvReserved:LPVOID
.IF fdwReason == DLL_PROCESS_ATTACH
.ENDIF
mov rax, TRUE
ret
DllMain ENDP

END DllMain
104 changes: 104 additions & 0 deletions MFPlayerDll-x64/MFPlayerDll.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
;==============================================================================
;
; MFPlayer x64 DLL
;
; http://github.com/mrfearless
;
; This software is provided 'as-is', without any express or implied warranty.
; In no event will the author be held liable for any damages arising from the
; use of this software.
;
;==============================================================================

LIBRARY MFPlayer
EXPORTS

; MFPMediaPlayer Functions:
MFPMediaPlayer_Init
MFPMediaPlayer_Free

MFPMediaPlayer_Play
MFPMediaPlayer_Pause
MFPMediaPlayer_Stop
MFPMediaPlayer_Step
MFPMediaPlayer_Toggle

MFPMediaPlayer_ClearMediaItem
MFPMediaPlayer_SetMediaItem
MFPMediaPlayer_GetMediaItem
MFPMediaPlayer_CreateMediaItemA
MFPMediaPlayer_CreateMediaItemW
MFPMediaPlayer_CreateMediaItemFromObject

MFPMediaPlayer_GetState
MFPMediaPlayer_SetPosition
MFPMediaPlayer_GetPosition
MFPMediaPlayer_GetDuration

MFPMediaPlayer_SetRate
MFPMediaPlayer_GetRate
MFPMediaPlayer_GetSupportedRates

MFPMediaPlayer_GetVolume
MFPMediaPlayer_SetVolume
MFPMediaPlayer_GetBalance
MFPMediaPlayer_SetBalance
MFPMediaPlayer_GetMute
MFPMediaPlayer_SetMute

MFPMediaPlayer_GetNativeVideoSize
MFPMediaPlayer_GetIdealVideoSize
MFPMediaPlayer_SetVideoSourceRect
MFPMediaPlayer_GetVideoSourceRect

MFPMediaPlayer_SetAspectRatioMode
MFPMediaPlayer_GetAspectRatioMode

MFPMediaPlayer_GetVideoWindow
MFPMediaPlayer_UpdateVideo
MFPMediaPlayer_SetBorderColor
MFPMediaPlayer_GetBorderColor

MFPMediaPlayer_InsertEffect
MFPMediaPlayer_RemoveEffect
MFPMediaPlayer_RemoveAllEffects
MFPMediaPlayer_Shutdown

; MFPMediaItem Functions:
MFPMediaItem_Release
MFPMediaItem_GetMediaPlayer
MFPMediaItem_GetURLA
MFPMediaItem_GetURLW

MFPMediaItem_SetUserData
MFPMediaItem_GetUserData

MFPMediaItem_SetStartStopPosition
MFPMediaItem_GetStartStopPosition

MFPMediaItem_HasVideo
MFPMediaItem_HasAudio
MFPMediaItem_IsProtected

MFPMediaItem_GetDuration
MFPMediaItem_GetNumberOfStreams
MFPMediaItem_SetStreamSelection
MFPMediaItem_GetStreamSelection

MFPMediaItem_GetStreamAttribute
MFPMediaItem_GetPresentationAttribute
MFPMediaItem_GetCharacteristics
MFPMediaItem_GetMetadata

MFPMediaItem_SetStreamSink

; Media Information
MFPMediaItem_StreamTable

; Misc
MFPConvertMSTimeToTimeStringA
MFPConvertMSTimeToTimeStringW

MFPConvertStringToAnsi
MFPConvertStringToWide
MFPConvertStringFree
139 changes: 139 additions & 0 deletions MFPlayerDll-x64/MFPlayerDll.rap
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
[Project]
Assembler=UASM64
Type=Dll64 Project
Description=MFPlayerDll
Backup=$P\Bak\
Group=1
GroupExpand=1
Debug=0
Ver.rc=1
[Files]
1=MFPlayerDll.asm
2=MFPlayer.h
3=MFPlayerDll.rc
4=MFPlayerDll.def
[MakeFiles]
0=MFPlayerDll.rap
1=MFPlayerDll.rc
2=MFPlayerDll.asm
3=MFPlayerDll.obj
4=MFPlayerDll.res
5=MFPlayerDll.exe
6=MFPlayerDll.def
7=MFPlayerDll.dll
8=MFPlayerDll.txt
9=MFPlayerDll.lib
10=MFPlayerDll.mak
11=MFPlayerDll.inf
12=MFPlayerDll.com
13=MFPlayerDll.ocx
14=MFPlayerDll.idl
15=MFPlayerDll.tlb
16=MFPlayerDll.sys
17=MFPlayerDll.dp32
18=MFPlayerDll.pdb
19=MFPlayerDll.dp64
[MakeDef]
Menu=1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
1=4,O,$B\RC.EXE /v,1
2=3,O,$B\UASM64.exe /DMFPLAYER_DLL /c -win64 -Zp8 /win64 /D_WIN64 /Cp /nologo /W2 /I"$I",2
3=7,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /RELEASE /DLL /DEF:"MFPlayerDll.def" /MACHINE:X64 /LIBPATH:"$L" /OUT:"MFPlayer.dll",3,4
4=0,0,,5
5=rsrc.obj,O,$B\CVTRES.EXE,rsrc.res
6=*.obj,O,$B\UASM64.exe /c -win64 -Zp8 /win64 /D_WIN64 /Cp /nologo /W2 /I"$I",*.asm
7=0,0,"$E\x64\x64dbg",5
11=4,O,$B\RC.EXE /v,1
12=3,O,$B\UASM64.exe /c -win64 -Zp8 /win64 /D_WIN64 /Cp /nologo /W2 /Zi /Zd /I"$I",2
13=7,O,$B\LINK.EXE /SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /PDB:"$18" /DLL /DEF:$6 /MACHINE:X64 /LIBPATH:"$L" /OUT:"$7",3
14=0,0,,5
15=rsrc.obj,O,$B\CVTRES.EXE,rsrc.res
16=*.obj,O,$B\UASM64.exe /c -win64 -Zp8 /win64 /D_WIN64 /Cp /nologo /W2 /Zi /Zd /I"$I",*.asm
17=0,0,"$E\x64\x64dbg",$.exe
[Group]
Group=Assembly,Resources
1=1
2=1
3=2
4=1
[AutoLoad]
AutoLoad=2,4,1
[RADebugBP]
4=
1=
2=
[VerInf]
Nme=VERINF1
ID=1
FV=1.0.0.0
PV=1.0.0.0
VerOS=0x00000004
VerFT=0x00000002
VerLNG=0x00000409
VerCHS=0x000004B0
ProductVersion=1.0.0.0
ProductName=MFPlayer.dll
OriginalFilename=MFPlayer.dll
LegalTrademarks=
LegalCopyright=
InternalName=MFPlayer.dll
FileDescription=MFPlayer.dll
FileVersion=1.0.0.0
CompanyName=fearless
[VersionControl]
Settings=1279
Milestones=129
MilestoneEvery=10
MilestoneEveryCurrent=0
MilestoneOnBuild=0.0.0.0
MilestoneOnTime=2
MilestoneOnDate=0
MilestoneOnDateWhen=1
MilestoneOnDateStatus=0
MilestoneOnDateDate=17
MilestoneOnDateTimeYear=2025
MilestoneOnDateTimeMonth=1
MilestoneOnDateTimeDate=17
MilestoneOnDateTimeHour=12
MilestoneOnDateTimeMin=37
MilestoneOnDateTimeSec=58
MilestoneOnDateTimeStatus=0
BackupLocation=M:\radasm\UASM64\Projects\VCBackups\
CompressionLevel=0
DefaultComment=Project $N, $Z, Backup Created On $D At $T.
ExcludeExt1=\
ExcludeExt2=\
ExcludeExt3=\
ExcludeExt4=\
FileVerLength=4
FileVer2Range=0
FileVer3Range=0
FileVer4Range=0
ProductVerLength=4
ProductVer2Range=0
ProductVer3Range=0
ProductVer4Range=0
[PTimer]
PTimer=1723532
[Collapse]
1=
2=
4=
[Size]
1=0,0,0,0,1128
2=0,0,0,0,19000
4=0,0,0,0,96
[GroupExpand]
GroupExpand=1,1,0
[BookMark]
0=
1=
2=
3=
4=
5=
6=
7=
8=
9=
[BreakPoint]
0=
1 change: 1 addition & 0 deletions MFPlayerDll-x64/MFPlayerDll.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "Res/MFPlayerDllVer.rc"
25 changes: 25 additions & 0 deletions MFPlayerDll-x64/Res/MFPlayerDllVer.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#define VERINF1 1
VERINF1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS 0x00000004
FILETYPE 0x00000002
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0"
BEGIN
VALUE "CompanyName", "fearless\0"
VALUE "FileVersion", "1.0.0.0\0"
VALUE "FileDescription", "MFPlayer.dll\0"
VALUE "InternalName", "MFPlayer.dll\0"
VALUE "OriginalFilename", "MFPlayer.dll\0"
VALUE "ProductName", "MFPlayer.dll\0"
VALUE "ProductVersion", "1.0.0.0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 0x04B0
END
END
Binary file added MFPlayerDll-x64/mfplay.lib
Binary file not shown.
Binary file added MFPlayerDll-x86/MFPlayer.dll
Binary file not shown.
Loading

0 comments on commit 84b279d

Please sign in to comment.