Mercurial > mplayer.hg
comparison stream/tvi_dshow.c @ 29809:e255f9571156
Remove CONFIG_TV_TELETEXT.
DVB teletext support is nearly finished, it will be possible to read
teletext from file, it will not be depending on reception any more.
author | cehoyos |
---|---|
date | Sat, 07 Nov 2009 16:40:42 +0000 |
parents | a5e7590ffdbd |
children | 774aa6f7399e |
comparison
equal
deleted
inserted
replaced
29808:97594e5387c8 | 29809:e255f9571156 |
---|---|
2262 return 1; //no audio | 2262 return 1; //no audio |
2263 mp_msg(MSGT_TV,MSGL_DBG3,"get_audio_framesize: %d\n",priv->chains[1]->rbuf->blocksize); | 2263 mp_msg(MSGT_TV,MSGL_DBG3,"get_audio_framesize: %d\n",priv->chains[1]->rbuf->blocksize); |
2264 return priv->chains[1]->rbuf->blocksize; | 2264 return priv->chains[1]->rbuf->blocksize; |
2265 } | 2265 } |
2266 | 2266 |
2267 #ifdef CONFIG_TV_TELETEXT | |
2268 static int vbi_get_props(priv_t* priv,tt_stream_props* ptsp) | 2267 static int vbi_get_props(priv_t* priv,tt_stream_props* ptsp) |
2269 { | 2268 { |
2270 if(!priv || !ptsp) | 2269 if(!priv || !ptsp) |
2271 return TVI_CONTROL_FALSE; | 2270 return TVI_CONTROL_FALSE; |
2272 | 2271 |
2308 rb->head = (rb->head + 1) % rb->buffersize; | 2307 rb->head = (rb->head + 1) % rb->buffersize; |
2309 rb->count--; | 2308 rb->count--; |
2310 } | 2309 } |
2311 free(buf); | 2310 free(buf); |
2312 } | 2311 } |
2313 #endif /* CONFIG_TV_TELETEXT */ | |
2314 | 2312 |
2315 /** | 2313 /** |
2316 * \brief fills given buffer with video data (usually one frame) | 2314 * \brief fills given buffer with video data (usually one frame) |
2317 * | 2315 * |
2318 * \param priv driver's private data structure | 2316 * \param priv driver's private data structure |
2353 memcpy(buffer, rb->ringbuffer[rb->head], bytes); | 2351 memcpy(buffer, rb->ringbuffer[rb->head], bytes); |
2354 rb->head = (rb->head + 1) % rb->buffersize; | 2352 rb->head = (rb->head + 1) % rb->buffersize; |
2355 rb->count--; | 2353 rb->count--; |
2356 LeaveCriticalSection(rb->pMutex); | 2354 LeaveCriticalSection(rb->pMutex); |
2357 | 2355 |
2358 #ifdef CONFIG_TV_TELETEXT | |
2359 vbi_grabber(priv); | 2356 vbi_grabber(priv); |
2360 #endif | |
2361 return pts; | 2357 return pts; |
2362 } | 2358 } |
2363 | 2359 |
2364 /** | 2360 /** |
2365 * \brief returns frame size | 2361 * \brief returns frame size |
2544 * | 2540 * |
2545 * \return S_OK if chain was built successfully, apropriate error code otherwise | 2541 * \return S_OK if chain was built successfully, apropriate error code otherwise |
2546 */ | 2542 */ |
2547 static HRESULT build_vbi_chain(priv_t *priv) | 2543 static HRESULT build_vbi_chain(priv_t *priv) |
2548 { | 2544 { |
2549 #ifdef CONFIG_TV_TELETEXT | |
2550 HRESULT hr; | 2545 HRESULT hr; |
2551 | 2546 |
2552 if(priv->chains[2]->rbuf) | 2547 if(priv->chains[2]->rbuf) |
2553 return S_OK; | 2548 return S_OK; |
2554 | 2549 |
2564 if(FAILED(hr)){ | 2559 if(FAILED(hr)){ |
2565 mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildVBISubGraph,(unsigned int)hr); | 2560 mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TVI_DS_UnableBuildVBISubGraph,(unsigned int)hr); |
2566 return 0; | 2561 return 0; |
2567 } | 2562 } |
2568 } | 2563 } |
2569 #endif | |
2570 return S_OK; | 2564 return S_OK; |
2571 } | 2565 } |
2572 | 2566 |
2573 /** | 2567 /** |
2574 * \brief playback/capture real start | 2568 * \brief playback/capture real start |
2900 (void *) &rc); | 2894 (void *) &rc); |
2901 | 2895 |
2902 OLE_QUERYINTERFACE(priv->pBuilder,IID_IBaseFilter,pBF); | 2896 OLE_QUERYINTERFACE(priv->pBuilder,IID_IBaseFilter,pBF); |
2903 OLE_CALL_ARGS(pBF,SetSyncSource,rc); | 2897 OLE_CALL_ARGS(pBF,SetSyncSource,rc); |
2904 } | 2898 } |
2905 #ifdef CONFIG_TV_TELETEXT | |
2906 if(vbi_get_props(priv,&(priv->tsp))!=TVI_CONTROL_TRUE) | 2899 if(vbi_get_props(priv,&(priv->tsp))!=TVI_CONTROL_TRUE) |
2907 break; | 2900 break; |
2908 #endif | |
2909 result = 1; | 2901 result = 1; |
2910 } while(0); | 2902 } while(0); |
2911 | 2903 |
2912 if (!result){ | 2904 if (!result){ |
2913 mp_msg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_GraphInitFailure); | 2905 mp_msg(MSGT_TV,MSGL_ERR, MSGTR_TVI_DS_GraphInitFailure); |
2973 return 1; | 2965 return 1; |
2974 //Debug | 2966 //Debug |
2975 if (priv->dwRegister) { | 2967 if (priv->dwRegister) { |
2976 RemoveFromRot(priv->dwRegister); | 2968 RemoveFromRot(priv->dwRegister); |
2977 } | 2969 } |
2978 #ifdef CONFIG_TV_TELETEXT | |
2979 teletext_control(priv->priv_vbi,TV_VBI_CONTROL_STOP,(void*)1); | 2970 teletext_control(priv->priv_vbi,TV_VBI_CONTROL_STOP,(void*)1); |
2980 #endif | |
2981 //stop audio grabber thread | 2971 //stop audio grabber thread |
2982 | 2972 |
2983 if (priv->state && priv->pMediaControl) { | 2973 if (priv->state && priv->pMediaControl) { |
2984 OLE_CALL(priv->pMediaControl, Stop); | 2974 OLE_CALL(priv->pMediaControl, Stop); |
2985 } | 2975 } |
3480 return TVI_CONTROL_TRUE; | 3470 return TVI_CONTROL_TRUE; |
3481 } | 3471 } |
3482 case TVI_CONTROL_IMMEDIATE: | 3472 case TVI_CONTROL_IMMEDIATE: |
3483 priv->immediate_mode = 1; | 3473 priv->immediate_mode = 1; |
3484 return TVI_CONTROL_TRUE; | 3474 return TVI_CONTROL_TRUE; |
3485 #ifdef CONFIG_TV_TELETEXT | |
3486 case TVI_CONTROL_VBI_INIT: | 3475 case TVI_CONTROL_VBI_INIT: |
3487 { | 3476 { |
3488 void* ptr; | 3477 void* ptr; |
3489 ptr=&(priv->tsp); | 3478 ptr=&(priv->tsp); |
3490 if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==VBI_CONTROL_TRUE) | 3479 if(teletext_control(NULL,TV_VBI_CONTROL_START,&ptr)==VBI_CONTROL_TRUE) |
3494 return TVI_CONTROL_TRUE; | 3483 return TVI_CONTROL_TRUE; |
3495 } | 3484 } |
3496 case TVI_CONTROL_GET_VBI_PTR: | 3485 case TVI_CONTROL_GET_VBI_PTR: |
3497 *(void **)arg=priv->priv_vbi; | 3486 *(void **)arg=priv->priv_vbi; |
3498 return TVI_CONTROL_TRUE; | 3487 return TVI_CONTROL_TRUE; |
3499 #endif | |
3500 } | 3488 } |
3501 return TVI_CONTROL_UNKNOWN; | 3489 return TVI_CONTROL_UNKNOWN; |
3502 } | 3490 } |