Changeset 39a529ac7b74bcc20bedc274346baba6ac6330a4
- Timestamp:
- 08/08/08 18:45:42
(4 months ago)
- Author:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr>
- git-committer:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1218213942 +0200
- git-parent:
[2ba42a484307fafa26f9cf1a8ac052280f8a1c35]
- git-author:
- Olivier Aubert <olivier.aubert@liris.cnrs.fr> 1218213942 +0200
- Message:
mediacontrol_core: libvlc_media_player_get_length/time return time in ms, no need for conversion.
Additionnaly, add check for exception.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r43a486b |
r39a529a |
|
| 398 | 398 | |
|---|
| 399 | 399 | retval->url = libvlc_media_get_mrl( p_media, &ex ); |
|---|
| 400 | | |
|---|
| 401 | | /* TIME and LENGTH are in microseconds. We want them in ms */ |
|---|
| | 400 | |
|---|
| 402 | 401 | retval->position = libvlc_media_player_get_time( self->p_media_player, &ex ); |
|---|
| | 402 | if( libvlc_exception_raised( &ex ) ) |
|---|
| | 403 | { |
|---|
| | 404 | libvlc_exception_clear( &ex ); |
|---|
| | 405 | retval->position = 0; |
|---|
| | 406 | } |
|---|
| 403 | 407 | |
|---|
| 404 | 408 | retval->length = libvlc_media_player_get_length( self->p_media_player, &ex ); |
|---|
| 405 | | |
|---|
| 406 | | retval->position = private_mediacontrol_unit_convert( self->p_media_player, |
|---|
| 407 | | mediacontrol_MediaTime, a_key, |
|---|
| 408 | | retval->position ); |
|---|
| 409 | | retval->length = private_mediacontrol_unit_convert( self->p_media_player, |
|---|
| 410 | | mediacontrol_MediaTime, a_key, |
|---|
| 411 | | retval->length ); |
|---|
| | 409 | if( libvlc_exception_raised( &ex ) ) |
|---|
| | 410 | { |
|---|
| | 411 | libvlc_exception_clear( &ex ); |
|---|
| | 412 | retval->length = 0; |
|---|
| | 413 | } |
|---|
| | 414 | |
|---|
| 412 | 415 | } |
|---|
| 413 | 416 | return retval; |
|---|