Mercurial > mplayer.hg
comparison stream/tv.c @ 23900:b5cc28c45d73
Teletext support.
Part 2/5: options/slaves/configure/definitions/etc
author | voroshil |
---|---|
date | Sun, 29 Jul 2007 17:55:28 +0000 |
parents | 0ad7037df91f |
children | 9e71e0345c35 |
comparison
equal
deleted
inserted
replaced
23899:34532db868ba | 23900:b5cc28c45d73 |
---|---|
514 tvi_functions_t *funcs; | 514 tvi_functions_t *funcs; |
515 | 515 |
516 demuxer->priv=NULL; | 516 demuxer->priv=NULL; |
517 if(!(tvh=tv_begin(demuxer->stream->priv))) return NULL; | 517 if(!(tvh=tv_begin(demuxer->stream->priv))) return NULL; |
518 if (!tvh->functions->init(tvh->priv)) return NULL; | 518 if (!tvh->functions->init(tvh->priv)) return NULL; |
519 | |
520 tvh->functions->control(tvh->priv,TVI_CONTROL_VBI_INIT,&(tvh->tv_param->tdevice)); | |
521 | |
519 if (!open_tv(tvh)){ | 522 if (!open_tv(tvh)){ |
520 tv_uninit(tvh); | 523 tv_uninit(tvh); |
521 return NULL; | 524 return NULL; |
522 } | 525 } |
523 funcs = tvh->functions; | 526 funcs = tvh->functions; |
729 | 732 |
730 tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq); | 733 tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_GET_FREQ, &freq); |
731 mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency, | 734 mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_CurrentFrequency, |
732 freq, (float)freq/16); | 735 freq, (float)freq/16); |
733 } | 736 } |
737 tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); | |
734 return(1); | 738 return(1); |
735 } | 739 } |
736 | 740 |
737 /***************************************************************** | 741 /***************************************************************** |
738 * \brief tune current frequency by step_interval value | 742 * \brief tune current frequency by step_interval value |
888 &tvh->norm) != TVI_CONTROL_TRUE) { | 892 &tvh->norm) != TVI_CONTROL_TRUE) { |
889 mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); | 893 mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); |
890 return 0; | 894 return 0; |
891 } | 895 } |
892 } | 896 } |
897 tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); | |
893 return(1); | 898 return(1); |
894 } | 899 } |
895 | 900 |
896 int tv_step_chanlist(tvi_handle_t *tvh) | 901 int tv_step_chanlist(tvi_handle_t *tvh) |
897 { | 902 { |
905 mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNorm, tvh->tv_param->norm); | 910 mp_msg(MSGT_TV, MSGL_V, MSGTR_TV_SelectedNorm, tvh->tv_param->norm); |
906 if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) { | 911 if (tvh->functions->control(tvh->priv, TVI_CONTROL_TUN_SET_NORM, &tvh->norm) != TVI_CONTROL_TRUE) { |
907 mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); | 912 mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_CannotSetNorm); |
908 return 0; | 913 return 0; |
909 } | 914 } |
915 tvh->functions->control(tvh->priv,TV_VBI_CONTROL_RESET,tvh->tv_param); | |
910 return(1); | 916 return(1); |
911 } | 917 } |
912 | 918 |
913 demuxer_desc_t demuxer_desc_tv = { | 919 demuxer_desc_t demuxer_desc_tv = { |
914 "Tv card demuxer", | 920 "Tv card demuxer", |