STDMETHODIMP CMpTs::PmtSetPmtPid(int handle,int pmtPid, long serviceId) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pPmtGrabber->SetPmtPid(pmtPid,serviceId ); }
STDMETHODIMP CMpTs::PmtGetPMTData (int handle,BYTE *pmtData) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pPmtGrabber->GetPMTData (pmtData); }
STDMETHODIMP CMpTs::AnalyzerGetAudioPid(int handle, int* audioPid) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pVideoAnalyzer->GetAudioPid( audioPid); }
STDMETHODIMP CMpTs:: TimeShiftGetBufferSize( int handle, long * size) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pTimeShifting->GetBufferSize( size); return S_OK; }
STDMETHODIMP CMpTs::AnalyzerIsAudioEncrypted(int handle, int* yesNo) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pVideoAnalyzer->IsAudioEncrypted( yesNo); }
STDMETHODIMP CMpTs::AnalyzerReset(int handle ) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pVideoAnalyzer->Reset( ); }
STDMETHODIMP CMpTs::RecordSetPmtPid(int handle,int mtPid, int serviceId,byte* pmtData,int pmtLength ) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pRecorder->SetPmtPid( mtPid, serviceId,pmtData,pmtLength ); return S_OK; }
STDMETHODIMP CMpTs:: TimeShiftSetPmtPid( int handle, int pmtPid, int serviceId,byte* pmtData,int pmtLength) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pTimeShifting->SetPmtPid( pmtPid,serviceId,pmtData,pmtLength); return S_OK; }
STDMETHODIMP CMpTs:: TimeShiftPause( int handle, BYTE onOff) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pTimeShifting->Pause( onOff); return S_OK; }
STDMETHODIMP CMpTs::RecordSetRecordingFileNameW( int handle, wchar_t* pwszFileName) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pRecorder->SetFileNameW(pwszFileName); return S_OK; }
STDMETHODIMP CMpTs::TTxSetTeletextPid( int handle,int teletextPid) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pTeletextGrabber->SetTeletextPid(teletextPid ); }
STDMETHODIMP CMpTs::RecordStopRecord( int handle) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pRecorder->Stop( ); return S_OK; }
STDMETHODIMP CMpTs::CaGetCaData(int handle,BYTE *caData) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pCaGrabber->GetCaData(caData ); }
STDMETHODIMP CMpTs::PmtSetCallBack(int handle,IPMTCallback* callback) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pPmtGrabber->SetCallBack(callback); }
STDMETHODIMP CMpTs::RecordSetVideoAudioObserver(int handle, IVideoAudioObserver* callback) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_FALSE; pChannel->m_pRecorder->SetVideoAudioObserver(callback); return S_OK; }
STDMETHODIMP CMpTs::TimeShiftGetCurrentFilePosition(int handle,__int64 * position,long * bufferId) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pTimeShifting->GetTimeShiftPosition(position,bufferId); return S_OK; }
STDMETHODIMP CMpTs::CaReset(int handle) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pCaGrabber->Reset( ); }
STDMETHODIMP CMpTs::TimeShiftSetChannelType(int handle, int channelType) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pRecorder->SetChannelType(channelType); pChannel->m_pTimeShifting->SetChannelType(channelType); return S_OK; }
STDMETHODIMP CMpTs::SetVideoAudioObserver(int handle, IVideoAudioObserver* callback) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_FALSE; pChannel->m_pTimeShifting->SetVideoAudioObserver(callback); return S_OK; }
STDMETHODIMP CMpTs::RecordStartRecord( int handle) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; if (pChannel->m_pRecorder->Start()) return S_OK; else return S_FALSE; }
STDMETHODIMP CMpTs::TimeShiftSetParams(int handle, int minFiles, int maxFiles, ULONG chunkSize) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; pChannel->m_pTimeShifting->SetMinTSFiles(minFiles); pChannel->m_pTimeShifting->SetMaxTSFiles(maxFiles); pChannel->m_pTimeShifting->SetMaxTSFileSize(chunkSize); pChannel->m_pTimeShifting->SetChunkReserve(chunkSize); return S_OK; }
STDMETHODIMP CMpTs::TimeShiftStop( int handle ) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; if (b_dumpRawPakets) { m_rawPaketWriter->CloseFile(); LogDebug("Raw packet dump file closed"); } pChannel->m_pTimeShifting->Stop( ); return S_OK; }
STDMETHODIMP CMpTs::TimeShiftStart( int handle ) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; if (b_dumpRawPakets) { m_rawPaketWriter->OpenFile(); LogDebug("Raw packet dump file created. Now dumping raw packets to dump file"); } if (pChannel->m_pTimeShifting->Start()) return S_OK; else return S_FALSE; }
STDMETHODIMP CMpTs:: TimeShiftReset( int handle ) { CAutoLock lock(&m_channelLock); CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; if (b_dumpRawPackets) { m_pRawPacketWriter->CloseFile(); m_pRawPacketWriter->OpenFile(); LogDebug("Raw packet dump file reset"); } pChannel->m_pTimeShifting->Reset( ); return S_OK; }
STDMETHODIMP CMpTs::TimeShiftSetTimeShiftingFileNameW( int handle, wchar_t* pwszFileName) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; b_dumpRawPakets=false; if (DumpRawTS()) { b_dumpRawPakets=true; wstring fileName=pwszFileName; fileName=fileName.substr(0, fileName.rfind(L"\\")); fileName.append(L"\\raw_packet_dump.ts"); LogDebug(L"Setting name for raw packet dump file to %s", fileName.c_str()); m_rawPaketWriter->SetFileName(fileName.c_str()); } pChannel->m_pTimeShifting->SetFileNameW(pwszFileName); return S_OK; }
STDMETHODIMP CMpTs::GetStreamQualityCounters(int handle, int* totalTsBytes, int* totalRecordingBytes, int* TsDiscontinuity, int* recordingDiscontinuity) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_FALSE; if (pChannel->m_pTimeShifting) { pChannel->m_pTimeShifting->GetDiscontinuityCounter(TsDiscontinuity); pChannel->m_pTimeShifting->GetTotalBytes(totalTsBytes); } if (pChannel->m_pRecorder) { pChannel->m_pRecorder->GetDiscontinuityCounter(recordingDiscontinuity); pChannel->m_pRecorder->GetTotalBytes(totalRecordingBytes); } if (pChannel->m_pRecorder || pChannel->m_pTimeShifting) return S_OK; else return S_FALSE; }
STDMETHODIMP CMpTs::TTxStop( int handle ) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pTeletextGrabber->Stop( ); }
STDMETHODIMP CMpTs::CaSetCallBack(int handle,ICACallback* callback) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pCaGrabber->SetCallBack(callback ); }
STDMETHODIMP CMpTs::TTxSetCallBack( int handle,ITeletextCallBack* callback) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pTeletextGrabber->SetCallBack(callback ); }
STDMETHODIMP CMpTs::AnalyzerIsVideoEncrypted(int handle, int* yesNo) { CTsChannel* pChannel=GetTsChannel(handle); if (pChannel==NULL) return S_OK; return pChannel->m_pVideoAnalyzer->IsVideoEncrypted( yesNo); }