2 * Dictix / DixPlayer - dix-player.h
4 * Copyright (C) Martin Blanchard 2011 <tinram@gmx.fr>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 #ifndef __DIX_PLAYER_H__
23 #define __DIX_PLAYER_H__
26 #include <glib-object.h>
31 #define DIX_TYPE_PLAYER (dix_player_get_type ())
32 #define DIX_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DIX_TYPE_PLAYER, DixPlayer))
33 #define DIX_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DIX_TYPE_PLAYER, DixPlayerClass))
34 #define DIX_IS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DIX_TYPE_PLAYER))
35 #define DIX_IS_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DIX_TYPE_PLAYER))
36 #define DIX_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DIX_TYPE_PLAYER, DixPlayerClass))
38 typedef struct _DixPlayer DixPlayer
;
39 typedef struct _DixPlayerClass DixPlayerClass
;
40 typedef struct _DixPlayerPrivate DixPlayerPrivate
;
47 DixPlayerPrivate
*priv
;
50 struct _DixPlayerClass
52 GstPipelineClass parent_class
;
55 void (*playback_started
) (DixPlayer
*player
);
56 void (*playback_stopped
) (DixPlayer
*player
, gboolean eos
);
58 void (*pipeline_error
) (DixPlayer
*player
, GError
*error
);
61 GType
dix_player_get_type (void) G_GNUC_CONST
;
62 DixPlayer
* dix_player_new ();
64 void dix_player_start_playing (DixPlayer
*player
, gchar
* uri
, GError
**error
);
65 gint64
dix_player_query_duration (DixPlayer
*player
);
66 gint64
dix_player_query_position (DixPlayer
*player
);
67 gdouble
dix_player_query_progress (DixPlayer
*player
, gint64
*position
);
68 void dix_player_move (DixPlayer
*player
, gdouble location
);
69 void dix_player_pause (DixPlayer
*player
);
70 void dix_player_stop (DixPlayer
*player
);
72 void dix_player_set_volume (DixPlayer
*player
, gdouble volume
);
76 #endif /* __DIX_PLAYER_H__ */