TeamTalk 5 .NET DLL
Version 5.14A
|
Get or query the raw RGB32 bitmap data of a user's video frame. More...
Classes | |
struct | BearWare.AudioFormat |
Struct describing the audio format used by a media file. More... | |
struct | BearWare.MediaFileInfo |
Struct describing the audio and video format used by a media file. More... | |
struct | BearWare.MediaFilePlayback |
Properties for initializing or updating a file for media streaming. More... | |
struct | BearWare.AudioInputProgress |
The progress of the audio currently being processed as audio input. More... | |
Enumerations | |
enum class | BearWare.MediaFileStatus : uint { BearWare.MFS_CLOSED = 0 , BearWare.MFS_ERROR = 1 , BearWare.MFS_STARTED = 2 , BearWare.MFS_FINISHED = 3 , BearWare.MFS_ABORTED = 4 , BearWare.MFS_PAUSED = 5 , BearWare.MFS_PLAYING = 6 } |
Status of media file being written to disk. More... | |
enum class | BearWare.AudioFileFormat : uint { BearWare.AFF_NONE = 0 , BearWare.AFF_CHANNELCODEC_FORMAT = 1 , BearWare.AFF_WAVE_FORMAT = 2 , BearWare.AFF_MP3_16KBIT_FORMAT = 3 , BearWare.AFF_MP3_32KBIT_FORMAT = 4 , BearWare.AFF_MP3_64KBIT_FORMAT = 5 , BearWare.AFF_MP3_128KBIT_FORMAT = 6 , BearWare.AFF_MP3_256KBIT_FORMAT = 7 } |
Media file formats supported for muxed audio recordings. More... | |
Functions | |
bool | BearWare.TeamTalkBase.StartStreamingMediaFileToChannel (string szMediaFilePath, VideoCodec lpVideoCodec) |
Stream media file to channel, e.g. avi-, wav- or MP3-file. More... | |
bool | BearWare.TeamTalkBase.StartStreamingMediaFileToChannel (string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec) |
Stream media file to channel, e.g. avi-, wav- or MP3-file. More... | |
bool | BearWare.TeamTalkBase.UpdateStreamingMediaFileToChannel (MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec) |
Update active media file being streamed to channel. More... | |
bool | BearWare.TeamTalkBase.StopStreamingMediaFileToChannel () |
Stop streaming media file to channel. More... | |
int | BearWare.TeamTalkBase.InitLocalPlayback (string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback) |
Play media file using settings from TeamTalkBase instance. More... | |
bool | BearWare.TeamTalkBase.UpdateLocalPlayback (int nPlaybackSessionID, MediaFilePlayback lpMediaFilePlayback) |
bool | BearWare.TeamTalkBase.StopLocalPlayback (int nPlaybackSessionID) |
static bool | BearWare.TeamTalkBase.GetMediaFileInfo (string szMediaFilePath, ref MediaFileInfo lpMediaFileInfo) |
Get the properties of a media file. More... | |
VideoFrame | BearWare.TeamTalkBase.AcquireUserMediaVideoFrame (int nUserID, out Bitmap bmp) |
Extract a user's media video frame for display. More... | |
bool | BearWare.TeamTalkBase.ReleaseUserMediaVideoFrame (VideoFrame lpVideoFrame) |
Delete a user's video frame, acquired through TeamTalkBase.AcquireUserMediaVideoFrame(), so its allocated resources can be released. More... | |
Variables | |
const uint | BearWare.TeamTalkBase.TT_MEDIAPLAYBACK_OFFSET_IGNORE = 0xFFFFFFFF |
Get or query the raw RGB32 bitmap data of a user's video frame.
Media files, mp3, avi, wmv, wma, etc. can be streamed to a channel and controlled separately from the voice and video capture input. Streaming a media file requires UserRight.USERRIGHT_TRANSMIT_MEDIAFILE_AUDIO and/or UserRight.USERRIGHT_TRANSMIT_MEDIAFILE_VIDEO.
The media formats supported by the TeamTalk DLL depends on the platform. On Windows the Windows Media Player's API is used to convert media files to TeamTalk's internal formats (i.e. Speex, OPUS and WebM). So whatever Windows Media Player can play should also be possible to stream using TeamTalkBase. On Mac and Linux avconv is used for converting media files which in similar way makes use of what the platform provides.
Use BearWare.TeamTalkBase.GetMediaFileInfo() to see if the media file format is supported and what properties are used for audio and video.
To stream a media file to a channel call BearWare.TeamTalkBase.StartStreamingMediaFileToChannel() and to stop the stream call BearWare.TeamTalkBase.StopStreamingMediaFileToChannel(). The user receiving the media stream can control volume levels by calling BearWare.TeamTalkBase.SetUserVolume() and BearWare.TeamTalkBase.AcquireUserMediaVideoFrame() to obtain video frames.
Subscription of media files is controlled by Subscription.SUBSCRIBE_MEDIAFILE.
nUserID | The user's ID. 0 for local client instance. |
lpPicture | Reference to a bitmap which will receive the video frame. If the lpPicture reference is null or not the proper size a new Bitmap object will be allocated and returned instead. Ensure to ALWAYS call with the same lpPicture reference for each nUserID, otherwise a new Bitmap object will be allocated each time and cause the application to use a significant amount of memory. |
|
strong |
Status of media file being written to disk.
Enumerator | |
---|---|
MFS_CLOSED | |
MFS_ERROR | Error while processing media file. |
MFS_STARTED | Started processing media file. |
MFS_FINISHED | Finished processing media file. |
MFS_ABORTED | Aborted processing of media file. |
MFS_PAUSED | Paused processing of media file. |
MFS_PLAYING | Playing media file with updated |
Definition at line 518 of file TeamTalk.cs.
|
strong |
Media file formats supported for muxed audio recordings.
Enumerator | |
---|---|
AFF_NONE | Used to denote nothing selected. |
AFF_CHANNELCODEC_FORMAT | Store audio in the same format as the BearWare.Channel's configured audio codec. Audio is stored in OGG format. OGG format is supported by https://www.xiph.org/ogg and can be played using VLC media player http://www.videolan.org Requires TeamTalk version 5.2.0.4730. |
AFF_WAVE_FORMAT | Store in PCM 16-bit wave format. |
AFF_MP3_16KBIT_FORMAT | Store in MP3-format. |
AFF_MP3_32KBIT_FORMAT | |
AFF_MP3_64KBIT_FORMAT | |
AFF_MP3_128KBIT_FORMAT | |
AFF_MP3_256KBIT_FORMAT |
Definition at line 539 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.StartStreamingMediaFileToChannel | ( | string | szMediaFilePath, |
VideoCodec | lpVideoCodec | ||
) |
Stream media file to channel, e.g. avi-, wav- or MP3-file.
Definition at line 5930 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.StartStreamingMediaFileToChannel | ( | string | szMediaFilePath, |
MediaFilePlayback | lpMediaFilePlayback, | ||
VideoCodec | lpVideoCodec | ||
) |
Stream media file to channel, e.g. avi-, wav- or MP3-file.
Call TeamTalkBase.GetMediaFileInfo() to get the properties of a media file, i.e. audio and video format.
The event ClientEvent.CLIENTEVENT_STREAM_MEDIAFILE is posted when the media file starts streaming. The flags ClientFlag.CLIENT_STREAM_AUDIO and/or ClientFlag.CLIENT_STREAM_VIDEO will be set if the call is successful.
A media file is streamed using StreamType.STREAMTYPE_MEDIAFILE_AUDIO and/or StreamType.STREAMTYPE_MEDIAFILE_VIDEO. To subscribe/unsubscribe a media file being streamed use Subscription.SUBSCRIBE_MEDIAFILE.
Streaming a media file requires UserRight.USERRIGHT_TRANSMIT_MEDIAFILE_VIDEO and/or UserRight.USERRIGHT_TRANSMIT_MEDIAFILE_AUDIO.
szMediaFilePath | File path to media file. |
lpMediaFilePlayback | Playback settings to pause, seek and preprocess audio. If AudioPreprocessorType.SPEEXDSP_AUDIOPREPROCESSOR then the echo cancellation part of BearWare.SpeexDSP is unused. Only denoise and AGC settings are applied. |
lpVideoCodec | If video file then specify output codec properties here. Specify Codec .NO_CODEC if video should be ignored. |
Definition at line 5966 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.UpdateStreamingMediaFileToChannel | ( | MediaFilePlayback | lpMediaFilePlayback, |
VideoCodec | lpVideoCodec | ||
) |
Update active media file being streamed to channel.
While streaming a media file to a channel it's possible to pause, seek and manipulate audio preprocessing by passing new BearWare.MediaFilePlayback properties.
lpMediaFilePlayback | Playback settings to pause, seek and preprocess audio. If AudioPreprocessorType.SPEEXDSP_AUDIOPREPROCESSOR then the echo cancellation part of BearWare.SpeexDSP is unused. Only denoise and AGC settings are applied. |
lpVideoCodec | If video file then specify output codec properties here, otherwise NULL. |
Definition at line 5991 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.StopStreamingMediaFileToChannel | ( | ) |
Stop streaming media file to channel.
This will clear the flags ClientFlag.CLIENT_STREAM_AUDIO and/or ClientFlag.CLIENT_STREAM_VIDEO.
Definition at line 6004 of file TeamTalk.cs.
int BearWare.TeamTalkBase.InitLocalPlayback | ( | string | szMediaFilePath, |
MediaFilePlayback | lpMediaFilePlayback | ||
) |
Play media file using settings from TeamTalkBase instance.
The sound system properties of the TeamTalkBase instance will be used for playback, i.e. TeamTalkBase.SetSoundOutputMute(), TeamTalkBase.SetSoundOutputVolume() and TeamTalkBase.InitSoundOutputDevice().
Monitor progress of playback by checking for event OnLocalMediaFile.
szMediaFilePath | Path to media file. |
lpMediaFilePlayback | Playback settings to pause, seek and preprocess audio. If AudioPreprocessorType.SPEEXDSP_AUDIOPREPROCESSOR then the echo cancellation part of BearWare.SpeexDSP is unused. Only denoise and AGC settings are applied. |
nPlaybackSessionID
.Definition at line 6033 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.UpdateLocalPlayback | ( | int | nPlaybackSessionID, |
MediaFilePlayback | lpMediaFilePlayback | ||
) |
Update media file currently being played by TeamTalk instance.
nPlaybackSessionID | Session ID created by TeamTalkBase.InitLocalPlayback(). |
lpMediaFilePlayback | BearWare.AudioPreprocessorType of BearWare.AudioPreprocessor cannot be changed. It must be the same as used in TeamTalkBase.InitLocalPlayback(). |
Definition at line 6049 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.StopLocalPlayback | ( | int | nPlaybackSessionID | ) |
Stop media file currently being played by TeamTalk instance.
nPlaybackSessionID | Session ID created by TeamTalkBase.InitLocalPlayback(). |
Definition at line 6063 of file TeamTalk.cs.
|
static |
Get the properties of a media file.
Use this function to determine the audio and video properties of a media file, so the user knows what can be streamed.
Definition at line 6075 of file TeamTalk.cs.
VideoFrame BearWare.TeamTalkBase.AcquireUserMediaVideoFrame | ( | int | nUserID, |
out Bitmap | bmp | ||
) |
Extract a user's media video frame for display.
The BearWare.VideoFrame extracted from the client instance will contain a pointer to the image's frame buffer, so a RGB32 bitmap can be displayed in a window control.
To release the acquired BearWare.VideoFrame call TeamTalkBase.ReleaseUserMediaVideoFrame().
A media video frame comes from a user's StreamType.STREAMTYPE_MEDIAFILE_VIDEO.
nUserID | The user's ID. 0 for local user. |
bmp | A bitmap created from the BearWare.VideoFrame's data. |
Definition at line 6100 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.ReleaseUserMediaVideoFrame | ( | VideoFrame | lpVideoFrame | ) |
Delete a user's video frame, acquired through TeamTalkBase.AcquireUserMediaVideoFrame(), so its allocated resources can be released.
lpVideoFrame | Pointer to BearWare.VideoFrame which should be deallocated. |
Definition at line 6122 of file TeamTalk.cs.
|
static |
Specify this value as uOffsetMSec in BearWare.MediaFilePlayback when calling BearWare.TeamTalkBase.InitLocalPlayback() and TeamTalkBase.UpdateLocalPlayback() to ignore rewind or forward.
Definition at line 4300 of file TeamTalk.cs.