[Libburn] Real-time data stream

Omar kodmw-libburn at yahoo.com.cn
Wed Aug 15 22:10:32 PDT 2012


Thanks, Thomas.

>this mailing list is about libburn-0.2 which cannot burn to DVD media.
>Mario Danic and me forked libburn 6 years ago.
>  http://libburnia-project.org/
>Meanwhile it can operate all commercially available CD, DVD, and
>Blu-ray media.

I worked with libburn.so.4.71.0 on ubuntu 12.04. Which mailing list could I find helps from developers on?

>> I wanna ask a basic question.
>> If I can write real-time data stream to dvd with libburn.
>> I've known that writing file to dvd is ok, but I don't know which
>> apis could surpport real-time data.
>
>There are media types and states which need to know the number of
>bytes in advance, before a burn program can write data to them.
>One of them is DVD-R DL. Another is DVD-RW after being blanked fast.
>
>The other types can record a data stream of unpredicted length.
>
>If you use the libburn API, then choose BURN_WRITE_TAO in order
>to avoid the need for a predictable track size.
>(For an example of libburn API usage, see source of program libburner
>on http://api.libburnia-project.org/libburn/)


I have tried the test program libburner and gotten the following results.
I compiled the test program to the executable file named "test".
When running 
./test --drive 0 --multi ./teststream
(hint: teststream is file name.),
It shows

Initializing libburnia-project.org ...
Done
Beginning to scan for devices ...
Done

Overview of accessible drives (1 found) :
-----------------------------------------------------------------------------
0  --drive '/dev/sr0'  :  'TSSTcorp'  'CDDVDW TS-L633A'
-----------------------------------------------------------------------------

Detected media type: DVD+RW
Track 1 : source is './teststream'
libburner : SORRY : Drive offers no suitable write mode with this job
FATAL: Failed to find a suitable write mode with this media.
Reasons given:
SAO: multi session capability lacking, TAO: multi session capability lacking, 

According to the messages I directly set the write mode to TAO. The changing in the 

functionlibburner_payload is from

    if (burn_write_opts_auto_write_type(burn_options, target_disc,
                    reasons, 0) == BURN_WRITE_NONE) {
        fprintf(stderr, "FATAL: Failed to find a suitable write mode with this media.\n");
        fprintf(stderr, "Reasons given:\n%s\n", reasons);
        return 0;
    }
to

if (burn_write_opts_set_write_type (burn_options,
BURN_WRITE_TAO,
BURN_BLOCK_MODE1) == 0)
{
        fprintf(stderr, "FATAL: Failed to find a suitable write mode with this media.\n");
        return 0;
}

and then run ./test --drive 0 --multi ./teststream again, but it still appears
... ...
Detected media type: DVD+RW
Track 1 : source is './teststream'
Burning starts. With e.g. 4x media expect up to a minute of zero progress.
libburner : SORRY : Write job parameters are unsuitable:
TAO: multi session capability lacking, 

How am I going on? Any suggestions?
Thanks.


>You may also use my command-line program cdrskin for this task,
>by piping the output of an arbitrary program into its stdin:
>
>  my_stream_producing_program | \
>  cdrskin -v dev=/dev/sr0 -tao -eject -
>
>(The final dash "-" tells cdrskin to read from stdin.)
>(If you write to CD media, then add option padsize=300k, to avoid
>the CD read-ahead-bug of Linux. This will give the stream a fuzzy
>end. So when reading, you should truncate it to the number of
>valid bytes. This number has to be memorized separately.)
>
>Of course the stream must end before the capacity of the medium
>is exhausted.
>
>After successful burn, you should be able to read the stream from
>medium by normal POSIX means (open(2), read(2)).
>Or with shell means:
>  dd if=/dev/sr0 | my_stream_consumer_program
>
>It might be necessary to eject and reload the medium after the
>burn run and before reading. Thus option -eject with cdrskin.


Thank you. I prefer completing with lib to command line.
>
>Have a nice day :)
>
>Thomas
>
Omar
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libburn/attachments/20120816/7453411f/attachment-0001.html>


More information about the libburn mailing list