Changeset 4793 for pjproject/trunk/pjsip/include/pjsua2/media.hpp
- Timestamp:
- Mar 14, 2014 4:09:50 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsua2/media.hpp
r4771 r4793 315 315 316 316 /** 317 * This structure contains additional info about AudioMediaPlayer. 318 */ 319 struct AudioMediaPlayerInfo 320 { 321 /** 322 * Format ID of the payload. 323 */ 324 pjmedia_format_id formatId; 325 326 /** 327 * The number of bits per sample of the file payload. For example, 328 * the value is 16 for PCM WAV and 8 for Alaw/Ulas WAV files. 329 */ 330 unsigned payloadBitsPerSample; 331 332 /** 333 * The WAV payload size in bytes. 334 */ 335 pj_uint32_t sizeBytes; 336 337 /** 338 * The WAV payload size in samples. 339 */ 340 pj_uint32_t sizeSamples; 341 }; 342 343 /** 317 344 * Audio Media Player. 318 345 */ … … 355 382 356 383 /** 357 * Set playback position. This operation is not valid for playlist. 384 * Get additional info about the player. This operation is only valid 385 * for player. For playlist, Error will be thrown. 386 * 387 * @return the info. 388 */ 389 AudioMediaPlayerInfo getInfo() const throw(Error); 390 391 /** 392 * Get current playback position in samples. This operation is not valid 393 * for playlist. 394 * 395 * @return Current playback position, in samples. 396 */ 397 pj_uint32_t getPos() const throw(Error); 398 399 /** 400 * Set playback position in samples. This operation is not valid for 401 * playlist. 358 402 * 359 403 * @param samples The desired playback position, in samples. … … 372 416 373 417 /** 374 * Virtual destructor.418 * Destructor. 375 419 */ 376 420 virtual ~AudioMediaPlayer(); 377 421 422 public: 423 /* 424 * Callbacks 425 */ 426 427 /** 428 * Register a callback to be called when the file player reading has 429 * reached the end of file, or when the file reading has reached the 430 * end of file of the last file for a playlist. If the file or playlist 431 * is set to play repeatedly, then the callback will be called multiple 432 * times. 433 * 434 * @return If the callback returns false, the playback 435 * will stop. Note that if application destroys 436 * the player in the callback, it must return 437 * false here. 438 */ 439 virtual bool onEof() 440 { return true; } 441 442 378 443 private: 379 444 /** … … 382 447 int playerId; 383 448 449 /** 450 * Low level PJMEDIA callback 451 */ 452 static pj_status_t eof_cb(pjmedia_port *port, 453 void *usr_data); 384 454 }; 385 455 … … 431 501 432 502 /** 433 * Virtual destructor.503 * Destructor. 434 504 */ 435 505 virtual ~AudioMediaRecorder();
Note: See TracChangeset
for help on using the changeset viewer.