<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2> I try to modify the source code and combine the
testMPEG1or2ProgramToTransportStream and testMPEG2TransportStreamer together in
order to stream vob files but output is transport stream.When I test mpga audio
files,it works well.But when trying vob files with ac3 audio, I can only hear
very noisy sound with clip and pop.My code is something like that:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>#define TRANSPORT_PACKET_SIZE 188<BR>#define
TRANSPORT_PACKETS_PER_NETWORK_PACKET 7</FONT></DIV>
<DIV><FONT size=2>...</FONT></DIV>
<DIV><FONT size=2> videoSink = SimpleRTPSink::createNew(*env,
rtpGroupsockVideo, 33, 90000, "video",
"mp2t",<BR> 1, True, False /*no 'M'
bit*/);<BR>...</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> unsigned const inputDataChunkSize<BR>
= TRANSPORT_PACKETS_PER_NETWORK_PACKET*TRANSPORT_PACKET_SIZE;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> // Open the input file as a 'byte-stream file
source':<BR> ByteStreamFileSource* fileSource<BR> =
ByteStreamFileSource::createNew(*env, *curInputFileName,
inputDataChunkSize);<BR> </FONT></DIV>
<DIV><FONT size=2> MPEG1or2Demux*mpegDemux = MPEG1or2Demux::createNew(*env,
fileSource);<BR></DIV></FONT>
<DIV><FONT size=2> MPEG1or2DemuxedElementaryStream* pesES =
mpegDemux->newRawPESStream();<BR> </FONT></DIV>
<DIV><FONT size=2> FramedSource* tsFrames =
MPEG2TransportStreamFromPESSource::createNew(*env,
pesES);<BR> </FONT></DIV>
<DIV><FONT size=2> FramedSource* tsSource =
MPEG2TransportStreamFramer::createNew(*env, tsFrames);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> videoSink ->startPlaying(*tsSource, afterPlaying,
videoSink);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I notice that in MPEG1or2Demux.cpp there are two
hacks:</FONT></DIV>
<DIV><FONT size=2>line 504:</FONT></DIV>
<DIV><FONT size=2>Boolean
MPEGProgramStreamParser<BR>::isSpecialStreamId(unsigned char stream_id) const
{<BR> if (stream_id == RAW_PES) return True; // hack<BR></DIV></FONT>
<DIV><FONT size=2>line 580:</DIV>
<DIV> if (fUsingSource->fOutput[RAW_PES].isPotentiallyReadable
&& stream_id!=0xBC) {<BR> // Hack: We've been asked to
return raw PES packets, for every stream:<BR> stream_id =
RAW_PES;<BR> } <BR>By the way, I found in a vob file there exists
stream_id as 0xE0(Video mpgv),0xBD(a52),0xBF and 0xBE</DIV>
<DIV>Can you give me a explanation about these stream_ids,especially the last
two ones?</DIV>
<DIV>I also hope you can give some suggestions especially how to deal with
ac3.</DIV>
<DIV>Thanks a lot.<BR></DIV></FONT></FONT></DIV></BODY></HTML>