1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/maemo-ui/src/mmyth_tvplayer.h Tue Oct 24 14:19:49 2006 +0100
1.3 @@ -0,0 +1,112 @@
1.4 +/**
1.5 + * GMyth Library
1.6 + *
1.7 + * @file gmyth/mmyth_tvplayer.h
1.8 + *
1.9 + * @brief <p> This component provides playback of the remote A/V using
1.10 + * GStreamer.
1.11 + *
1.12 + * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
1.13 + * @author Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
1.14 + *
1.15 + *//*
1.16 + *
1.17 + * This program is free software; you can redistribute it and/or modify
1.18 + * it under the terms of the GNU Lesser General Public License as published by
1.19 + * the Free Software Foundation; either version 2 of the License, or
1.20 + * (at your option) any later version.
1.21 + *
1.22 + * This program is distributed in the hope that it will be useful,
1.23 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.24 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.25 + * GNU General Public License for more details.
1.26 + *
1.27 + * You should have received a copy of the GNU Lesser General Public License
1.28 + * along with this program; if not, write to the Free Software
1.29 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1.30 + */
1.31 +
1.32 +#ifndef MMYTH_TVPLAYER_H_
1.33 +#define MMYTH_TVPLAYER_H_
1.34 +
1.35 +#include <glib-object.h>
1.36 +#include <gtk/gtk.h>
1.37 +
1.38 +/* GStreamer includes */
1.39 +#include <gst/gst.h>
1.40 +#include <gst/interfaces/xoverlay.h>
1.41 +
1.42 +#include "gmyth_remote_encoder.h"
1.43 +#include "gmyth_tvchain.h"
1.44 +#include "gmyth_common.h"
1.45 +
1.46 +G_BEGIN_DECLS
1.47 +
1.48 +#define MMYTH_TVPLAYER_TYPE (mmyth_tvplayer_get_type ())
1.49 +#define MMYTH_TVPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MMYTH_TVPLAYER_TYPE, MMythTVPlayer))
1.50 +#define MMYTH_TVPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MMYTH_TVPLAYER_TYPE, MMythTVPlayerClass))
1.51 +#define IS_MMYTH_TVPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MMYTH_TVPLAYER_TYPE))
1.52 +#define IS_MMYTH_TVPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MMYTH_TVPLAYER_TYPE))
1.53 +#define MMYTH_TVPLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MMYTH_TVPLAYER_TYPE, MMythTVPlayerClass))
1.54 +
1.55 +
1.56 +typedef struct _MMythTVPlayer MMythTVPlayer;
1.57 +typedef struct _MMythTVPlayerClass MMythTVPlayerClass;
1.58 +
1.59 +struct _MMythTVPlayerClass
1.60 +{
1.61 + GObjectClass parent_class;
1.62 +
1.63 + /* callbacks */
1.64 + /* no one for now */
1.65 +};
1.66 +
1.67 +struct _MMythTVPlayer
1.68 +{
1.69 + GObject parent;
1.70 +
1.71 + GstElement *gst_pipeline;
1.72 + GstElement *gst_source;
1.73 + GstElement *gst_videodec;
1.74 + GstElement *gst_videosink;
1.75 + GstElement *videoqueue;
1.76 + GstElement *audioqueue;
1.77 +
1.78 + gulong expose_handler;
1.79 +// GMainLoop *loop;
1.80 +
1.81 + GtkWidget *videow;
1.82 +
1.83 + /* Backend connection related variables */
1.84 + GString *backend_hostname;
1.85 + gint backend_port;
1.86 + GString *local_hostname;
1.87 +
1.88 + GMythRemoteEncoder *remote_encoder;
1.89 + GMythTVChain *tvchain;
1.90 + GMythProgramInfo *proginfo;
1.91 +
1.92 + gboolean is_livetv;
1.93 +};
1.94 +
1.95 +
1.96 +GType mmyth_tvplayer_get_type (void);
1.97 +
1.98 +MMythTVPlayer* mmyth_tvplayer_new ();
1.99 +gboolean mmyth_tvplayer_initialize (MMythTVPlayer *tvplayer);
1.100 +
1.101 +void mmyth_tvplayer_start_playing (MMythTVPlayer *tvplayer);
1.102 +void mmyth_tvplayer_stop_playing (MMythTVPlayer *tvplayer);
1.103 +
1.104 +gboolean mmyth_tvplayer_set_widget (MMythTVPlayer *tvplayer,
1.105 + GtkWidget *videow);
1.106 +
1.107 +gboolean mmyth_tvplayer_is_playing (MMythTVPlayer *tvplayer);
1.108 +
1.109 +gboolean mmyth_tvplayer_record_setup (MMythTVPlayer *tvplayer,
1.110 + gchar *filename);
1.111 +gboolean mmyth_tvplayer_livetv_setup (MMythTVPlayer *tvplayer);
1.112 +
1.113 +G_END_DECLS
1.114 +
1.115 +#endif /*MMYTH_TVPLAYER_H_*/