Streaming media learning notes ---- Configuring an encoding process

zhaozj2021-02-16  53

Configure an encoding process

To completely configure an encoder, the following interface must be properly set. Note that the optional interface. 1. The IWMencattributes Interface (Optional). (Optional, casual) 2. The IWMencBroadcast Interface (Optional). 3. The IWMencDisplayInfo Interface (Optional). 4. The IWMencFile Interface (Optional). 5. The IWMencProfile Interface (required) 6. (Now) 7. The IWMencVideSource Interface (optional)

Or IWMencBroadcast and IWMencFile optional a destination for encoding content. Or broadcast out, or stored in the local disk. Or both are done. Below each interface, you will make a brief narrative: The IWMencattributes Interface (Optional)

This attribute interface manages a collection of custom interfaces. It contains a set of well-defined properties and allows users to define themselves themselves. For example, you can explain the compiled date of a stream, assign the string "Date" to the property name, and this string contains the data format of this property value. Moreover, you can use this interface to classify a directory. Its methods are: add adds a user's newly defined attribute. Get_count gets a defined attribute. Item gets a specific item. Remove removes a specific property. RemoveAll removes all properties.

The IWMencBroadcast Interface (Optional).

This interface manages the protocols and port numbers for broadcasting content. Its method is inherited in the Idispatch interface. Its method has GET_PORTNUMBER Returns the port number for broadcasting encoding content. It contains the protocol of the transmission, and the correct setting should be HTTP. (Encoder7 does not support MSDB protocol) Specify a port number with a PUT_PORTNUMBER method.

The IWMencDisPlayInfo Interface (optional).

This interface is responsible for managing some of the information of the encoding content. Strings such as author, copyright can be set and read. As a representative, it contains the author, copyright date, title, level, and some additional description information added to the author for encoding content. It is inherited in the IDispatch interface. Its method has: get_author gets the author's name. GET_COPYRIGHT gets copyright, Get_Description gives general description information about encoding content. Get_Description returns level information about the content. (Good quality) Get_Title got the title. PUT_AUTHOR, PUT_COPYRIGHT, PUT_DESCRIPTION, PUT_RATING, PUT_TITLE are set corresponding information. Among them, the variable type of this information is BSTR or CCOMBSTR, and the conversion method with the cstring type is:

BSTR Author (l "let5fly");

CString Str;

Str = author.copy ();

The IWMencfile Interface (Optional).

This interface is used to manage files that store encoded content. It is inherited in the IDispatch interface. The method of this interface is: GET_LOCALFILENAME gets a full path used to store the encoded content file. PUT_LOCALFILENAME Sets to store the full path to the encoded content file. The IWMencProfile Interface

This interface is used to get the name of a specific framework, describe information, and media types. The Windows encoder encodes compressed media streams through a scheme (framework) that matches the client user bandwidth. There can be multiple scenarios (frames) in an encoding process, but at any time, only one is work. The frame determines the output format of the media stream, the bandwidth of the client, is encoded into a multi-bit rate. There is only one frame (scheme) and a media source group. And only one source can be encoded at a time. The system-defined framework cannot be changed or removed, but users can define themselves. But you must edit with framework management or Windows Media Format SDK. You can build a Framework Management dialog for editing via the IWMencProfileManager interface. This interface is inherited in the IDispatch interface. Its method has: get_description returns a description of a framework. GET_MAXPACKETSIZE gets the maximum size of the packet during the encoding process, and the unit is byte. Get_mediacount gets the number of audio, video, and scripts supported by a frame. GET_MULTIPLEBITRATE Gets a Boolean value about whether the frame supports multiple media streams. Get_name gets the name of the frame. PUT_MAXPACKETSIZE Sets the largest packet size during the encoding process, unit bytes. The IWMencSource Interface. This interface is loaded with a capture source, organizes, and repeated a specific source. (For broadcasting) and get the conversion plug-in program and data observation object. This interface is inherited in the IDispatch interface. There is a method: GetInput gets a capture source, usually a file or plug-in. Get_markin gave a starting point for a media stream. GET_MARKOUT gets the end point of a media file. GET_POSTVIEWCOLLECTION Returns an interface that sends a data window (a PostView IS An IWMencDataView Object That Renders Content IN A Window After the Content Has Both Compressed and Decompressed). Get_previewCollection gets the interface of a preview window. Get_repeat gets a source of loops, repeated attributes. GetSourcePlugin gets a plug-in associated with the source, which is not an adaptive method. Get_TransformCollection gets a collection of all registered conversion plugins. GetTransformPlugin Get a specific plug-in, which is not an adaptive method. GetTransformPluginCount gets the number of all plugins that can be utilized. GET_TYPE gets the type of input stream. PUT_Markin Specifies the beginning of a media stream. PUT_MARKOUT Specifies the end point. PUT_REPEAT Specifies the loop properties of the stream. SetInput Set the input source.

The IWMencVideSource Interface [Optional].

This interface is used to modify the image, remove some bad (useless) pixels. Usually on the edge of the video stream and key image. The encoder adjusts the size of the image to accommodate the requirements of the frame (attribute). This interface is inherited in IWMencSource

转载请注明原文地址:https://www.9cbs.com/read-25991.html

New Post(0)