[Live-devel] Question about DeviceSource implementation....
Ross Finlayson
finlayson at live.com
Tue Feb 24 09:44:37 PST 2004
>I try to stream MPEG2 PS over the network polling from
>a 656/I2S Capture card (this card will capture the dvd player signal and
>encode it in MPEG2 format) directly.
>
>Now i am making a DeviceSource implementation by modifying
>ByteStreamFileSource and change the fread from doGetNextFrame() to
>Mydevice->Read that implements the read from capture card
Is your capture card accessible (i.e., readable) as a file? If so, you
could probably use "ByteStreamFileSource" as is.
(This, BTW, is one of the many reasons why Unix is far superior to Windows
for running systems software. In Unix, devices (such as capture cards) are
part of the file system, and can be read as if they were files. Other
people running Unix have streamed from a video capture card using the
existing "testMPEG1or2AudioVideoStreamer" application, but just changing
the input file name "test.mpg" to "stdin".)
> and than hook
>mydevice implementation into filesink to record my input data into a file
>but i meet some problems. First, the record file seems too bigger and always
>play the same frames (1~3) recursively. it seems that that the donextframe
>always send the same data...
As far as I can tell, it's your own *receive* function that's reading the
same data over and over again. I.e., the problem doesn't appear to have
anything to do with the LIVE.COM code. You can verify this by writing the
data into a file, immediately after the call to "fManager->receive".
RYHCSC ("Remember, You Have Complete Source Code").
More information about the live-devel
mailing list