Mercurial > mplayer.hg
comparison stream/tvi_v4l2.c @ 27370:14c5017f40d2
Change a bunch of video/audio-output-specific preprocessor directives from
a HAVE_ prefix to a CONFIG_ prefix.
author | diego |
---|---|
date | Sun, 03 Aug 2008 15:21:40 +0000 |
parents | 0917bf2bed6c |
children | eb7bdbd98210 |
comparison
equal
deleted
inserted
replaced
27369:8598536ca4f5 | 27370:14c5017f40d2 |
---|---|
75 /* private data */ | 75 /* private data */ |
76 typedef struct { | 76 typedef struct { |
77 /* video */ | 77 /* video */ |
78 char *video_dev; | 78 char *video_dev; |
79 int video_fd; | 79 int video_fd; |
80 #ifdef HAVE_TV_TELETEXT | 80 #ifdef CONFIG_TV_TELETEXT |
81 char *vbi_dev; | 81 char *vbi_dev; |
82 int vbi_fd; | 82 int vbi_fd; |
83 int vbi_bufsize; | 83 int vbi_bufsize; |
84 int vbi_shutdown; | 84 int vbi_shutdown; |
85 pthread_t vbi_grabber_thread; | 85 pthread_t vbi_grabber_thread; |
578 } | 578 } |
579 | 579 |
580 return TVI_CONTROL_TRUE; | 580 return TVI_CONTROL_TRUE; |
581 } | 581 } |
582 | 582 |
583 #ifdef HAVE_TV_TELETEXT | 583 #ifdef CONFIG_TV_TELETEXT |
584 static int vbi_init(priv_t* priv,char* device) | 584 static int vbi_init(priv_t* priv,char* device) |
585 { | 585 { |
586 int vbi_fd=0; | 586 int vbi_fd=0; |
587 struct v4l2_capability cap; | 587 struct v4l2_capability cap; |
588 struct v4l2_format fmt; | 588 struct v4l2_format fmt; |
701 mp_msg(MSGT_TV,MSGL_DBG3,"grabber: seq:%d\n",seq); | 701 mp_msg(MSGT_TV,MSGL_DBG3,"grabber: seq:%d\n",seq); |
702 } | 702 } |
703 free(buf); | 703 free(buf); |
704 return NULL; | 704 return NULL; |
705 } | 705 } |
706 #endif //HAVE_TV_TELETEXT | 706 #endif /* CONFIG_TV_TELETEXT */ |
707 | 707 |
708 static int control(priv_t *priv, int cmd, void *arg) | 708 static int control(priv_t *priv, int cmd, void *arg) |
709 { | 709 { |
710 struct v4l2_control control; | 710 struct v4l2_control control; |
711 struct v4l2_frequency frequency; | 711 struct v4l2_frequency frequency; |
1017 mp_msg(MSGT_TV, MSGL_V, "%s: set audio samplerate: %d\n", | 1017 mp_msg(MSGT_TV, MSGL_V, "%s: set audio samplerate: %d\n", |
1018 info.short_name, *(int *)arg); | 1018 info.short_name, *(int *)arg); |
1019 if (audio_in_set_samplerate(&priv->audio_in, *(int*)arg) < 0) return TVI_CONTROL_FALSE; | 1019 if (audio_in_set_samplerate(&priv->audio_in, *(int*)arg) < 0) return TVI_CONTROL_FALSE; |
1020 // setup_audio_buffer_sizes(priv); | 1020 // setup_audio_buffer_sizes(priv); |
1021 return TVI_CONTROL_TRUE; | 1021 return TVI_CONTROL_TRUE; |
1022 #ifdef HAVE_TV_TELETEXT | 1022 #ifdef CONFIG_TV_TELETEXT |
1023 case TVI_CONTROL_VBI_INIT: | 1023 case TVI_CONTROL_VBI_INIT: |
1024 { | 1024 { |
1025 void* ptr; | 1025 void* ptr; |
1026 tt_stream_props tsp; | 1026 tt_stream_props tsp; |
1027 | 1027 |
1084 | 1084 |
1085 static int uninit(priv_t *priv) | 1085 static int uninit(priv_t *priv) |
1086 { | 1086 { |
1087 int i, frames, dropped = 0; | 1087 int i, frames, dropped = 0; |
1088 | 1088 |
1089 #ifdef HAVE_TV_TELETEXT | 1089 #ifdef CONFIG_TV_TELETEXT |
1090 priv->vbi_shutdown=1; | 1090 priv->vbi_shutdown=1; |
1091 if(priv->vbi_grabber_thread) | 1091 if(priv->vbi_grabber_thread) |
1092 pthread_join(priv->vbi_grabber_thread, NULL); | 1092 pthread_join(priv->vbi_grabber_thread, NULL); |
1093 | 1093 |
1094 teletext_control(priv->priv_vbi,TV_VBI_CONTROL_STOP,(void*)1); | 1094 teletext_control(priv->priv_vbi,TV_VBI_CONTROL_STOP,(void*)1); |
1538 info.short_name, strerror(errno)); | 1538 info.short_name, strerror(errno)); |
1539 return 0; | 1539 return 0; |
1540 } | 1540 } |
1541 } | 1541 } |
1542 | 1542 |
1543 #ifdef HAVE_TV_TELETEXT | 1543 #ifdef CONFIG_TV_TELETEXT |
1544 /* start vbi thread */ | 1544 /* start vbi thread */ |
1545 if(priv->priv_vbi){ | 1545 if(priv->priv_vbi){ |
1546 priv->vbi_shutdown = 0; | 1546 priv->vbi_shutdown = 0; |
1547 pthread_create(&priv->vbi_grabber_thread, NULL, vbi_grabber, priv); | 1547 pthread_create(&priv->vbi_grabber_thread, NULL, vbi_grabber, priv); |
1548 } | 1548 } |