|
Packit |
d91b90 |
/*
|
|
Packit |
d91b90 |
* Clutter-GStreamer.
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* GStreamer integration library for Clutter.
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* clutter-gst-player.h - Wrap some convenience functions around playbin2
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* Authored By Damien Lespiau <damien.lespiau@intel.com>
|
|
Packit |
d91b90 |
* Lionel Landwerlin <lionel.g.landwerlin@linux.intel.com>
|
|
Packit |
d91b90 |
* Matthew Allum <mallum@openedhand.com>
|
|
Packit |
d91b90 |
* Emmanuele Bassi <ebassi@linux.intel.com>
|
|
Packit |
d91b90 |
* Andre Moreira Magalhaes <andre.magalhaes@collabora.co.uk>
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* Copyright (C) 2006 OpenedHand
|
|
Packit |
d91b90 |
* Copyright (C) 2009-2013 Intel Corporation
|
|
Packit |
d91b90 |
* Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
d91b90 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
d91b90 |
* License as published by the Free Software Foundation; either
|
|
Packit |
d91b90 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
d91b90 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
d91b90 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
d91b90 |
* Lesser General Public License for more details.
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
d91b90 |
* License along with this library; if not, write to the
|
|
Packit |
d91b90 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Packit |
d91b90 |
* Boston, MA 02111-1307, USA.
|
|
Packit |
d91b90 |
*/
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
#if !defined(__CLUTTER_GST_H_INSIDE__) && !defined(CLUTTER_GST_COMPILATION)
|
|
Packit |
d91b90 |
#error "Only <clutter-gst/clutter-gst.h> can be include directly."
|
|
Packit |
d91b90 |
#endif
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
#ifndef __CLUTTER_GST_PLAYER_H__
|
|
Packit |
d91b90 |
#define __CLUTTER_GST_PLAYER_H__
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
#include <glib-object.h>
|
|
Packit |
d91b90 |
#include <gst/gst.h>
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
#include <clutter-gst/clutter-gst-types.h>
|
|
Packit |
d91b90 |
#include <clutter-gst/clutter-gst-video-sink.h>
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
G_BEGIN_DECLS
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
#define CLUTTER_GST_TYPE_PLAYER clutter_gst_player_get_type()
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
#define CLUTTER_GST_PLAYER(obj) \
|
|
Packit |
d91b90 |
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
|
Packit |
d91b90 |
CLUTTER_GST_TYPE_PLAYER, \
|
|
Packit |
d91b90 |
ClutterGstPlayer))
|
|
Packit |
d91b90 |
#define CLUTTER_GST_IS_PLAYER(obj) \
|
|
Packit |
d91b90 |
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
|
|
Packit |
d91b90 |
CLUTTER_GST_TYPE_PLAYER))
|
|
Packit |
d91b90 |
#define CLUTTER_GST_PLAYER_GET_INTERFACE(obj) \
|
|
Packit |
d91b90 |
(G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
|
|
Packit |
d91b90 |
CLUTTER_GST_TYPE_PLAYER, \
|
|
Packit |
d91b90 |
ClutterGstPlayerIface))
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
typedef struct _ClutterGstPlayer ClutterGstPlayer;
|
|
Packit |
d91b90 |
typedef struct _ClutterGstPlayerIface ClutterGstPlayerIface;
|
|
Packit |
d91b90 |
typedef struct _ClutterGstPlayerIfacePrivate ClutterGstPlayerIfacePrivate;
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
/**
|
|
Packit |
d91b90 |
* ClutterGstPlayer:
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* #ClutterGstPlayer is an opaque structure whose members cannot be
|
|
Packit |
d91b90 |
* directly accessed
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* Since: 1.4
|
|
Packit |
d91b90 |
*/
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
/**
|
|
Packit |
d91b90 |
* ClutterGstPlayerIface:
|
|
Packit |
d91b90 |
* @get_frame: virtual function; returns the current visible frame
|
|
Packit |
d91b90 |
* @get_pipeline: virtual function; returns the current GStreamer pipeline
|
|
Packit |
d91b90 |
* @get_video_sink: virtual function; returns the current ClutterGst video sink
|
|
Packit |
d91b90 |
* @get_idle: virtual function; returns whether the player is currently in idle state
|
|
Packit |
d91b90 |
* @get_audio_volume: virtual function; returns the current audio volume
|
|
Packit |
d91b90 |
* @set_audio_volume: virtual function; sets the audio volume
|
|
Packit |
d91b90 |
* @get_playing: virtual function; returns whether the player is currently playing
|
|
Packit |
d91b90 |
* @set_playing: virtual function; starts or stops the player from playing
|
|
Packit |
d91b90 |
* @new_frame: signal class closure for #ClutterGstPlayer::new-frame
|
|
Packit |
d91b90 |
* @ready: signal class closure for #ClutterGstPlayer::ready
|
|
Packit |
d91b90 |
* @eos: signal class closure for #ClutterGstPlayer::eos
|
|
Packit |
d91b90 |
* @error: signal class closure for #ClutterGstPlayer::error
|
|
Packit |
d91b90 |
* @size_change: signal class closure for #ClutterGstPlayer::size-change
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* Interface vtable for #ClutterGstPlayer implementations
|
|
Packit |
d91b90 |
*
|
|
Packit |
d91b90 |
* Since: 1.4
|
|
Packit |
d91b90 |
*/
|
|
Packit |
d91b90 |
struct _ClutterGstPlayerIface
|
|
Packit |
d91b90 |
{
|
|
Packit |
d91b90 |
/*< private >*/
|
|
Packit |
d91b90 |
GTypeInterface base_iface;
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
ClutterGstPlayerIfacePrivate *priv;
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
/*< public >*/
|
|
Packit |
d91b90 |
ClutterGstFrame *(* get_frame) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
GstElement * (* get_pipeline) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
ClutterGstVideoSink *(* get_video_sink) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
gboolean (* get_idle) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
gdouble (* get_audio_volume) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
void (* set_audio_volume) (ClutterGstPlayer *self,
|
|
Packit |
d91b90 |
gdouble volume);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
gboolean (* get_playing) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
void (* set_playing) (ClutterGstPlayer *self,
|
|
Packit |
d91b90 |
gboolean playing);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
/*< private >*/
|
|
Packit |
d91b90 |
gpointer _padding_vfuncs[16];
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
/*< public >*/
|
|
Packit |
d91b90 |
/* signals */
|
|
Packit |
d91b90 |
void (* new_frame) (ClutterGstPlayer *self, ClutterGstFrame *frame);
|
|
Packit |
d91b90 |
void (* ready) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
void (* eos) (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
void (* error) (ClutterGstPlayer *self,
|
|
Packit |
d91b90 |
const GError *error);
|
|
Packit |
d91b90 |
void (* size_change) (ClutterGstPlayer *self,
|
|
Packit |
d91b90 |
gint width,
|
|
Packit |
d91b90 |
gint height);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
/*< private >*/
|
|
Packit |
d91b90 |
gpointer _padding_signals[8];
|
|
Packit |
d91b90 |
};
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
GType clutter_gst_player_get_type (void) G_GNUC_CONST;
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
ClutterGstFrame * clutter_gst_player_get_frame (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
GstElement * clutter_gst_player_get_pipeline (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
ClutterGstVideoSink * clutter_gst_player_get_video_sink (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
gboolean clutter_gst_player_get_idle (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
gboolean clutter_gst_player_get_playing (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
void clutter_gst_player_set_playing (ClutterGstPlayer *self,
|
|
Packit |
d91b90 |
gboolean playing);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
gdouble clutter_gst_player_get_audio_volume (ClutterGstPlayer *self);
|
|
Packit |
d91b90 |
void clutter_gst_player_set_audio_volume (ClutterGstPlayer *self,
|
|
Packit |
d91b90 |
gdouble volume);
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
G_END_DECLS
|
|
Packit |
d91b90 |
|
|
Packit |
d91b90 |
#endif /* __CLUTTER_GST_PLAYER_H__ */
|