[FFmpeg-soc] [soc] libavsequencer [PATCH 01/08] Music module public API header file.

Sebastian Vater cdgs.basty at googlemail.com
Tue Jul 13 23:55:13 CEST 2010


Vitor Sessak a écrit :
> On 07/13/2010 10:11 PM, Sebastian Vater wrote:
>> Vitor Sessak a écrit :
>>> On 07/07/2010 10:46 PM, Sebastian Vater wrote:
>
> [...]
>
>>>> /**
>>>>   * Opens and registers module to the AVSequencer.
>>>>   *
>>>>   * @param avctx the AVSequencerContext to store the opened module
>>>> into
>>>>   * @param module the AVSequencerModule which has been opened to be
>>>> registered
>>>>   * @return>= 0 on success, a negative error code otherwise
>>>>   *
>>>>   * @note This is part of the new sequencer API which is still under
>>>> construction.
>>>>   *       Thus do not use this yet. It may change at any time, do not
>>>> expect
>>>>   *       ABI compatibility yet!
>>>>   */
>>>> int avseq_module_open(AVSequencerContext *avctx, AVSequencerModule
>>>> *module);
>>>
>>> Hmm, I think I don't really understand what this function do. Suppose
>>> you want to write a very short test program to play a MOD file using
>>> the libraries. Roughly, what functions it will call, in which order
>>> and with which parameters?
>>
>> To be honest, I added this prototype only for now to see if the way I
>> want to add them is compatible with FFmpeg style guide. Wanted just to
>> avoid adding functions and all follow a wrong guideline. But the suppose
>> is to load a module from disc and register it to the module list in
>> avctx).
>
> Guideline-wise it is fine, but I don't think functions should be added
> to the BSS structs without a very good reason.

That's clear! Just want to mention the point, that the user today
expects the feature of having multiple (in this case modules) files
opened at once and thus editing them. We're not anymore in the eighties
were it was common just to have one file opened at the same time.

So I thought of a way of allowing the user exactly that, that's why I
plan to add multiple modules to AVSequencerContext. The programmer
developing the GUI has to take care of this list though mostly by itself.

To draw all this as a tree, I would do it the following way (AVSequencer
is abbreviated simply lavs):
lavsContext:
    1.  list of lavsModule ->
         1.1. list of lavsSongs (sub-songs)
    2. list of lavsInstruments (all instruments shared between sub-songs).
    3. Same for envelopes, etc.

lavsSongs of course descendends to order list and track data.
lavsInstruments descend to samples, which descend to synths each.

Maybe I should actually draw the dependency pattern with GIMP or sth.
else? Like you did in the private mail?

>
>> The loading, of course, is not necessary in FFmpeg, as it will be done
>> by the demuxer itself, but the register process. Also this function can
>> be called from the user if he loads a module.
>
> If the user wants to load a module, he should call lavf/ api, no?

Yes, that what I'm meaning, using the demuxer (which is in lavf/*
right?) ;-)

For tonight, I hope that's enough, I'm falling just to bed...hope didn't
write any bullshit because if being tired. :-/

-- 

Best regards,
                   :-) Basty/CDGS (-:



More information about the FFmpeg-soc mailing list