- Timestamp:
- Dec 5, 2013 10:53:12 AM (11 years ago)
- Location:
- pjproject/branches/projects/pjsua2/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip/include/pjsua2/media.hpp
r4680 r4685 262 262 263 263 /** 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 /** 264 274 * Virtual Destructor 265 275 */ … … 351 361 */ 352 362 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); 353 373 354 374 /** … … 398 418 399 419 /** 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 /** 400 430 * Virtual destructor. 401 431 */ -
pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/media.cpp
r4680 r4685 233 233 } 234 234 235 AudioMedia* AudioMedia::typecastFromMedia(Media *media) 236 { 237 return static_cast<AudioMedia*>(media); 238 } 239 235 240 /////////////////////////////////////////////////////////////////////////////// 236 241 … … 296 301 { 297 302 PJSUA2_CHECK_EXPR( pjsua_player_set_pos(playerId, samples) ); 303 } 304 305 AudioMediaPlayer* AudioMediaPlayer::typecastFromAudioMedia( 306 AudioMedia *media) 307 { 308 return static_cast<AudioMediaPlayer*>(media); 298 309 } 299 310 … … 333 344 registerMediaPort(NULL); 334 345 } 346 347 AudioMediaRecorder* AudioMediaRecorder::typecastFromAudioMedia( 348 AudioMedia *media) 349 { 350 return static_cast<AudioMediaRecorder*>(media); 351 } 352 335 353 /////////////////////////////////////////////////////////////////////////////// 336 354 void AudioDevInfo::fromPj(const pjmedia_aud_dev_info &dev_info)
Note: See TracChangeset
for help on using the changeset viewer.