Skip to content

Commit

Permalink
getMediaFileInfo in TeamTalkPy API
Browse files Browse the repository at this point in the history
  • Loading branch information
bear101 committed Feb 29, 2024
1 parent d3ddffb commit ea0e776
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Library/TeamTalkPy/TeamTalk5.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ def function_factory(func, signature):
_InitLocalPlayback = function_factory(dll.TT_InitLocalPlayback, [INT32, [_TTInstance, TTCHAR_P, POINTER(MediaFilePlayback)]])
_UpdateLocalPlayback = function_factory(dll.TT_UpdateLocalPlayback, [BOOL, [_TTInstance, INT32, POINTER(MediaFilePlayback)]])
_StopLocalPlayback = function_factory(dll.TT_StopLocalPlayback, [BOOL, [_TTInstance, INT32]])
_GetMediaFileInfo = function_factory(dll.TT_GetMediaFileInfo, [BOOL, [_TTInstance, TTCHAR_P, POINTER(MediaFileInfo)]])
_GetMediaFileInfo = function_factory(dll.TT_GetMediaFileInfo, [BOOL, [TTCHAR_P, POINTER(MediaFileInfo)]])
_SetEncryptionContext = function_factory(dll.TT_SetEncryptionContext, [BOOL, [_TTInstance, POINTER(EncryptionContext)]])
_Connect = function_factory(dll.TT_Connect, [BOOL, [_TTInstance, TTCHAR_P, INT32, INT32, INT32, INT32, BOOL]])
_ConnectSysID = function_factory(dll.TT_ConnectSysID, [BOOL, [_TTInstance, TTCHAR_P, INT32, INT32, INT32, INT32, BOOL, TTCHAR_P]])
Expand Down Expand Up @@ -1634,6 +1634,10 @@ def acquireUserAudioBlock(self, uStreamTypes: StreamType, nUserID: int) -> POINT
def releaseUserAudioBlock(self, lpAudioBlock: POINTER(AudioBlock)) -> bool:
return _ReleaseUserAudioBlock(self._tt, lpAudioBlock)

def getMediaFileInfo(szMediaFilePath) -> MediaFileInfo:
mfi = MediaFileInfo()
_GetMediaFileInfo(szMediaFilePath, mfi)
return mfi

# event handling

Expand Down

0 comments on commit ea0e776

Please sign in to comment.