From fe5ae89555ead1863420c1a9c389553e75e4527c Mon Sep 17 00:00:00 2001 From: "N.N." Date: Tue, 30 Mar 2004 02:59:55 +0000 Subject: New in PiDiP 0.12.13 svn path=/trunk/externals/pidip/; revision=1509 --- include/pdp_mp4player~.h | 118 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 include/pdp_mp4player~.h (limited to 'include/pdp_mp4player~.h') diff --git a/include/pdp_mp4player~.h b/include/pdp_mp4player~.h new file mode 100644 index 0000000..05e6d14 --- /dev/null +++ b/include/pdp_mp4player~.h @@ -0,0 +1,118 @@ + +#ifndef __PDP_MP4PLAYER__ +#define __PDP_MP4PLAYER__ + +struct pdp_mp4player_struct; +typedef struct pdp_mp4player_struct t_pdp_mp4player; + +#include "pdp.h" +#include "yuv.h" +#include +#include +#include +#include +#include +#include +#include +#include "pdp_mp4playersession.h" +#include "pdp_mp4playermedia.h" +#include "pdp_mp4videosync.h" +#include "pdp_mp4audiosync.h" +#include "media_utils.h" +#include "codec_plugin_private.h" +#include "our_config_file.h" +#include "player_util.h" +#include +#include + + +/* mpeg4ip includes taken from the source tree ( not exported ) */ +#include +#undef DECLARE_CONFIG_VARIABLES +#include "config_set.h" + +#undef CONFIG_BOOL +#define CONFIG_BOOL(var, name, defval) \ + { &(var), (name), CONFIG_TYPE_BOOL, (defval), (defval) } +#undef CONFIG_FLOAT +#define CONFIG_FLOAT(var, name, defval) \ + { &(var), (name), CONFIG_TYPE_FLOAT,(float) (defval), (float) (defval) } +#undef CONFIG_INT +#define CONFIG_INT(var, name, defval) \ + { &(var), (name), CONFIG_TYPE_INTEGER,(config_integer_t) (defval), (config_integer_t)(defval) } +#undef CONFIG_STRING +#define CONFIG_STRING(var, name, defval) \ + { &(var), (name), CONFIG_TYPE_STRING, (defval), (defval) } + +#include "pdp_mp4config.h" + +#undef DECLARE_CONFIG_VARIABLES +#ifndef debug_message +#define debug_message post +#endif +#include "rtp_transmitter.h" +#include "pdp_mp4videosource.h" +#include "pdp_mp4audiosource.h" + +#define DEFAULT_CHANNELS 1 +#define MIN_PRIORITY -20 +#define DEFAULT_PRIORITY 0 +#define MAX_PRIORITY 20 + +#define VIDEO_BUFFER_SIZE (1024*1024) +#define MAX_AUDIO_PACKET_SIZE (128 * 1024) +#define MIN_AUDIO_SIZE (64 * 1024) +#define AUDIO_PACKET_SIZE (2*1152) + +typedef struct pdp_mp4player_struct +{ + t_object x_obj; + t_float x_f; + + t_int x_packet0; + t_int x_dropped; + + t_pdp *x_header; + short int *x_data; + t_int x_vwidth; + t_int x_vheight; + t_int x_vsize; + + t_outlet *x_pdp_out; // output decoded pdp packets + t_outlet *x_outlet_left; // left audio output + t_outlet *x_outlet_right; // right audio output + t_outlet *x_outlet_streaming; // indicates the action of streaming + t_outlet *x_outlet_nbframes; // number of frames emitted + t_outlet *x_outlet_framerate; // real framerate + + char *x_url; + t_int x_rtpovertcp; // flag to bypass certain firewalls (tcp mode) + t_int x_streaming; // streaming flag + t_int x_nbframes; // number of frames emitted + t_int x_framerate; // framerate + t_int x_samplerate; // audio sample rate + t_int x_audiochannels; // audio channels + t_int x_audioon; // enough audio data to start playing + struct timeval x_starttime; // streaming starting time + t_int x_cursec; // current second + t_int x_secondcount; // number of frames received in the current second + pthread_t x_decodechild;// stream decoding thread + t_int x_priority; // priority of decoding thread + t_int x_newpicture; // flag indicating a new picture + + /* audio structures */ + t_int x_audio; // flag to activate the decoding of audio + short x_audio_buf[4*MAX_AUDIO_PACKET_SIZE]; /* buffer for audio from stream*/ + short x_audio_in[4*MAX_AUDIO_PACKET_SIZE]; /* buffer for resampled PCM audio */ + t_int x_audioin_position; // writing position for incoming audio + + /* mpeg4hippies structures */ + CPlayerSession *x_psession; + CMsgQueue x_queue; + SDL_sem *x_psem; + t_int x_decodingstate; // internal decoding state + +} t_pdp_mp4player; + +#endif + -- cgit v1.2.1