[FFmpeg-soc] [soc] libavsequencer [PATCH] Initial implementation of main AVSequencer public API header file

Michael Niedermayer michaelni at gmx.at
Sun Jul 11 13:45:51 CEST 2010


On Sat, Jul 10, 2010 at 06:36:39PM +0200, Sebastian Vater wrote:
> 
> -- 
> 
> Best regards,
>                    :-) Basty/CDGS (-:
> 
> 

>  avsequencer.h |  321 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 321 insertions(+)
> 35215816e65fe3c672d2abb5f39d4c7189e5d26f  avsequencer.h.patch
> diff --git a/libavsequencer/avsequencer.h b/libavsequencer/avsequencer.h
> new file mode 100644
> index 0000000..fcff374
> --- /dev/null
> +++ b/libavsequencer/avsequencer.h
> @@ -0,0 +1,321 @@
> +/*
> + * AVSequencer main header file which connects to AVFormat and AVCodec
> + * Copyright (c) 2010 Sebastian Vater <cdgs.basty at googlemail.com>
> + *
> + * 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_AVSEQUENCER_H
> +#define AVSEQUENCER_AVSEQUENCER_H
> +
> +#define LIBAVSEQUENCER_VERSION_MAJOR 0
> +#define LIBAVSEQUENCER_VERSION_MINOR 0
> +#define LIBAVSEQUENCER_VERSION_MICRO 0
> +
> +#define LIBAVSEQUENCER_VERSION_INT AV_VERSION_INT(LIBAVSEQUENCER_VERSION_MAJOR, \
> +                                                  LIBAVSEQUENCER_VERSION_MINOR, \
> +                                                  LIBAVSEQUENCER_VERSION_MICRO)
> +#define LIBAVSEQUENCER_VERSION     AV_VERSION(LIBAVSEQUENCER_VERSION_MAJOR,   \
> +                                              LIBAVSEQUENCER_VERSION_MINOR,   \
> +                                              LIBAVSEQUENCER_VERSION_MICRO)
> +#define LIBAVSEQUENCER_BUILD       LIBAVSEQUENCER_VERSION_INT
> +
> +#define LIBAVSEQUENCER_IDENT       "Lavsequencer" AV_STRINGIFY(LIBAVSEQUENCER_VERSION)
> +
> +/**
> + * Returns LIBAVSEQUENCER_VERSION_INT constant.
> + */
> +unsigned avsequencer_version(void);
> +
> +/**
> + * Returns the libavsequencer build-time configuration.
> + */
> +const char *avsequencer_configuration(void);
> +
> +/**
> + * Returns the libavsequencer license.
> + */
> +const char *avsequencer_license(void);
> +
> +#include "libavformat/avformat.h"
> +#include "libavcodec/avcodec.h"
> +#include "libavsequencer/module.h"
> +#include "libavsequencer/song.h"
> +#include "libavsequencer/player.h"
> +#include "libavutil/tree.h"
> +
> +/**
> + * Mixer context structure which is used to describe certain features
> + * of registered mixers to the sequencer context.
> + * 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 AVSequencerMixerContext {

There will be more than 1 mixer ?


[...]
> +/**
> + * Sequencer context structure which is the very root of the
> + * sequencer. It manages all modules currently in memory, controls
> + * the playback stuff and declares some customizable lookup tables
> + * for very strange sound formats. Also all registered mixing engines
> + * are stored in this 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 AVSequencerContext {
> +    /** Associated decoder packet for this sequencer context.  */
> +    AVPacket *pkt;
> +
> +    /** Current module used by current playback handler or NULL if
> +       no module is currently being processed.  */
> +    AVSequencerModule *player_module;
> +
> +    /** Current sub-song used by current playback handler or NULL
> +       if no sub-song is currently being processed.  */
> +    AVSequencerSong *player_song;
> +
> +    /** Current mixing engine used by current playback handler
> +       or NULL if there is no module and sub-song being processed.  */
> +    AVSequencerMixerData *player_mixer_data;
> +

> +    /** Pointer to sine table for very fast sine calculation. Value
> +       is sin(x)*32767 with one element being one degree.  */
> +    int16_t *sine_lut;

a static or global tables seems cleaner besides we alraedy have sin/cos
tables tough they might not be of correct size or type


> +
> +    /** Pointer to linear frequency table for non-Amiga slide modes.
> +       Value is 65536*2^(x/3072).  */
> +    uint16_t *linear_frequency_lut;
> +
> +    /** Pointer to note calculation frequency table. Value is
> +       65536*2^(x/12). Please note that the pointer actually points to
> +       the 2nd element. So the base C-4 is [0], -1. B-3 is [-1].  */
> +    uint32_t *frequency_lut;

is this supposed to be public api?
it appears quite internal to me ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20100711/f5196c31/attachment.pgp>


More information about the FFmpeg-soc mailing list