renatofilho@20: /** renatofilho@20: * GMyth Library renatofilho@20: * renatofilho@20: * @file gmyth/mmyth_tvplayer.h renatofilho@20: * renatofilho@20: * @brief

This component provides playback of the remote A/V using renatofilho@20: * GStreamer. renatofilho@20: * renatofilho@20: * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia. renatofilho@20: * @author Hallyson Luiz de Morais Melo renatofilho@20: * renatofilho@754: *//* renatofilho@754: * renatofilho@754: * This program is free software; you can redistribute it and/or modify renatofilho@754: * it under the terms of the GNU Lesser General Public License as published by renatofilho@754: * the Free Software Foundation; either version 2 of the License, or renatofilho@754: * (at your option) any later version. renatofilho@754: * renatofilho@754: * This program is distributed in the hope that it will be useful, renatofilho@754: * but WITHOUT ANY WARRANTY; without even the implied warranty of renatofilho@754: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the renatofilho@754: * GNU General Public License for more details. renatofilho@754: * renatofilho@754: * You should have received a copy of the GNU Lesser General Public License renatofilho@754: * along with this program; if not, write to the Free Software renatofilho@754: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA renatofilho@754: */ renatofilho@20: renatofilho@20: #ifndef MMYTH_TVPLAYER_H_ renatofilho@20: #define MMYTH_TVPLAYER_H_ renatofilho@20: renatofilho@20: #include renatofilho@20: #include renatofilho@20: renatofilho@754: /* renatofilho@754: * GStreamer includes renatofilho@754: */ renatofilho@20: #include renatofilho@20: #include renatofilho@20: rosfran@208: #include rosfran@208: #include rosfran@208: #include rosfran@208: #include renatofilho@20: renatofilho@20: G_BEGIN_DECLS renatofilho@20: #define MMYTH_TVPLAYER_TYPE (mmyth_tvplayer_get_type ()) renatofilho@20: #define MMYTH_TVPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MMYTH_TVPLAYER_TYPE, MMythTVPlayer)) renatofilho@20: #define MMYTH_TVPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MMYTH_TVPLAYER_TYPE, MMythTVPlayerClass)) renatofilho@20: #define IS_MMYTH_TVPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MMYTH_TVPLAYER_TYPE)) renatofilho@20: #define IS_MMYTH_TVPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MMYTH_TVPLAYER_TYPE)) renatofilho@20: #define MMYTH_TVPLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MMYTH_TVPLAYER_TYPE, MMythTVPlayerClass)) renatofilho@754: typedef struct _MMythTVPlayer MMythTVPlayer; renatofilho@754: typedef struct _MMythTVPlayerClass MMythTVPlayerClass; renatofilho@20: renatofilho@754: struct _MMythTVPlayerClass { renatofilho@754: GObjectClass parent_class; renatofilho@20: renatofilho@754: /* renatofilho@754: * callbacks renatofilho@754: */ renatofilho@754: /* renatofilho@754: * no one for now renatofilho@754: */ renatofilho@20: }; renatofilho@20: renatofilho@754: struct _MMythTVPlayer { renatofilho@754: GObject parent; renatofilho@20: renatofilho@754: GstElement *gst_pipeline; renatofilho@754: GstElement *gst_source; renatofilho@754: GstElement *gst_videodec; renatofilho@754: GstElement *gst_videosink; renatofilho@754: GstElement *gst_videocolortrs; renatofilho@754: GstElement *videoqueue1; renatofilho@754: GstElement *videoqueue2; renatofilho@754: GstElement *audioqueue1; renatofilho@754: GstElement *audioqueue2; renatofilho@20: renatofilho@754: gulong expose_handler; renatofilho@754: // GMainLoop *loop; rosfran@208: renatofilho@754: GtkWidget *videow; renatofilho@754: renatofilho@754: /* renatofilho@754: * Backend connection related variables renatofilho@754: */ renatofilho@754: GString *backend_hostname; renatofilho@754: gint backend_port; renatofilho@754: GString *local_hostname; renatofilho@754: renatofilho@754: GMythRecorder *recorder; renatofilho@754: GMythTVChain *tvchain; renatofilho@754: GMythProgramInfo *proginfo; renatofilho@754: GMythLiveTV *livetv; renatofilho@754: renatofilho@754: GMythBackendInfo *backend_info; renatofilho@754: renatofilho@754: gboolean is_livetv; renatofilho@20: }; renatofilho@20: renatofilho@20: renatofilho@754: GType mmyth_tvplayer_get_type(void); renatofilho@20: renatofilho@754: MMythTVPlayer *mmyth_tvplayer_new(); renatofilho@754: gboolean mmyth_tvplayer_initialize(MMythTVPlayer * tvplayer, renatofilho@754: GMythBackendInfo * backend_info); renatofilho@20: renatofilho@754: void mmyth_tvplayer_start_playing(MMythTVPlayer * tvplayer); renatofilho@754: void mmyth_tvplayer_stop_playing(MMythTVPlayer * tvplayer); renatofilho@20: renatofilho@754: gboolean mmyth_tvplayer_set_widget(MMythTVPlayer * tvplayer, renatofilho@754: GtkWidget * videow); renatofilho@20: renatofilho@754: gboolean mmyth_tvplayer_is_playing(MMythTVPlayer * tvplayer); renatofilho@20: renatofilho@754: gboolean mmyth_tvplayer_record_setup(MMythTVPlayer * tvplayer, renatofilho@754: const gchar * filename); renatofilho@754: gboolean mmyth_tvplayer_livetv_setup(MMythTVPlayer * tvplayer); renatofilho@20: renatofilho@20: G_END_DECLS renatofilho@754: #endif /* MMYTH_TVPLAYER_H_ */