TeamTalk 5 Java DLL Version 5.15A
|
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 | BearWare.MediaFileStatus : uint { BearWare.MediaFileStatus.MFS_CLOSED = 0 , BearWare.MediaFileStatus.MFS_ERROR = 1 , BearWare.MediaFileStatus.MFS_STARTED = 2 , BearWare.MediaFileStatus.MFS_FINISHED = 3 , BearWare.MediaFileStatus.MFS_ABORTED = 4 , BearWare.MediaFileStatus.MFS_PAUSED = 5 , BearWare.MediaFileStatus.MFS_PLAYING = 6 } |
Status of media file being written to disk. More... | |
enum | BearWare.AudioFileFormat : uint { BearWare.AudioFileFormat.AFF_NONE = 0 , BearWare.AudioFileFormat.AFF_CHANNELCODEC_FORMAT = 1 , BearWare.AudioFileFormat.AFF_WAVE_FORMAT = 2 , BearWare.AudioFileFormat.AFF_MP3_16KBIT_FORMAT = 3 , BearWare.AudioFileFormat.AFF_MP3_32KBIT_FORMAT = 4 , BearWare.AudioFileFormat.AFF_MP3_64KBIT_FORMAT = 5 , BearWare.AudioFileFormat.AFF_MP3_128KBIT_FORMAT = 6 , BearWare.AudioFileFormat.AFF_MP3_256KBIT_FORMAT = 7 , BearWare.AudioFileFormat.AFF_MP3_320KBIT_FORMAT = 8 } |
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. | |
bool | BearWare.TeamTalkBase.StartStreamingMediaFileToChannel (string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec) |
Stream media file to channel, e.g. avi-, wav- or MP3-file. | |
bool | BearWare.TeamTalkBase.UpdateStreamingMediaFileToChannel (MediaFilePlayback lpMediaFilePlayback, VideoCodec lpVideoCodec) |
Update active media file being streamed to channel. | |
bool | BearWare.TeamTalkBase.StopStreamingMediaFileToChannel () |
Stop streaming media file to channel. | |
int | BearWare.TeamTalkBase.InitLocalPlayback (string szMediaFilePath, MediaFilePlayback lpMediaFilePlayback) |
Play media file using settings from BearWare.TeamTalkBase instance. | |
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. | |
VideoFrame | BearWare.TeamTalkBase.AcquireUserMediaVideoFrame (int nUserID, out Bitmap bmp) |
Extract a user's media video frame for display. | |
bool | BearWare.TeamTalkBase.ReleaseUserMediaVideoFrame (VideoFrame lpVideoFrame) |
Delete a user's video frame, acquired through TeamTalkBase.AcquireUserMediaVideoFrame(), so its allocated resources can be released. | |
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. |
enum BearWare.MediaFileStatus : uint |
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 521 of file TeamTalk.cs.
enum BearWare.AudioFileFormat : uint |
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 | |
AFF_MP3_320KBIT_FORMAT |
Definition at line 542 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 5954 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 BearWare.ClientEvent.CLIENTEVENT_STREAM_MEDIAFILE is posted when the media file starts streaming. The flags BearWare.ClientFlag.CLIENT_STREAM_AUDIO and/or BearWare.ClientFlag.CLIENT_STREAM_VIDEO will be set if the call is successful.
A media file is streamed using BearWare.StreamType.STREAMTYPE_MEDIAFILE_AUDIO and/or BearWare.StreamType.STREAMTYPE_MEDIAFILE_VIDEO. To subscribe/unsubscribe a media file being streamed use BearWare.Subscription.SUBSCRIBE_MEDIAFILE.
Streaming a media file requires BearWare.UserRight.USERRIGHT_TRANSMIT_MEDIAFILE_VIDEO and/or BearWare.UserRight.USERRIGHT_TRANSMIT_MEDIAFILE_AUDIO.
szMediaFilePath | File path to media file. |
lpMediaFilePlayback | Playback settings to pause, seek and preprocess audio. If BearWare.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 BearWare.Codec .NO_CODEC if video should be ignored. |
Definition at line 5990 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 BearWare.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 6015 of file TeamTalk.cs.
bool BearWare.TeamTalkBase.StopStreamingMediaFileToChannel | ( | ) |
Stop streaming media file to channel.
This will clear the flags BearWare.ClientFlag.CLIENT_STREAM_AUDIO and/or BearWare.ClientFlag.CLIENT_STREAM_VIDEO.
Definition at line 6028 of file TeamTalk.cs.
int BearWare.TeamTalkBase.InitLocalPlayback | ( | string | szMediaFilePath, |
MediaFilePlayback | lpMediaFilePlayback | ||
) |
Play media file using settings from BearWare.TeamTalkBase instance.
The sound system properties of the BearWare.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 BearWare.AudioPreprocessorType.SPEEXDSP_AUDIOPREPROCESSOR then the echo cancellation part of BearWare.SpeexDSP is unused. Only denoise and AGC settings are applied. |
nPlaybackSessionID
.Definition at line 6057 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 6073 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 6087 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 6099 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 BearWare.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 6124 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 6146 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 4324 of file TeamTalk.cs.