- Timestamp:
- Jan 12, 2008 11:11:58 AM (17 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/include/pjmedia/wav_port.h
r974 r1680 73 73 pj_ssize_t buff_size, 74 74 pjmedia_port **p_port ); 75 76 77 /** 78 * Get the data length, in bytes. 79 * 80 * @param port The file player port. 81 * 82 * @return The length of the data, in bytes. Upon error it will 83 * return negative value. 84 */ 85 PJ_DECL(pj_ssize_t) pjmedia_wav_player_get_len(pjmedia_port *port); 75 86 76 87 -
pjproject/trunk/pjmedia/src/pjmedia/wav_player.c
r1417 r1680 401 401 402 402 /* 403 * Get the data length, in bytes. 404 */ 405 PJ_DEF(pj_ssize_t) pjmedia_wav_player_get_len(pjmedia_port *port) 406 { 407 struct file_port *fport; 408 pj_ssize_t size; 409 410 /* Sanity check */ 411 PJ_ASSERT_RETURN(port, -PJ_EINVAL); 412 413 /* Check that this is really a player port */ 414 PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, -PJ_EINVALIDOP); 415 416 fport = (struct file_port*) port; 417 418 size = (pj_ssize_t) fport->fsize; 419 return size - fport->start_data; 420 } 421 422 423 /* 403 424 * Set position. 404 425 */ … … 409 430 410 431 /* Sanity check */ 411 PJ_ASSERT_RETURN(port, -PJ_EINVAL);432 PJ_ASSERT_RETURN(port, PJ_EINVAL); 412 433 413 434 /* Check that this is really a player port */ 414 PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, -PJ_EINVALIDOP);435 PJ_ASSERT_RETURN(port->info.signature == SIGNATURE, PJ_EINVALIDOP); 415 436 416 437
Note: See TracChangeset
for help on using the changeset viewer.