Main Page   Modules   Compound List   File List   Compound Members   File Members  

xlv_core.h

Go to the documentation of this file.
00001 /*
00002  * xlv_core.h
00003  *
00004  * Copyright (C) 2001 Guilhem Lavaux
00005  *
00006  * This file is part of XLV, a free middleware audio-video stream coder/decoder.
00007  *
00008  * This library is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Library General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2 of the License, or (at your option) any later version.
00012  *
00013  * XLV is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 /* 
00023  * CVS ID: $Id: xlv_core.h,v 1.16 2002/06/08 17:30:56 glavaux Exp $ 
00024  */
00025 
00029 #ifndef _XLV_GCORE_H
00030 #define _XLV_GCORE_H
00031 
00032 #include "xlv_plugin_mgr.h"
00033 #include "xlv_session.h"
00034 #include "xlv_handler.h"
00035 #include "xlv_video.h"
00036 #include "xlv_audio.h"
00037 #include "xlv_timer.h"
00038 #include "xlv_codec.h"
00039 #include "xlv_demux.h"
00040 #include <pthread.h>
00041 
00042 #define XLV_PLAY_INIT    0
00043 #define XLV_PLAY_STOPPED 1
00044 #define XLV_PLAY_PLAYING 2
00045 #define XLV_PLAY_PAUSED  3
00046 #define XLV_PLAY_SEEKING 4
00047 #define XLV_PLAY_FINISHED 5
00048 
00055 typedef struct _XLV_PlayState XLV_PlayState;
00056 
00057 #ifdef XLV_INTERNAL
00058 struct _XLV_PlayState {
00059     guint m_state;
00060     gboolean m_paused;
00061     XLV_Stream *m_input_stream;
00062     XLV_Stream *m_system;
00063 
00064     XLV_Stream *m_video_stream;
00065     XLV_Stream *m_audio_stream;
00066 
00067     XLV_OutputHandler *m_video_handler;
00068     XLV_OutputHandler *m_audio_handler;
00069 
00070     XLV_Stream *m_video_output;
00071     XLV_Stream *m_audio_output;
00072 
00073     XLV_Stream *m_video_codec;
00074     XLV_Stream *m_audio_codec;
00075     XLV_Stream *m_original_video_codec;
00076 
00077     XLV_Session *m_session;
00078 
00079     gboolean m_auto_release;
00080 
00081     XLV_Timer *m_ref_timer;
00082 
00083     pthread_t m_play_thread;
00084 
00085     gboolean m_alive;
00086     gboolean m_to_stop;
00087     gboolean m_no_vid_queue;
00088 
00089     gfloat m_video_rate;
00090     gfloat m_audio_rate;
00091 
00092     guint32 m_audio_wrn;
00093     guint32 m_vid_frames;
00094     guint32 m_base_time;
00095     XLV_Timer *m_clock;
00096 
00097     guint8 m_video_mark;
00098     guint8 m_audio_mark;
00099 
00100     guint16 m_aq_len, m_vq_len;
00101     guint8 m_audio_fill_jauge;
00102     gboolean m_wait_for_aq;
00103     gboolean m_wait_for_vq;
00104 };
00105 #endif
00106 
00107 #ifdef __cplusplus
00108 extern "C" {
00109 #endif
00110 
00116     XLV_PlayState *xlv_open_url_play (XLV_Session * session,
00117                                       const gchar * name);
00118 
00124     XLV_PlayState *xlv_open_play (XLV_Session * session, const gchar * name);
00125 
00131     XLV_PlayState *xlv_open_play_stream (XLV_Session * session,
00132                                          XLV_Stream * stream);
00136     void xlv_close_play (XLV_PlayState * state);
00137 
00142     void xlv_set_video_stream (XLV_PlayState * state, guint stream_no);
00143 
00148     void xlv_set_audio_stream (XLV_PlayState * state, guint stream_no);
00149 
00154     void xlv_setup_video_codec (XLV_PlayState * state);
00159     void xlv_setup_audio_codec (XLV_PlayState * state);
00160 
00173     void xlv_setup_video_output (XLV_PlayState * state,
00174                                  XLV_Stream * video_output);
00175 
00188     void xlv_setup_audio_output (XLV_PlayState * state,
00189                                  XLV_Stream * audio_output);
00190 
00195     XLV_Stream *xlv_play_get_video_renderer (XLV_PlayState * state);
00196 
00201     XLV_Stream *xlv_play_get_audio_renderer (XLV_PlayState * state);
00202 
00215     XLV_Stream *xlv_play_get_audio_codec (XLV_PlayState * state);
00216 
00229     XLV_Stream *xlv_play_get_video_codec (XLV_PlayState * state);
00230 
00235     gboolean xlv_play_find_system (XLV_PlayState * state);
00236 
00240     void xlv_prepare_to_play (XLV_PlayState * state);
00241 
00246     gboolean xlv_play_start (XLV_PlayState * state);
00247 
00252     gboolean xlv_play_stop (XLV_PlayState * state);
00253 
00258     gboolean xlv_play_pause (XLV_PlayState * state);
00259 
00264     gboolean xlv_play_alive (XLV_PlayState * state);
00265 
00270     gboolean xlv_play_paused (XLV_PlayState * state);
00271 
00280     gfloat xlv_play_get_time_length (XLV_PlayState * state);
00281 
00286     gfloat xlv_play_get_current_time (XLV_PlayState * state);
00287 
00291     gboolean xlv_play_set_current_time (XLV_PlayState * state, gfloat time);
00292 
00296     guint32 xlv_play_get_audio_bitrate (XLV_PlayState * state);
00297 
00301     guint32 xlv_play_get_video_bitrate (XLV_PlayState * state);
00302 
00306     guint8 xlv_play_get_aq_use (XLV_PlayState * state);
00307 
00311     guint8 xlv_play_get_vq_use (XLV_PlayState * state);
00312 
00313 #ifdef __cplusplus
00314 }
00315 #endif
00316 
00317 #endif

Generated on Mon Jul 1 19:39:05 2002 for XLV by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002