H.261 is now a plugin codec in H323plus. However looking at the error, it appears you have not properly defined your capability as it fails in HMH323_H261Capability::Compare and it looks like a casting issue
Make sure you have these lines at the top of HMH323_H261Capability::Compare
if (!PIsDescendant(&obj, HMH323_H261Capability)) return LessThan;
Simon
==================== Simon Horne email. s.horne@isvo.net Principal Maintainer h323plus Library
Consulting and Contracting consulting@h323plus.org. ========================
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com]On Behalf Of Áøäé Sent: Tuesday, January 15, 2008 5:04 PM To: h323plus@lists.packetizer.com Subject: [h323plus] Failed to set video capability in my video conferencebased on openh323
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@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?