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@20: *//*
renatofilho@20: *
renatofilho@20: * This program is free software; you can redistribute it and/or modify
renatofilho@20: * it under the terms of the GNU Lesser General Public License as published by
renatofilho@20: * the Free Software Foundation; either version 2 of the License, or
renatofilho@20: * (at your option) any later version.
renatofilho@20: *
renatofilho@20: * This program is distributed in the hope that it will be useful,
renatofilho@20: * but WITHOUT ANY WARRANTY; without even the implied warranty of
renatofilho@20: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
renatofilho@20: * GNU General Public License for more details.
renatofilho@20: *
renatofilho@20: * You should have received a copy of the GNU Lesser General Public License
renatofilho@20: * along with this program; if not, write to the Free Software
renatofilho@20: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
renatofilho@20: */
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@20: /* GStreamer includes */
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:
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@20:
renatofilho@20:
renatofilho@20: typedef struct _MMythTVPlayer MMythTVPlayer;
renatofilho@20: typedef struct _MMythTVPlayerClass MMythTVPlayerClass;
renatofilho@20:
renatofilho@20: struct _MMythTVPlayerClass
renatofilho@20: {
renatofilho@20: GObjectClass parent_class;
renatofilho@20:
renatofilho@20: /* callbacks */
renatofilho@20: /* no one for now */
renatofilho@20: };
renatofilho@20:
renatofilho@20: struct _MMythTVPlayer
renatofilho@20: {
renatofilho@20: GObject parent;
renatofilho@20:
renatofilho@20: GstElement *gst_pipeline;
renatofilho@20: GstElement *gst_source;
renatofilho@20: GstElement *gst_videodec;
renatofilho@20: GstElement *gst_videosink;
rosfran@64: GstElement *gst_videocolortrs;
rosfran@64: GstElement *videoqueue1;
rosfran@64: GstElement *videoqueue2;
rosfran@64: GstElement *audioqueue1;
rosfran@64: GstElement *audioqueue2;
rosfran@64:
renatofilho@20: gulong expose_handler;
renatofilho@20: // GMainLoop *loop;
renatofilho@20:
renatofilho@20: GtkWidget *videow;
renatofilho@20:
renatofilho@20: /* Backend connection related variables */
renatofilho@20: GString *backend_hostname;
renatofilho@20: gint backend_port;
renatofilho@20: GString *local_hostname;
renatofilho@20:
rosfran@64: GMythRecorder *recorder;
renatofilho@20: GMythTVChain *tvchain;
renatofilho@20: GMythProgramInfo *proginfo;
rosfran@208: GMythLiveTV *livetv;
rosfran@208:
rosfran@208: GMythBackendInfo *backend_info;
renatofilho@20:
renatofilho@20: gboolean is_livetv;
renatofilho@20: };
renatofilho@20:
renatofilho@20:
renatofilho@20: GType mmyth_tvplayer_get_type (void);
renatofilho@20:
renatofilho@20: MMythTVPlayer* mmyth_tvplayer_new ();
rosfran@208: gboolean mmyth_tvplayer_initialize (MMythTVPlayer *tvplayer, GMythBackendInfo *backend_info);
renatofilho@20:
renatofilho@20: void mmyth_tvplayer_start_playing (MMythTVPlayer *tvplayer);
renatofilho@20: void mmyth_tvplayer_stop_playing (MMythTVPlayer *tvplayer);
renatofilho@20:
renatofilho@20: gboolean mmyth_tvplayer_set_widget (MMythTVPlayer *tvplayer,
renatofilho@20: GtkWidget *videow);
renatofilho@20:
renatofilho@20: gboolean mmyth_tvplayer_is_playing (MMythTVPlayer *tvplayer);
renatofilho@20:
renatofilho@20: gboolean mmyth_tvplayer_record_setup (MMythTVPlayer *tvplayer,
renatofilho@20: gchar *filename);
renatofilho@20: gboolean mmyth_tvplayer_livetv_setup (MMythTVPlayer *tvplayer);
renatofilho@20:
renatofilho@20: G_END_DECLS
renatofilho@20:
renatofilho@20: #endif /*MMYTH_TVPLAYER_H_*/