[Live-devel] Live Streaming problem

Juan Carlos Montes jcmontes_es at yahoo.com
Thu Feb 19 10:18:31 PST 2004


Hi all,

I have a problem streaming real time MPEG2 data. I
have made a FramedSource derived class. Its code is
exactly like ByteStreamFileSource, the only changes
are about doGetNextFrame method. I don´t read a file,
i read a device stream (encoder card) in chunks of
32Kb. I have a loop to copy all necesary buffers to
fill fMaxSize. I can´t send any packet. 

If i save the device stream (test.mpg) i can send it
with testMPEG1or2AudioVideoStreamer (is a PS format).
If i change my device read calls for a file device
call (in chunks of 32kb) i can stream the file with my
class. Also i can see it with MPlayer or VLN.

I have compiled liveMedia with -DDEBUG to see what
happens and when i tried to stream the realtime flux i
have always this message:

MPEGProgramStreamParser::parse() EXCEPTION

When i see what happens if i use
testMPEG1or2AudioVideoStreamer i have this:

testMPEG1or2AudioVideoStreamer.exe
...
Beginning streaming...
Beginning to read from file...
parsing pack header
MPEGProgramStreamParser::parse() EXCEPTION
parsing pack header
found pack
pack hdr system_clock_reference_base: 0x000000000
pack hdr system_clock_reference_extension: 0x000
parsing system header
saw system_header_start_code
parsing PES packet
saw packet_start_code_prefix
1, saw video stream: 0x00
PES_packet_length: 2004
PES_header_data_length: 0x0d
video stream, packet presentation_time_stamp:
0x000005c2f
                packet decoding_time_stamp:
0x000004e1f
1, 1988 bytes of PES_packet_data (out.maxSize:
150000); first 4 bytes: 0x000001b
3
parsing PES packet
parsing pack header
found pack
pack hdr system_clock_reference_base: 0x000000307
pack hdr system_clock_reference_extension: 0x000
parsing system header
parsing PES packet
saw packet_start_code_prefix
2, saw video stream: 0x00
PES_packet_length: 2028
PES_header_data_length: 0x00
video stream, packet presentation_time_stamp:
0x000000000
                packet decoding_time_stamp:
0x000000000
2, 2025 bytes of PES_packet_data (out.maxSize:
148012); first 4 bytes: 0xfab2c8b
4
parsing PES packet
parsing pack header
found pack
pack hdr system_clock_reference_base: 0x000000607
pack hdr system_clock_reference_extension: 0x000
parsing system header
parsing PES packet
saw packet_start_code_prefix
3, saw video stream: 0x00
PES_packet_length: 2028
PES_header_data_length: 0x00
video stream, packet presentation_time_stamp:
0x000000000
                packet decoding_time_stamp:
0x000000000
3, currently undeliverable PES data; first 4 bytes:
0x342db43a - currently undel
iverable!
MPEGProgramStreamParser::parse() EXCEPTION
parsing PES packet
saw packet_start_code_prefix
3, saw video stream: 0x00
PES_packet_length: 2028
PES_header_data_length: 0x00
video stream, packet presentation_time_stamp:
0x000000000
                packet decoding_time_stamp:
0x000000000
3, 2025 bytes of PES_packet_data (out.maxSize:
145987); first 4 bytes: 0x342db43
a
parsing PES packet
parsing pack header
found pack
pack hdr system_clock_reference_base: 0x000000908
pack hdr system_clock_reference_extension: 0x000
parsing system header
parsing PES packet
saw packet_start_code_prefix
4, saw video stream: 0x00
PES_packet_length: 2028
PES_header_data_length: 0x00
video stream, packet presentation_time_stamp:
0x000000000
                packet decoding_time_stamp:
0x000000000
...

I think that the problems are about timestamps but i
don´t know what happens exactly. I take a like more
time in my own DeviceSource::doGetNextFrame method
that in the ByteStreamFileSource::doGetNextFrame
because i read in chunks of 32Kb and i have a loop.

What is wrong?

Thanks in advance.

Juan Carlos

PD: I´m waiting for an AMINO answer, when i receive it
i will post to the list.


___________________________________________________
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es


More information about the live-devel mailing list