Patches for dvb in vls-trunk
Mr Mailing List <[email protected]> Mon, 6 Sep 2004 09:35:38 +0200
| Newsgroups | gmane.comp.video.videolan.vls.devel |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-3-184821189
Content-Type: multipart/alternative;
boundary=Apple-Mail-4-184821190
--Apple-Mail-4-184821190
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
Attached are a couple of patches for vls-trunk.
When dvb is being streamed the PID is copied incorrectly, only the
lower 8 bits are correct.
The change was introduced between revisions 286 and 322, but are not
in the correct 0.5.6 release
--Apple-Mail-4-184821190
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
charset=US-ASCII
Attached are a couple of patches for vls-trunk.
When dvb is being streamed the PID is copied incorrectly, only the
lower 8 bits are correct.
The change was introduced between revisions 286 and 322, but are not
in the correct 0.5.6 release
--Apple-Mail-4-184821190--
--Apple-Mail-3-184821189
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="dvbpsi.cpp.PATCH"
Content-Disposition: attachment;
filename=dvbpsi.cpp.PATCH
*** vls-trunk-UNMOD/src/mpeg/dvbpsi.cpp 2004-08-16 17:52:06.000000000 +0200
--- vls-trunk/src/mpeg/dvbpsi.cpp 2004-09-03 12:57:15.034693952 +0200
***************
*** 118,128 ****
byte *pPosInTs = *pPacket;
byte *pEnd = m_pCurrentSection->p_payload_end
+ (m_pCurrentSection->b_syntax_indicator ? 4 : 0);
pPosInTs[0] = 0x47;
! pPosInTs[1] = (m_pPosInSection == m_pCurrentSection->p_data) ? 0x40 : 0x00
| m_iPid >> 8;
pPosInTs[2] = m_iPid;
pPosInTs[3] = 0x10 | m_iContinuityCounter;
pPosInTs += 4;
--- 118,128 ----
byte *pPosInTs = *pPacket;
byte *pEnd = m_pCurrentSection->p_payload_end
+ (m_pCurrentSection->b_syntax_indicator ? 4 : 0);
pPosInTs[0] = 0x47;
! pPosInTs[1] = ((m_pPosInSection == m_pCurrentSection->p_data) ? 0x40 : 0x00)
| m_iPid >> 8;
pPosInTs[2] = m_iPid;
pPosInTs[3] = 0x10 | m_iContinuityCounter;
pPosInTs += 4;
--Apple-Mail-3-184821189
Content-Type: multipart/alternative;
boundary=Apple-Mail-5-184821191
--Apple-Mail-5-184821191
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed
The second patch kind of reverses changes that seem to have been
introduced between revisions 599 and 627. If a PAT is not entirely
contained in one TS, the code crashes. This is also correct in 0.5.6
--Apple-Mail-5-184821191
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
charset=US-ASCII
The second patch kind of reverses changes that seem to have been
introduced between revisions 599 and 627. If a PAT is not entirely
contained in one TS, the code crashes. This is also correct in 0.5.6
--Apple-Mail-5-184821191--
--Apple-Mail-3-184821189
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="tsmux.cpp.PATCH"
Content-Disposition: attachment;
filename=tsmux.cpp.PATCH
*** vls-trunk-UNMOD/src/mpeg/tsmux.cpp 2004-08-16 17:52:05.000000000 +0200
--- vls-trunk/src/mpeg/tsmux.cpp 2004-09-06 08:49:31.332930616 +0200
***************
*** 57,66 ****
--- 57,69 ----
#include "tsdemux.h"
#include "dvbpsi.h"
#include "tsmux.h"
+ #ifdef SMARTTV_CA
+ # include "vls_cas.cpp"
+ #endif
//******************************************************************************
// C_TsMuxPmtDecoder class
//******************************************************************************
//
***************
*** 71,80 ****
--- 74,86 ----
//------------------------------------------------------------------------------
C_TsMuxPmtDecoder::C_TsMuxPmtDecoder(C_NetList *pTsProvider,
C_TsMux *pMux,
u16 iProgramNumber) :
C_DvbPsiPmtDecoder(iProgramNumber, pTsProvider, this)
+ #ifdef SMARTTV_CA
+ , m_iECMPid(-1)
+ #endif
{
ASSERT(pMux);
uiPnr = iProgramNumber;
m_pMux = pMux;
}
***************
*** 107,116 ****
--- 113,125 ----
m_pMux->m_pDemux->UnselectPid(m_pMux, pEs->i_pid);
printf("--- %x\n", pEs->i_pid);
pEs = pEs->p_next;
}
}
+ #ifdef SMARTTV_CA
+ startECM(-1);
+ #endif
m_pMux->m_pDemux->UnLock();
}
***************
*** 148,162 ****
pLLPmt = DiffPmtAdd.GetLowLevelPmt();
dvbpsi_pmt_es_t* pEs = pLLPmt->p_first_es;
while(pEs)
{
m_pMux->m_pDemux->SelectPid(m_pMux, pEs->i_pid, pEs->i_type);
! printf("+++ %x\n", pEs->i_pid);
pEs = pEs->p_next;
}
m_pMux->m_pDemux->SelectPid(m_pMux, pLLPmt->i_pcr_pid, TS_TYPE_NULL);
}
}
//******************************************************************************
--- 157,174 ----
pLLPmt = DiffPmtAdd.GetLowLevelPmt();
dvbpsi_pmt_es_t* pEs = pLLPmt->p_first_es;
while(pEs)
{
m_pMux->m_pDemux->SelectPid(m_pMux, pEs->i_pid, pEs->i_type);
! // printf("+++ %x\n", pEs->i_pid);
pEs = pEs->p_next;
}
m_pMux->m_pDemux->SelectPid(m_pMux, pLLPmt->i_pcr_pid, TS_TYPE_NULL);
+ #ifdef SMARTTV_CA
+ startECM(casPmtEcmPid());
+ #endif
}
}
//******************************************************************************
***************
*** 168,177 ****
--- 180,192 ----
//------------------------------------------------------------------------------
// Constructor
//------------------------------------------------------------------------------
C_TsMux::C_TsMux(C_NetList *pTsProvider, C_TsDemux *pDemux,
I_TsPacketHandler *pHandler) : m_cPat(1, 0, true)
+ #ifdef SMARTTV_CA
+ ,m_cCat(this, pTsProvider, pDemux, pHandler)
+ #endif
{
ASSERT(pTsProvider);
ASSERT(pDemux);
ASSERT(pHandler);
***************
*** 194,206 ****
// Mux initialilzation
//------------------------------------------------------------------------------
void C_TsMux::Attach()
{
// Lock the demux because we're running in another thread
m_pDemux->Lock();
!
m_pDemux->SelectPid(this, 0x0000, TS_TYPE_NULL);
m_pDemux->UnLock();
}
--- 209,226 ----
// Mux initialilzation
//------------------------------------------------------------------------------
void C_TsMux::Attach()
{
// Lock the demux because we're running in another thread
+ fprintf(stderr, "mux ....%d\n", 0);
m_pDemux->Lock();
! fprintf(stderr, "mux ....%d\n", 1);
m_pDemux->SelectPid(this, 0x0000, TS_TYPE_NULL);
+ fprintf(stderr, "mux ....%d\n", 2);
+ #ifdef SMARTTV_CA
+ m_cCat.Attach();
+ #endif
m_pDemux->UnLock();
}
***************
*** 226,236 ****
cIterator.Reset();
}
m_pDemux->UnselectPid(this, 0x0000);
!
m_pDemux->UnLock();
}
//------------------------------------------------------------------------------
--- 246,258 ----
cIterator.Reset();
}
m_pDemux->UnselectPid(this, 0x0000);
! #ifdef SMARTTV_CA
! m_cCat.Detach();
! #endif
m_pDemux->UnLock();
}
//------------------------------------------------------------------------------
***************
*** 378,387 ****
--- 400,413 ----
// Here we are, this PMT refers to the right streams. But we can't send
// it: we need to regenerate the continuity counter... Let's generate
// all the PMT packets ...
+ if (!pDecoder->GetCurrentPmt()) {
+ fprintf(stderr,"PMT abort\n");
+ return true;
+ }
pDecoder->GetCurrentPmt()->Generate();
pDecoder->GetCurrentPmt()->TsReset();
while(pDecoder->GetCurrentPmt()->TsHasNext())
{
--Apple-Mail-3-184821189
Content-Type: multipart/alternative;
boundary=Apple-Mail-6-184821192
--Apple-Mail-6-184821192
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=ISO-8859-1;
format=flowed
Both patches should be elaborated, but for lack of time right now, this=20=
will happen later.
--
/j=F8rgen n=F8rgaard
[email protected]
Phone: +45 3332 5770
http://smarttv.dk/
--Apple-Mail-6-184821192
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
charset=ISO-8859-1
Both patches should be elaborated, but for lack of time right now,
this will happen later.=20
<fontfamily><param>Geneva</param>--
/j=F8rgen n=F8rgaard
[email protected]
Phone: +45 3332 5770
http://smarttv.dk/
</fontfamily>=
--Apple-Mail-6-184821192--
--Apple-Mail-3-184821189--
--
This is the vls-devel mailing-list, see http://www.videolan.org/streaming/
To unsubscribe, please read http://developers.videolan.org/lists.html