previous next

Chapter 2: ActiveX Control Reference

This chapter describes the properties, methods, and events used by the RealProducer ActiveX control.

Properties

Input Properties
Name Type Description
InputType INPUT_SOURCE_FILE|
INPUT_SOURCE_CAPTURE
type of input to encode: File or Capture Device
InputFilename String path of input filename
InputCaptureAudioDriver Long index of Driver that is desired
InputCaptureVideoDriver Long index of Driver that is desired
InputDoAudio Boolean whether or not to encode audio
InputDoVideo Boolean whether or not to encode video
InputDoEvents Boolean whether or not to encode events
InputNumAudioDrivers Long number of available audio drivers (get only)
InputNumVideoDrivers Long number of available video drivers (get only)

Output Properties
Name Type Description
DoOutputFile Boolean creates the output file
OutputFilename String the path of the output file and filename
TempDirectory String the path of the temporary directory used during encoding
DoOutputServer Boolean creates a stream to the server (input type must be INPUT_SOURCE_CAPTURE)
ServerName String name of the server
ServerPort Long port of encoder mount point on the server
ServerStream String name of stream on the server
ServerUsername String username used to access encoder mount point
ServerPassword String password used to access encoder mount point
ServerTransport SERVER_TRANSPORT_UDP|
SERVER_TRANSPORT_TCP
protocol used to connect to the server; either UDP or TCP
ListBroadcast Boolean whether or not to register the clip with Janus

Clip Properties
Name Type Description
Title String Title of the clip
Author String Author of the clip
Copyright String copyright date and owner of the clip
Description String brief summary of the clip's contents
Keywords String 3 or 4 words that sum up the clip
Rating RATING_G|RATING_PG|
RATING_R|RATING_X
rates the clip's contents
SelectiveRecord Boolean whether or not the clip can be recorded
MobilePlay Boolean whether or not a mobile player can download the clip
Indexable Boolean whether or not the clip can be indexed by a search engine

Target Settings
Name Type Description
Target28KModem Boolean create a stream for a 28K modem audience
Target56KModem Boolean create a stream for a 56k modem audience
TargetSingleISDN Boolean create a stream for a single ISDN audience
TargetDualISDN Boolean create a stream for a dual ISDN audience
TargetDSLCableModem Boolean create a stream for a DSL or a cable modem audience
TargetLAN Boolean create a stream for a Local Area Network or Intranet audience
Target256KDSLCableModem Boolean create a stream for a 256k DSL or a cable modem audience
Target384KDSLCableModem Boolean create a stream for a 384k DSL or a cable modem audience
Target512KDSLCableModem Boolean create a stream for a 512k DSL or a cable modem audience
AudioContent AUDIO_CONTENT_VOICE|
AUDIO_CONTENT_VOICE_BACKGROUND|
AUDIO_CONTENT_MUSIC|
AUDIO_CONTENT_MUSIC_STEREO
determines the type of audio being encoded
VideoQuality VIDEO_QUALITY_NORMAL|
VIDEO_QUALITY_SMOOTH_MOTION|
VIDEO_QUALITY_SHARP_IMAGE|
VIDEO_QUALITY_SLIDESHOW
determines the quality of video being recorded
SureStream Boolean whether or not to record in SureStream
PlayerCompatibility PLAYER_6|
PLAYER_5
specify the version of RealPlayer that the clip will be compatible with
EmphasizeAudio Boolean whether or not to emphasize audio instead of video during stream switching
DoAudioOnlyMultimedia Boolean whether or not audio-only files will use the multimedia target settings; if not, then the audio-only clip will use audio target settings, which maximize bit rate

Video Settings
Name Type Description
VideoResizingEnabled Boolean whether or not to allow resizing of the input video
VideoOutputWidth Long width of the new, resized video image (in pixels)
VideoOutputHeight Long height of the new, resized video image (in pixels)
VideoCroppingEnabled Boolean whether or not to allow the output video image to be cropped
VideoCropLeft Long number of pixels from the left edge of the output video to be cropped out
VideoCropTop Long number of pixels from the top of the output video to be cropped out
VideoCropWidth Long width of the cropped image (in pixels)
VideoCropHeight Long height of the cropped image (in pixels)
VideoNoiseFiltering NOISE_FILTER_OFF|
NOISE_FILTER_LOW|
NOISE_FILTER_HIGH
amount of video noise filtering used: off, low, or high
VBREncoding Boolean use Variable Bit Rate encoding
VBRMaxStartupLatency Long maximum time of start-up latency in milliseconds
TwoPassEncoding Boolean use two-pass encoding on video
MaxTimeBetweenKeyframes Long maximum time between keframes of video
LossProtection Boolean use loss protection on video
HighQualityResize Boolean use high-quality resize on video
InverseTelecineFilter Boolean use the inverse telecine filter on video
DeInterlaceFilter Boolean use the de-interlace filter on video

Codec Properties
Name Type Description
AudioCodecEnum Object (EnumIDispatch) enumerator to go through audio codecs
VideoCodecEnum Object (EnumIDispatch) enumerator to go through video codecs

Non-Browsable Properties
Name Type Description
IsSourceOpen Boolean Is Source Open (get only)
IsEncoding Boolean Is Encoding (get only)
LastError Long last error result code (get only)
OutputVideoWindowTarget Long target audience that is shown in output video window (can only be set after encoding has started, when IsEncoding is True)

Statistics Properties
Name Type Description
NumTargetStreams Long the number of target streams for the clip (get only)
NumVideoStreams Long the number of video streams for the clip (get only)
NumAudioStreams Long the number of audio streams for the clip (get only)

Methods

Control

OpenSource()

Opens the video and audio source (this causes the video window to resize and the first frame of video is shown, or an overlay from the camera). After you call OpenSource, you can get the size of the video with GetInputVideoSize. If you are capturing live video, you can access the video card settings dialogs.
Parameters: none

StartEncoding()

Starts the encoding. It's not necessary to call OpenSource first.
Parameters: none

StopEncoding()

Stops the encoding and closes the source. This method can only be called when IsSourceOpen or IsEncoding are TRUE.
Parameters: none

Encoding Events

SendRealMediaEvent()

Sends a URL event, or Title, Author, or Copyright information to the stream or file. If timestamp and duration are not specified, the event will occur at the current time of the data being encoded and will be fired once only. This method can only be called when IsEncoding is TRUE.
Parameters: EventType (EVENT_TYPE_URL|EVENT_TYPE_TITLE|EVENT_TYPE_AUTHOR|EVENT_TYPE_COPYRIGHT), EventText (String), Timestamp [optional] (Long), Duration [optional] (Long)

Error Handling

GetErrorString()

Returns the error string for the error code.
Parameters: ErrorCode (Long)

Settings

LoadProducerSettings()

Loads all settings from the last time RealProducer was used. This method overwrites any settings you may have already specified.
Parameters: none

Input Properties

GetAudioDriverName()

Returns the audio driver name for the requested index (0-indexed). Not supported under VB Script.
Parameters: Index (Long), DriverName (String)

GetVideoDriverName()

Returns the video driver name for the requested index (0-indexed). Not supported under VB Script.
Parameters: Index (Long), DriverName (String)

Clip Properties

GetStringProperty()

Returns the value of the requested string property (for custom properties). Not supported under VB Script.
Parameters: PropertyName (String), Value (String)

SetStringProperty()

Sets a string property/value pair in the file (for custom properties).
Parameters: PropertyName (String), Value (String)

GetNumberProperty()

Returns the value of the requested number property (for custom properties). Not supported under VB Script.
Parameters: PropertyName (String), Value (Long)

SetNumberProperty()

Sets a number property/value pair in the file (for custom properties).
Parameters: PropertyName (String), Value (Long)

RemoveProperty()

Removes a property/value pair (for custom properties).
Parameters: PropertyName (String)

Video Settings

GetInputVideoSize()

Gets the current video size. This method can only be called when IsSourceOpen or IsEncoding are TRUE. Not supported under VB Script.
Parameters: Width (Long), Height (Long)

ShowVideoCardFormatDialog()

Shows the video card format dialog. This method can only be called when IsSourceOpen is TRUE and IsEncoding is FALSE, and when the InputType is INPUT_SOURCE_CAPTURE.
Parameters: none

ShowVideoCardSourceDialog()

Shows the video card source dialog. This method can only be called when IsSourceOpen is TRUE and IsEncoding is FALSE, and when the InputType is INPUT_SOURCE_CAPTURE.
Parameters: none

ShowVideoCardCompressionDialog()

Shows the video card compression dialog. This method can only be called when IsSourceOpen is TRUE and IsEncoding is FALSE, and when the InputType is INPUT_SOURCE_CAPTURE.
Parameters: none

Target Audiences

TargetAudienceInfo()

Returns the TargetAudienceInfo object for the desired target audience.
Parameters: TargetAudience (TARGET_28_MODEM|TARGET_56_MODEM|TARGET_SINGLE_ISDN|TARGET_DUAL_ISDN|TARGET_LAN_LOW|TARGET_LAN_HIGH)

RestoreTargetDefaults()

Restores all target audience settings.
Parameters: none

Statistics

GetTargetStream()

Gets information for the target stream. Values of -1 for the audio or video stream index mean there is no stream for that type. Not supported under VB Script.
Parameters: Index (Long), TargetAudience (TARGET_28_MODEM|TARGET_56_MODEM|TARGET_SINGLE_ISDN|TARGET_DUAL_ISDN|TARGET_LAN_LOW|TARGET_LAN_HIGH), AudioStreamIndex (Long), VideoStreamIndex (Long), 50Compatible (Bool)

GetAudioStream()

Gets information for the audio stream. Bit rate is in bits per second, frequency response is in Hertz, latency is in milliseconds, and performance is encode time as a percentage of playback time. Not supported under VB Script.
Parameters: Index (Long), CodecName (String), Bitrate (Long), FrequencyResponse (Long), Latency (Long), Performance (Long), 50Compatible (Bool)

GetVideoStream()

Gets information for the video stream. Bit rate is in bits per second, frame rate is in frames per second, latency is in milliseconds, and performance is encode time as a percentage of playback time. Not supported under VB Script.
Parameters: Index (Long), CodecName (String), Bitrate (Long), FrameRate (Float/Single), Latency (Long), Quality (Long) Performance (Long), 50Compatible (Bool)

UpdateStatistics()

Forces an update of the statistics based on the current settings.
Parameters: none

Events

OnEncodingStarted()

Fired when encoding has successfully started.
Parameters: none

OnEncodingStopped()

Fired when encoding has successfully stopped.
Parameters: none

OnErrorOccurred()

Fired when encoding error has occurred.
Parameters: ErrorCode (Long), ErrorString (String)

OnAudioLevelClipped()

Fired when audio level is clipped.
Parameters: Timestamp (Long), AudioLevel (Long)

OnEncodingProgressChanged()

Fired when the progress of the encoding changes.
Parameters: Duration (Long), PercentDone (Long), Timestamp (Long), AudioLevel (Long)

OnVideoWindowSized()

The minimum size of the control window (in pixels). If the control window is smaller than the required minimum, it will resize to the minimum before this event is fired.
Parameters: Width (Long), Height (Long)

Objects Used with RealProducer Control

Audio Codec Info

Audio Codec Info Properties
Name Type Description
Bitrate Long bit rate of the codec.
CodecCookie CodecCookie Codec identifier
CodecDescription String description of the codec
CodecForVersion CodecCookie returns appropriate codec to use with the specified RealPlayer version
CodecName String name of the codec
FrequencyResponse Long the frequency response (in Hertz) of the codec
NumChannels Long number of audio channels
OldestCompatiblePlayer Long oldest compatible version of the RealPlayer that can be used with the codec
SampleRate Long the sample rate of the codec (in Hertz)
SampleSize Long the sample size of the codec (in bits)

Video Codec Info

Video Codec Info Properties
Name Type Description
CodecCookie CodecCookie Codec identifier
CodecDescription String description of the codec
CodecForVersion CodecCookie returns appropriate codec to use with the specified RealPlayer version
CodecName String name of the codec
OldestCompatiblePlayer Long oldest compatible version of the RealPlayer that can be used with the codec

Codec Cookie

Codec Cookie Properties
Name Type Description
codecID Long identifies the codec type
flavorID Long identifies the codec flavor

Target Audience Info

Target Audience Info Properties
Name Type Description
AudioCodec CodecCookie audio codec for the target audience depending on audio content and target audience type; takes TargetAudienceType (TARGET_AUDIENCES_AUDIO | TARGET_AUDIENCES_VIDEO | TARGET_AUDIENCES_MULTIMEDIA) and AudioContent (AUDIO_CONTENT_VOICE | AUDIO_CONTENT_VOICE_BACKGROUND | AUDIO_CONTENT_MUSIC | AUDIO_CONTENT_MUSIC_STEREO) as parameters
MaxFrameRate Single maximum frame rate (in frames per second)
TargetAudienceID Long identifier for the target audience
TargetAudienceName String name of the target audience
TargetBitrate Single bit rate for the target audience (in bits per second)
VideoCodec CodecCookie video codec for the target audience

EnumIDispatch

First()

Returns the first element in the list and resets the list to the beginning.
Parameters: none

Next()

Returns the next element in the list.
Parameters: none

GetCount()

Returns the number of elements in the list.
Parameters: none


Copyright © 2000 RealNetworks
For information on RealNetworks' technical support, click here.
This file last updated on 09/21/00 at 18:57:30.
previous next