comparison mplayer.c @ 1627:eeaee1632340

absolute seek debugging with 1-8 keys (disabled by default)
author arpi
date Wed, 22 Aug 2001 19:02:28 +0000
parents 5f5505e4bb2d
children 13aeaa05ac5e
comparison
equal deleted inserted replaced
1626:5f5505e4bb2d 1627:eeaee1632340
270 float sub_delay=0; 270 float sub_delay=0;
271 float sub_fps=0; 271 float sub_fps=0;
272 int sub_auto = 1; 272 int sub_auto = 1;
273 /*DSP!!char *dsp=NULL;*/ 273 /*DSP!!char *dsp=NULL;*/
274 274
275 float rel_seek_secs=0; 275 //float rel_seek_secs=0;
276 //float initial_pts_delay=0; 276 //float initial_pts_delay=0;
277 277
278 extern char *vo_subdevice; 278 extern char *vo_subdevice;
279 extern char *ao_subdevice; 279 extern char *ao_subdevice;
280 280
444 int v_saturation=50; 444 int v_saturation=50;
445 445
446 //float a_frame=0; // Audio 446 //float a_frame=0; // Audio
447 447
448 float rel_seek_secs=0; 448 float rel_seek_secs=0;
449 int abs_seek_pos=0;
449 450
450 int i; 451 int i;
451 int use_stdin=0; //int f; // filedes 452 int use_stdin=0; //int f; // filedes
452 453
453 mp_msg_init(MSGL_STATUS); 454 mp_msg_init(MSGL_STATUS);
1552 break; 1553 break;
1553 case 'm': 1554 case 'm':
1554 mixer_usemaster=!mixer_usemaster; 1555 mixer_usemaster=!mixer_usemaster;
1555 break; 1556 break;
1556 1557
1558 #if 0 // change to 1 for absolute seeking tests
1559 case '1':
1560 case '2':
1561 case '3':
1562 case '4':
1563 case '5':
1564 case '6':
1565 case '7':
1566 case '8':
1567 rel_seek_secs=0.99*(float)(c-'1')/7.0;
1568 abs_seek_pos=3;
1569 printf("ABS seek to %5.3f \n",rel_seek_secs);
1570 break;
1571 #else
1557 // Contrast: 1572 // Contrast:
1558 case '1': 1573 case '1':
1559 case '2': 1574 case '2':
1560 if(c=='2'){ 1575 if(c=='2'){
1561 if ( ++v_cont > 100 ) v_cont = 100; 1576 if ( ++v_cont > 100 ) v_cont = 100;
1627 vo_osd_progbar_value=(v_saturation)*255/100; 1642 vo_osd_progbar_value=(v_saturation)*255/100;
1628 } 1643 }
1629 #endif 1644 #endif
1630 } 1645 }
1631 break; 1646 break;
1647 #endif
1632 1648
1633 case 'd': 1649 case 'd':
1634 frame_dropping=(frame_dropping+1)%3; 1650 frame_dropping=(frame_dropping+1)%3;
1635 mp_msg(MSGT_CPLAYER,MSGL_V,"== drop: %d == \n",frame_dropping); 1651 mp_msg(MSGT_CPLAYER,MSGL_V,"== drop: %d == \n",frame_dropping);
1636 break; 1652 break;
1648 rel_seek_secs += d; 1664 rel_seek_secs += d;
1649 1665
1650 seek_to_sec = NULL; 1666 seek_to_sec = NULL;
1651 } 1667 }
1652 1668
1653 if(rel_seek_secs){ 1669 if(rel_seek_secs || abs_seek_pos){
1654 current_module="seek"; 1670 current_module="seek";
1655 if(demux_seek(demuxer,rel_seek_secs,0)){ 1671 if(demux_seek(demuxer,rel_seek_secs,abs_seek_pos)){
1656 // success: 1672 // success:
1657 1673
1658 if(sh_audio){ 1674 if(sh_audio){
1659 if(verbose){ 1675 if(verbose){
1660 float a_pts=d_audio->pts; 1676 float a_pts=d_audio->pts;
1690 audio_time_usage=0; video_time_usage=0; vout_time_usage=0; 1706 audio_time_usage=0; video_time_usage=0; vout_time_usage=0;
1691 drop_frame_cnt=0; 1707 drop_frame_cnt=0;
1692 1708
1693 } 1709 }
1694 rel_seek_secs=0; 1710 rel_seek_secs=0;
1711 abs_seek_pos=0;
1695 current_module=NULL; 1712 current_module=NULL;
1696 } 1713 }
1697 1714
1698 //================= Update OSD ==================== 1715 //================= Update OSD ====================
1699 #ifdef USE_OSD 1716 #ifdef USE_OSD