JRTPLIB 3.5.2 Chinese version-part14

Source: Internet
Author: User

 

3.2.20 RTPSessionParams

------------------------------------------------------------------------- Header file: rtpsessionparams. h

Describes the parameters to be used by an RTPSession object. Note! The unit of your own timestamp must be set to a valid value, otherwise the session will not be created. Class interface:

Int SetUsePollThread (bool usethread)

----- If usethread is set to true, the session uses a thread pool to automatically process received data and send RTCP data packets as needed.

Bool IsUsingPollThread () const

----- Returns whether the thread pool is used for the session.

Void SetMaximumPacketSize (size_t max)

----- Set the maximum package size allowed by the session.

Size_t GetMaximumPacketSize () const

----- Return the maximum allowed package size.

Void SetAcceptOwnPackets (bool accept)

----- If the parameter is true, the session will accept its own data packets and put them in the corresponding source table.

Bool AcceptOwnPackets () const

----- If the session can accept its own data packets, true is returned.

Void SetReceiveMode (RTPTransmitter: ReceiveMode recvmode)

----- Set the receiving mode that the session will use.

RTPTransmitter: ReceiveMode GetReceiveMode () const

----- Return the current receiving mode.

Void SetOwnTimestampUnit (double tsunit)

----- Set the timestamp unit for our own data. The timestamp unit is defined as the number of samples in a period of time divided by this period of time (in seconds ). For example, for 1.0Hz audio data, the timestamp unit is 8000. 0. because this value is initially set to an invalid value, you must set it to an allowed value to create a session.

Double GetOwnTimestampUnit () const

----- Returns the current timestamp unit.

Void SetResolveLocalHostname (bool v)

----- If v is set to true, the session searches for a host name based on the IP address in its local IP address list. If it is set to false, call gethostname or a similar function to find the local host name. Note: method 1 (set to true) takes some time.

Bool GetResolveLocalHostname () const

----- Whether the returned local host name should be determined by the transmitter's local IP address list.

Void SetProbationType (RTPSources: ProbationType probtype)

----- If you have enabled trial support, this function sets the trial type to be used.

RTPSources: ProbationType GetProbationType () const

----- Return the trial type used.

Void SetSessionBandwidth (double sessbw)

----- Set the session bandwidth (in bytes/second ).

Double GetSessionBandwidth () const

----- Return the session bandwidth in bytes/second.

Void SetControlTrafficFraction (double frac)

----- Set the session bandwidth percentage that will be used to control transmission.

Double GetControlTrafficFraction () const

----- Return the percentage of session bandwidth used to control transmission.

Void SetSenderControlBandwidthFraction (double frac)

----- Set the minimum control transmission percentage that the sender will use.

Double GetSenderControlBandwidthFraction () const

----- Return the minimum control transmission percentage used by the transmitter.

Void SetMinimumRTCPTransmissionInterval (const RTPTime & t)

----- Sets the minimum interval for sending RTCP data packets.

RTPTime GetMinimumRTCPTransmissionInterval () const

----- Returns the minimum time interval for sending RTCP data packets.

Void SetUseHalfRTCPIntervalAtStartup (bool usehalf)

----- If usehalf is set to true, the session waits for only half of the calculated RTCP interval before sending the first RTCP packet.

Bool GetUseHalfRTCPIntervalAtStartup () const

----- Return whether the session will wait for only half of the calculated RTCP interval before sending the first RTCP packet.

Void SetRequestImmediateBYE (bool v)

----- If the value of v is true, the session will immediately send a BYE packet as allowed.

Bool GetRequestImmediateBYE () const

----- Returns whether the session will immediately send a BYE packet when it is allowed.

Void SetSenderReportForBYE (bool v)

----- When sending a BYE packet, this indicates whether it is part of an RTCP composite packet starting with the sender report or receiver report. Of course, the sender report is only used when it is allowed.

Bool GetSenderReportForBYE () const

----- If a BYE packet is sent to an RTCP composite packet starting with the sender report, true is returned. If the receiver report is used, the function returns false.

Void SetSenderTimeoutMultiplier (double m)

----- Set the multiplier to be used when the sender times out .]

Double GetSenderTimeoutMultiplier () const

----- Return the multiplier used by the sender for timeout.

Void SetSourceTimeoutMultiplier (double m)

----- Set the multiplier to be used when the member times out.

Double GetSourceTimeoutMultiplier () const

----- Return the multiplier used when the member times out.

Void SetBYETimeoutMultiplier (double m)

----- Set the multiplier used when the member sends a BYE packet and times out.

Double GetBYETimeoutMultiplier () const

----- Return the multiplier used when the member sends a BYE packet and times out.

Void SetCollisionTimeoutMultiplier (double m)

----- Set the timeout multiplier for items in the conflicting table.

Double GetCollisionTimeoutMultiplier () const

----- Return the timeout multiplier of the items in the conflicting table.

Void SetNoteTimeoutMultiplier (double m)

----- Set the timeout multiplier for the sdes note information.

Double GetNoteTimeoutMultiplier () const

----- Returns the time-out multiplier of the sdes note information.

The default value of the parameter is as follows:

. Use thread pool: yes

. Maximum allowable package size: 1400 bytes

. Accept your own data packets: no

. Receiving mode: accept all data packets

. Resolve local host name: no

. Trial type: ProbationStore

. Session bandwidth: 10000 bytes per second

. Control transmission percentage: 5%.

. Control transmission percentage of the sender: 25%

. Minimum RTCP interval: 5 seconds

. Use the minimum interval of half a time at the start: yes

. Send BYE package immediately when allowed: yes

. Report on using senders for BYE packets: yes

. Sender timeout multiplier: 2

. Member timeout multiplier: 5

. Timeout multiplier after BYE packet is sent: 1

. Timeout multiplier for items in the conflicting table: 10

. Sdes note item timeout multiplier: 25

[To be continued !]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.