Vitor Sessak a écrit :
> On 07/15/2010 12:18 AM, Sebastian Vater wrote:
>>
>> So here is it, I merged them all into one to avoid flooding the ML.
>> They're getting small enough now, to merge them all into one, I think!
>
> This is not a patch against latest SVN, this is a patch against your
> SoC tree and thus unreadable (your patch should contain all the lines
> of libavsequencer/* since none of this files exists now in main svn).

Fixed.

>
>> diff --git a/libavsequencer/track.h b/libavsequencer/track.h
>> index c1370ed..33095d9 100755
>> --- a/libavsequencer/track.h
>> +++ b/libavsequencer/track.h
>> @@ -34,12 +34,18 @@
>>   * version bump.
>>   */
>
> [...]
>
>>      /** 0x20 - Set volume:
>
> Again, is saying "0x20" in the comment relevant? If this value for the
> set volume command is format-dependent (i.e., it is only 0x20 in MOD
> but 0x55 in XM), this is misleading.

The demuxer/decoder will convert this to effect number 0x20 anyway, in
MOD the set volume command is C (internally = 0x02). The goal is to have
a unique command set independent from the origin file.

>
>>         Data word consists of two 8-bit pairs named xx and yy
>>         where xx is the volume level (ranging either from
>> @@ -756,7 +729,8 @@ typedef struct AVSequencerTrackEffect {
>>         means that the tremolo envelope values will be inverted.  */
>>  #define AVSEQ_TRACK_EFFECT_CMD_T_TREMO_ONCE  0x2F
>
> Wasn't you going to change these (and many other) to a enum? I
> remember you said you would change it soon, but being afraid of
> breaking other files that uses this header, but what code exactly does
> replacing

Yes, will do this tonight.

>
> #define AVSEQ_TRACK_EFFECT_CMD_T_TREMO_ONCE  0x2F
> #define AVSEQ_TRACK_EFFECT_CMD_STOP_FX       0x1D
>
>
> by
>
> enum Whatever {
>     AVSEQ_TRACK_EFFECT_CMD_T_TREMO_ONCE = 0x2F,
>     AVSEQ_TRACK_EFFECT_CMD_STOP_FX      = 0x1D,
> }
>
> breaks?
>

I access them like:
if (flags & AVSEQ_TRACK_EFFECT_CMD_STOP_FX) { .. }

Won't have change that to:
if (flags & Whatever.AVSEQ_TRACK_EFFECT_CMD_STOP_FX) { .. }

then?

-- 

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

diff --git a/libavsequencer/module.h b/libavsequencer/module.h
new file mode 100755
index 0000000..ff1be73
--- /dev/null
+++ b/libavsequencer/module.h
@@ -0,0 +1,116 @@
+/*
+ * AVSequencer music module management
+ * Copyright (c) 2010 Sebastian Vater <[email protected]>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVSEQUENCER_MODULE_H
+#define AVSEQUENCER_MODULE_H
+
+#include "libavformat/avformat.h"
+#include "libavsequencer/avsequencer.h"
+#include "libavsequencer/instr.h"
+#include "libavsequencer/player.h"
+
+/**
+ * Sequencer module structure.
+ * New fields can be added to the end with minor version bumps.
+ * Removal, reordering and changes to existing fields require a major
+ * version bump.
+ */
+typedef struct AVSequencerModule {
+    /** Metadata information: Original module file name, module name,
+     *  module message, artist, genre, album, begin and finish date of
+     * composition and comment.  */
+    AVMetadata *metadata;
+
+    /** Array (of size songs) of pointers containing every sub-song
+       for this module.  */
+    AVSequencerSong **song_list;
+
+    /** Number of sub-songs attached to this module.  */
+    uint16_t songs;
+
+    /** Array (of size instruments) of pointers containing every
+       instrument for this module.  */
+    AVSequencerInstrument **instrument_list;
+
+    /** Number of instruments attached to this module.  */
+    uint16_t instruments;
+
+    /** Array (of size envelopes) of pointers containing every
+       evelope for this module.  */
+    AVSequencerEnvelope **envelope_list;
+
+    /** Number of envelopes attached to this module.  */
+    uint16_t envelopes;
+
+    /** Array (of size keyboards) of pointers containing every
+       keyboard definitionb list for this module.  */
+    AVSequencerKeyboard **keyboard_list;
+
+    /** Number of keyboard definitions attached to this module.  */
+    uint16_t keyboards;
+
+    /** Array (of size arpeggios) of pointers containing every
+       arpeggio envelope definition list for this module.  */
+    AVSequencerArpeggio **arpeggio_list;
+
+    /** Number of arpeggio definitions attached to this module.  */
+    uint16_t arpeggios;
+
+    /** Forced duration of the module, in AV_TIME_BASE fractional
+       seconds. This is the total sum of all sub-song durations
+       this module contains or zero if the duration is unknown and
+       also cannot be automatically determined. The composer then can
+       set manually a duration after which the player can skip over to
+       the next module if it is playing back in once mode.  */
+    uint64_t forced_duration;
+
+    /** Maximum number of virtual channels, including NNA (New Note
+       Action) background channels to be allocated and processed by
+       the mixing engine (defaults to 64).  */
+    uint16_t channels;
+#define AVSEQ_MODULE_CHANNELS   64
+
+    /** Array of pointers containing every unknown data field where
+       the last element is indicated by a NULL pointer reference. The
+       first 64-bit of the unknown data contains an unique identifier
+       for this chunk and the second 64-bit data is actual unsigned
+       length of the following raw data. Some formats are chunk based
+       and can store information, which can't be handled by some
+       other, in case of a transition the unknown data is kept as is.
+       Some programs write editor settings for module in those chunks,
+       which then won't get lost in that case.  */
+    uint8_t **unknown_data;
+} AVSequencerModule;
+
+/**
+ * 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);
+
+#endif /* AVSEQUENCER_MODULE_H */
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to