implemented _ANGLE STREAM_CTRLs, patch by oattila chello hu

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25602 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
nicodvb 2008-01-05 14:22:48 +00:00
parent cf350b07f0
commit 4af051b6c3
1 changed files with 27 additions and 0 deletions

View File

@ -351,6 +351,33 @@ static int control(stream_t *stream, int cmd, void* arg) {
return 1;
break;
}
case STREAM_CTRL_GET_NUM_ANGLES:
{
uint32_t curr, angles;
if(dvdnav_get_angle_info(priv->dvdnav, &curr, &angles) != DVDNAV_STATUS_OK)
break;
*((int *)arg) = angles;
return 1;
}
case STREAM_CTRL_GET_ANGLE:
{
uint32_t curr, angles;
if(dvdnav_get_angle_info(priv->dvdnav, &curr, &angles) != DVDNAV_STATUS_OK)
break;
*((int *)arg) = curr;
return 1;
}
case STREAM_CTRL_SET_ANGLE:
{
uint32_t curr, angles;
int new_angle = *((int *)arg);
if(dvdnav_get_angle_info(priv->dvdnav, &curr, &angles) != DVDNAV_STATUS_OK)
break;
if(new_angle>angles || new_angle<1)
break;
if(dvdnav_angle_change(priv->dvdnav, new_angle) != DVDNAV_STATUS_OK)
return 1;
}
}
return STREAM_UNSUPPORTED;