summaryrefslogtreecommitdiffstats
path: root/stream
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-19 19:49:17 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-19 19:49:17 +0000
commit12fd87977640e13d4e55f9edcdfd365a32430621 (patch)
tree90b137fc88a2de2fec5535b3926c126d449d6f4a /stream
parent423882fe73912b2f0987ebba8d8135fb656db235 (diff)
downloadmpv-12fd87977640e13d4e55f9edcdfd365a32430621.tar.bz2
mpv-12fd87977640e13d4e55f9edcdfd365a32430621.tar.xz
Move pointer to SampleGrabber filter into chain structure.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25114 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r--stream/tvi_dshow.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c
index 13e39575b6..9173a47117 100644
--- a/stream/tvi_dshow.c
+++ b/stream/tvi_dshow.c
@@ -150,6 +150,7 @@ typedef struct {
IAMStreamConfig *pStreamConfig; ///< for configuring stream
grabber_ringbuffer_t *rbuf; ///< sample frabber data
+ CSampleGrabberCB* pCSGCB; ///< callback object
AM_MEDIA_TYPE *pmt; ///< stream properties.
int nFormatUsed; ///< index of used format
@@ -186,7 +187,6 @@ typedef struct {
IAMVideoProcAmp *pVideoProcAmp; ///< for adjusting hue,saturation,etc
IAMCrossbar *pCrossbar; ///< for selecting input (Tuner,Composite,S-Video,...)
DWORD dwRegister; ///< allow graphedit to connect to our graph
- CSampleGrabberCB* pCSGCB; ///< callback object
void *priv_vbi; ///< private VBI data structure
tt_stream_props tsp; ///< data for VBI initialization
@@ -1355,8 +1355,8 @@ static HRESULT build_sub_graph(priv_t * priv, chain_t * chain, const GUID* ppin_
}
/* creating ringbuffer for video samples */
- priv->pCSGCB = CSampleGrabberCB_Create(chain->rbuf);
- if(!priv->pCSGCB){
+ chain->pCSGCB = CSampleGrabberCB_Create(chain->rbuf);
+ if(!chain->pCSGCB){
mp_msg(MSGT_TV,MSGL_DBG2, "tvi_dshow: CSampleGrabberCB_Create(pbuf) call failed. Error:0x%x\n", (unsigned int)E_OUTOFMEMORY);
break;
}
@@ -1368,7 +1368,7 @@ static HRESULT build_sub_graph(priv_t * priv, chain_t * chain, const GUID* ppin_
break;
}
// hr = OLE_CALL_ARGS(pSG, SetCallback, (ISampleGrabberCB *) pCSGCB, 1); //we want to receive copy of sample's data
- hr = OLE_CALL_ARGS(pSG, SetCallback, (ISampleGrabberCB *) priv->pCSGCB, 0); //we want to receive sample
+ hr = OLE_CALL_ARGS(pSG, SetCallback, (ISampleGrabberCB *) chain->pCSGCB, 0); //we want to receive sample
if(FAILED(hr)){
mp_msg(MSGT_TV,MSGL_DBG2,"tvi_dshow: SetCallback(pSG) call failed. Error:0x%x\n", (unsigned int)hr);
@@ -2950,6 +2950,8 @@ static void destroy_chain(chain_t *chain)
OLE_RELEASE_SAFE(chain->pStreamConfig);
OLE_RELEASE_SAFE(chain->pCaptureFilter);
+ OLE_RELEASE_SAFE(chain->pCSGCB);
+
if (chain->pmt)
DeleteMediaType(chain->pmt);
@@ -3011,8 +3013,6 @@ static int uninit(priv_t * priv)
OLE_RELEASE_SAFE(priv->pVideoProcAmp);
OLE_RELEASE_SAFE(priv->pGraph);
OLE_RELEASE_SAFE(priv->pBuilder);
- OLE_RELEASE_SAFE(priv->pCSGCB);
-
if(priv->freq_table){
priv->freq_table_len=-1;
free(priv->freq_table);