[h323plus] Failed to set video capability in my video conference based on openh323

柳溟 gszllyj at gmail.com
Tue Jan 15 02:04:00 EST 2008


Hi everybody,
   I am developing a video conference based on openh323, right now,  I
failed to set video capability in my system.
  I wrote a new class named HMH323_H261Capability, derived from
H323_H261Capability.

class HMH323_H261Capability : public H323_H261Capability
{
	PCLASSINFO(HMH323_H261Capability, H323_H261Capability)
public:
	HMH323_H261Capability(unsigned qcifMPI, unsigned cifMPI, BOOL
temporalSpatialTradeOff=TRUE,
		BOOL stillImageTransmission=FALSE, unsigned maxBitRate=850);
	virtual PObject *Clone()const;
	virtual H323Codec *CreateCodec(H323Codec::Direction direction) const;
};
When the program begin, I use
SetCapability (0, 1, new HMH323_H261Capability (0, 1, TRUE, FALSE,
8192)); and the program runs OK, However, when I connect MCU by
calling
H323EndPoint::MakeCall(remoteParty, NULL, token, userData); the
program throw exception and exit.
Here is the call stack
KERNEL32! 7c812a5b()
MSVCRTD! _CxxThrowException at 8 + 57 bytes
MSVCRTD! __RTDynamicCast + 383 bytes
H323Capability::Compare(const PObject & {...}) line 427 + 23 bytes
PObject::operator==(const PObject & {...}) line 1452 + 22 bytes
H323Capabilities::FindCapability(const H323Capability & {...}) line
2075 + 26 bytes
H323Capabilities::Merge(const H323Capabilities & {...}) line 2375 + 21 bytes
H323Connection::OnReceivedCapabilitySet(const H323Capabilities &
{...}, const H245_MultiplexCapability * 0x013f2c44,
H245_TerminalCapabilitySetReject & {...}) line 4315 + 18 bytes
H245NegTerminalCapabilitySet::HandleIncoming(const
H245_TerminalCapabilitySet & {...}) line 603 + 48 bytes
H323Connection::OnH245Request(const H323ControlPDU & {...}) line 3784 + 18 bytes
H323Connection::HandleControlPDU(const H323ControlPDU & {...}) line
3742 + 18 bytes
H323Connection::HandleControlData(PPER_Stream & {...}) line 3726 + 18 bytes
H323Connection::HandleControlChannel() line 3666 + 18 bytes
H245TransportThread::Main() line 599
PTLIBD! PThread::MainFunction(void *) line 1168
_threadstartex(void * 0x013e8ce0) line 212 + 13 bytes
KERNEL32! 7c80b683()

In the H323Capability::Compare
PObject::Comparison H323Capability::Compare(const PObject & obj) const
{
  PAssert(PIsDescendant(&obj, H323Capability), PInvalidCast);-->Failed

Can anyone tell me the problem?




More information about the h323plus mailing list