[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[303] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-11-07 17:24:27
|
Revision: 303 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=303&view=rev Author: nickols_k Date: 2012-11-07 17:24:16 +0000 (Wed, 07 Nov 2012) Log Message: ----------- preview of next step in XP-CORE development Modified Paths: -------------- mplayerxp/postproc/af_center.c mplayerxp/xmpcore/Makefile Added Paths: ----------- mplayerxp/xmpcore/mp_aframe.c mplayerxp/xmpcore/mp_aframe.h Modified: mplayerxp/postproc/af_center.c =================================================================== --- mplayerxp/postproc/af_center.c 2012-11-07 16:44:37 UTC (rev 302) +++ mplayerxp/postproc/af_center.c 2012-11-07 17:24:16 UTC (rev 303) @@ -27,7 +27,7 @@ // Initialization and runtime control static ControlCodes control(struct af_instance_s* af, int cmd, any_t* arg) { - af_center_t* s = af->setup; + af_center_t* s = af->setup; switch(cmd){ case AF_CONTROL_REINIT:{ Modified: mplayerxp/xmpcore/Makefile =================================================================== --- mplayerxp/xmpcore/Makefile 2012-11-07 16:44:37 UTC (rev 302) +++ mplayerxp/xmpcore/Makefile 2012-11-07 17:24:16 UTC (rev 303) @@ -3,7 +3,7 @@ LIBNAME = libxmpcore.a SRCS=xmp_core.c xmp_aplayer.c xmp_vplayer.c xmp_vdecoder.c xmp_adecoder.c -SRCS+=mp_image.c sig_hand.c +SRCS+=mp_aframe.c mp_image.c sig_hand.c OBJS=$(SRCS:.c=.o) CFLAGS = $(OPTFLAGS) -I. -I.. -Wall Added: mplayerxp/xmpcore/mp_aframe.c =================================================================== --- mplayerxp/xmpcore/mp_aframe.c (rev 0) +++ mplayerxp/xmpcore/mp_aframe.c 2012-11-07 17:24:16 UTC (rev 303) @@ -0,0 +1,19 @@ +#include "mp_aframe.h" +#include "osdep/mplib.h" + +mp_aframe_t* new_mp_aframe(unsigned rate,unsigned nch,unsigned format,unsigned xp_idx) { + mp_aframe_t* mpaf = mp_mallocz(sizeof(mp_aframe_t)); + if(!mpaf) return NULL; + mpaf->rate = rate; + mpaf->nch = nch; + mpaf->format = format; + mpaf->xp_idx = xp_idx; + return mpaf; +} + +int free_mp_aframe(mp_aframe_t* mpaf) { + if(!mpaf) return 0; + if(mpaf->audio) mp_free(mpaf->audio); + mp_free(mpaf); + return 1; +} Property changes on: mplayerxp/xmpcore/mp_aframe.c ___________________________________________________________________ Added: svn:eol-style + native Added: mplayerxp/xmpcore/mp_aframe.h =================================================================== --- mplayerxp/xmpcore/mp_aframe.h (rev 0) +++ mplayerxp/xmpcore/mp_aframe.h 2012-11-07 17:24:16 UTC (rev 303) @@ -0,0 +1,54 @@ +#ifndef __MP_AUDIO_FRAME_INCLUDED_H +#define __MP_AUDIO_FRAME_INCLUDED_H 1 + +#include "mp_config.h" + +/* The sample format system is based on bitmasks. The + format definition only refers to the storage format not the + resolution. */ +typedef enum mpaf_format_enum{ + MPAF_BPS_MASK =0x00000FFFUL, /* byte per sample */ +// Endianess + MPAF_BE =0x00000000UL, // Big Endian + MPAF_LE =0x00001000UL, // Little Endian + MPAF_END_MASK =0x00001000UL, +#if WORDS_BIGENDIAN // Native endian of cpu + MPAF_NE =MPAF_BE, +#else + MPAF_NE =MPAF_LE, +#endif +// Signed/unsigned + MPAF_SI =0x00000000UL, // SIgned + MPAF_US =0x00002000UL, // Un Signed + MPAF_SIGN_MASK =0x00002000UL, +// Fixed or floating point + MPAF_I =0x00000000UL, // Integer + MPAF_F =0x00004000UL, // Foating point + MPAF_POINT_MASK =0x00004000UL, +// Special flags refering to non pcm data + MPAF_PCM =0x00010000UL, // + MPAF_A_LAW =0x00060000UL, // + MPAF_MU_LAW =0x00070000UL, // + MPAF_IMA_ADPCM =0x00110000UL, // Same as 16 bit signed int + MPAF_MPEG2 =0x00500000UL, // MPEG1 layer2 audio + MPAF_MPEG3 =0x00550000UL, // MPEG1 layer3 audio + MPAF_AC3 =0x20000000UL, // Dolby Digital AC3 + MPAF_SPECIAL_MASK =0xFFFF0000UL +}mpaf_format_e; + +typedef struct mp_audio_frame_s { + unsigned flags; /* currently unused */ + float pts; /* PTS if this frame */ + unsigned xp_idx;/* index in ring buffer */ + any_t* audio; /* data of audio frame */ + unsigned len; /* length of data */ + /*------ stream description ----------*/ + unsigned rate; /* rate of audio */ + unsigned nch; /* number of channels */ + mpaf_format_e format;/* PCM format of audio */ +}mp_aframe_t; + +extern mp_aframe_t* new_mp_aframe(unsigned rate,unsigned nch,mpaf_format_e format,unsigned xp_idx); +extern int free_mp_aframe(mp_aframe_t* mpaf); + +#endif Property changes on: mplayerxp/xmpcore/mp_aframe.h ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |