Michael Niedermayer a écrit :
> i guess alot of these #defines could be enums and then the correct types
> could be used instead of int*_t
>
> [...]
>   

Hi Michael! I will change them the next days, this will incorporate a
lot of changes to player.c also. Anyway, I have updated track.h, so new
patch attached anyway.

-- 

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

diff --git a/libavsequencer/track.h b/libavsequencer/track.h
index 021224e..c1370ed 100755
--- a/libavsequencer/track.h
+++ b/libavsequencer/track.h
@@ -22,8 +22,8 @@
 #ifndef AVSEQUENCER_TRACK_H
 #define AVSEQUENCER_TRACK_H
 
+#include "libavformat/avformat.h"
 #include "libavsequencer/avsequencer.h"
-#include "libavutil/tree.h"
 
 /**
  * Song track data structure, This structure is actually for one row
@@ -34,6 +34,10 @@
  * version bump.
  */
 typedef struct AVSequencerTrackData {
+    /** Array of pointers containing all effects used by this
+       track.  */
+    AVSequencerTrack **effects_data;
+
     /** Which octave the note is played upon, if note is a
        positive value (defaults to 4).  */
     uint8_t octave;
@@ -110,9 +114,8 @@ typedef struct AVSequencerTrackData {
     /** C-4 = default tone  */
 #define AVSEQ_TRACK_DATA_TONE               ((FF_AVSEQ_TRACK_DATA_OCTAVE << 8) | FF_AVSEQ_TRACK_DATA_NOTE)
 
-    /** Integer indexed tree root of effects used by this track
-       with AVTreeNode->elem being a AVSequencerTrackEffect.  */
-    AVTreeNode *effects_data;
+    /** Number of effects used by this track.  */
+    uint16_t effects;
 } AVSequencerTrackData;
 
 /**
@@ -125,7 +128,7 @@ typedef struct AVSequencerTrack {
     /** Metadata information: Original track file name, track
        title, track message, track artist, track album,
        track begin and finish date of composition and comment.  */
-    AVSequencerMetadata *metadata;
+    AVMetadata *metadata;
 
     /** AVSequencerTrackData pointer to array of track data.  */
     AVSequencerTrackData *data;
@@ -170,7 +173,7 @@ typedef struct AVSequencerTrack {
        each sub-song which needs this, this will define new
        flags which tag the player to handle it to that special
        way.  */
-    int8_t compat_flags;
+    uint8_t compat_flags;
 #define AVSEQ_TRACK_COMPAT_FLAG_SAMPLE_OFFSET       0x01 ///< Sample offset beyond end of sample will be ignored (IT compatibility)
 #define AVSEQ_TRACK_COMPAT_FLAG_TONE_PORTA          0x02 ///< Share tone portamento memory with portamentoes and unlock tone portamento samples and adjusts frequency to: new_freq = freq * new_rate / old_rate. If an instrument number is given the envelope will be retriggered (IT compatibility).
 #define AVSEQ_TRACK_COMPAT_FLAG_SLIDES              0x04 ///< Portamentos of same type share the same memory (e.g. porta up/fine porta up)
@@ -183,7 +186,7 @@ typedef struct AVSequencerTrack {
        surround panning or allow initial reverse playback,
        different timing methods which have all to be taken
        care specially in the internal playback engine.  */
-    int8_t flags;
+    uint8_t flags;
 #define AVSEQ_TRACK_FLAG_USE_TIMING             0x01 ///< Use track timing fields
 #define AVSEQ_TRACK_FLAG_SPD_TIMING             0x02 ///< SPD speed timing instead of BpM
 #define AVSEQ_TRACK_FLAG_PANNING                0x04 ///< Use track panning and sub-panning fields
@@ -218,20 +221,16 @@ typedef struct AVSequencerTrack {
     uint16_t bpm_speed;
 #define AVSEQ_SONG_BPM_SPEED   125
 
-    /** 64-bit integer indexed unique key tree root of unknown data
-       fields for input file reading with AVTreeNode->elem being
-       unsigned 8-bit integer data. Some formats are chunk based
+    /** 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 tracks in
-       chunks, which won't get lost then. The first 8 bytes of this
-       data is an unsigned 64-bit integer length in bytes of
-       the unknown data.  */
-    AVTreeNode *unknown_data;
-
-    /** This is just a data field where the user solely
-       decides, what the usage (if any) will be.  */
-    uint8_t *user_data;
+       other, in case of a transition the unknown data is kept as is.
+       Some programs write editor settings for tracks in those chunks,
+       which then won't get lost in that case.  */
+    uint8_t **unknown_data;
 } AVSequencerTrack;
 
 /**
@@ -1280,6 +1279,7 @@ typedef struct AVSequencerTrackEffect {
        0x0E | Select global pannolo envelope.
        0x0F | Select arpeggio envelope, an yy of 0x01, 0x11, 0x02 or
               0x12 will not have an effect for this kind of envelope.
+       0x10 | Select resonance filter envelope.
 
        yy selects the envelope type of which to change the value as
        declared by the following table:
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to