MPEG/MP3 and url

John M McIntosh johnmci at smalltalkconsulting.com
Sun Oct 22 17:02:45 UTC 2000


>John M McIntosh wrote:
>
>>  Ok all the file IO I think is located in mpeg3io.c  see
>>  mpeg3io_read_data for the fread. Basically you do fseeks and freads
>>  to get data based on the MPEG model and how you are uncoding the
>>  data. This would be replaced by an interface to a positional stream.
>>  Of course the trick here is how would you do that?
>
>Reading a little from the documentation:
>
>>>Everything you do with
>>>libmpeg3 requires passing the file pointer.
>
>So the C source would need some alterations to read from a stream instead.

If you create a socket in Squeak and want to read from it from the 
MPEG player how would you do that? I guess you could code a cross 
plugin call and call the socket support plugin directly, however if 
the socket stalls, then here you are in a primitive wanting for data 
to arrive, this would appear to lock Squeak up. Other choices like 
having a ring buffer you fill in Squeak via reading from a Socket 
then feed to the mpeg plugin exist, just a few hours/days of 
programming.

>
>How is this handled in other mpeg decoders ?
>This one seams to do it
>http://www.lokigames.com/development/smpeg.php3
>It uses the Berkley algoritms for Video I think Tim Rowledge refered to
>as the one they used on the itzy.(?)
>It's under LGPL.
>Karl

SMPEG is a free MPEG1 video player library with sound support. The 
libmpeg3 is MPEG2, which is why I didn't use the SMPEG stuff. However 
SMPEG does have code for streaming which could be used to build the 
logic.

PS the 'other' mpeg stuff I have decodes most/all MPEG2 stream, even 
ones that libmpeg3 does not.
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================





More information about the Squeak-dev mailing list