Ignore:
Timestamp:
Dec 5, 2013 10:53:12 AM (11 years ago)
Author:
nanang
Message:

Re #1519: Added typecast methods for AudioMedia? & its descendants, as Python cannot downcast among C++ classes, e.g: Media to AudioMedia?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip/include/pjsua2/media.hpp

    r4680 r4685  
    262262 
    263263    /** 
     264     * Typecast from base class Media. This is useful for application written 
     265     * in language that does not support downcasting such as Python. 
     266     * 
     267     * @param media             The object to be downcasted 
     268     * 
     269     * @return                  The object as AudioMedia instance 
     270     */ 
     271    static AudioMedia* typecastFromMedia(Media *media); 
     272 
     273    /** 
    264274     * Virtual Destructor 
    265275     */ 
     
    351361     */ 
    352362    void setPos(pj_uint32_t samples) throw(Error); 
     363 
     364    /** 
     365     * Typecast from base class AudioMedia. This is useful for application 
     366     * written in language that does not support downcasting such as Python. 
     367     * 
     368     * @param media             The object to be downcasted 
     369     * 
     370     * @return                  The object as AudioMediaPlayer instance 
     371     */ 
     372    static AudioMediaPlayer* typecastFromAudioMedia(AudioMedia *media); 
    353373 
    354374    /** 
     
    398418 
    399419    /** 
     420     * Typecast from base class AudioMedia. This is useful for application 
     421     * written in language that does not support downcasting such as Python. 
     422     * 
     423     * @param media             The object to be downcasted 
     424     * 
     425     * @return                  The object as AudioMediaRecorder instance 
     426     */ 
     427    static AudioMediaRecorder* typecastFromAudioMedia(AudioMedia *media); 
     428 
     429    /** 
    400430     * Virtual destructor. 
    401431     */ 
Note: See TracChangeset for help on using the changeset viewer.