MythTV client source plugin created.

Original commit message from CVS:
MythTV client source plugin created.
This commit is contained in:
Edgard Lima 2007-01-12 19:02:37 +00:00
parent 5f042edd46
commit 1b07bbad86
7 changed files with 1537 additions and 0 deletions

View file

@ -1,3 +1,15 @@
2007-01-12 Edgard Lima <edgard.lima@indt.org.br>
Patch by: Rosfran Borges <rosfran.borges@indt.org.br>
* configure.ac:
* gst-plugins-bad.spec.in:
* ext/Makefile.am:
* ext/mythtv/Makefile.am:
* ext/mythtv/gstmythtvsrc.c:
* ext/mythtv/gstmythtvsrc.h:
MythTV client source plugin created.
2007-01-12 Wim Taymans <wim@fluendo.com>
* gst/qtdemux/Makefile.am:

View file

@ -702,6 +702,17 @@ GST_CHECK_FEATURE(MUSICBRAINZ, [musicbrainz tag generation], musicbrainz, [
AC_SUBST(MUSICBRAINZ_LIBS)
])
dnl *** MythTV ***
translit(dnm, m, l) AM_CONDITIONAL(USE_MYTHTV, true)
GST_CHECK_FEATURE(MYTHTV, [MythTV client plugins], mythtvsrc, [
PKG_CHECK_MODULES(GMYTH, gmyth-0.1 >= 0.1.0.3, HAVE_MYTHTV="yes", [
HAVE_MYTHTV="no"
AC_MSG_RESULT(no)
])
AC_SUBST(GMYTH_CFLAGS)
AC_SUBST(GMYTH_LIBS)
])
dnl *** neon ***
translit(dnm, m, l) AM_CONDITIONAL(USE_NEON, true)
GST_CHECK_FEATURE(NEON, [neon http client plugins], neonhttpsrc, [
@ -855,6 +866,7 @@ AM_CONDITIONAL(USE_LADSPA, false)
AM_CONDITIONAL(USE_LIBMMS, false)
AM_CONDITIONAL(USE_MUSEPACK, false)
AM_CONDITIONAL(USE_MUSICBRAINZ, false)
AM_CONDITIONAL(USE_MYTHTV, false)
AM_CONDITIONAL(USE_NEON, false)
AM_CONDITIONAL(USE_SDL, false)
AM_CONDITIONAL(USE_SOUNDTOUCH, false)
@ -969,6 +981,7 @@ ext/Makefile
ext/mpeg2enc/Makefile
ext/musepack/Makefile
ext/musicbrainz/Makefile
ext/mythtv/Makefile
ext/neon/Makefile
ext/sdl/Makefile
ext/soundtouch/Makefile

View file

@ -160,6 +160,12 @@ else
MUSICBRAINZ_DIR=
endif
if USE_MYTHTV
MYTHTV_DIR=mythtv
else
MYTHTV_DIR=
endif
# if USE_NAS
# NAS_DIR=nas
# else
@ -272,6 +278,7 @@ SUBDIRS=\
$(MPLEX_DIR) \
$(MUSEPACK_DIR) \
$(MUSICBRAINZ_DIR) \
$(MYTHTV_DIR) \
$(NAS_DIR) \
$(NEON_DIR) \
$(POLYP_DIR) \
@ -306,6 +313,7 @@ DIST_SUBDIRS= \
mpeg2enc \
musepack \
musicbrainz \
mythtv \
neon \
sdl \
soundtouch \

20
ext/mythtv/Makefile.am Normal file
View file

@ -0,0 +1,20 @@
plugin_LTLIBRARIES = libgstmythtvsrc.la
libgstmythtvsrc_la_SOURCES = \
gstmythtvsrc.c
libgstmythtvsrc_la_CFLAGS = \
$(GST_CFLAGS) \
$(GMYTH_CFLAGS)
libgstmythtvsrc_la_LDFLAGS = \
$(GST_PLUGIN_LDFLAGS)
libgstmythtvsrc_la_LIBADD = \
$(GST_BASE_LIBS) \
$(GMYTH_LIBS)
noinst_HEADERS = \
gstmythtvsrc.h

1351
ext/mythtv/gstmythtvsrc.c Normal file

File diff suppressed because it is too large Load diff

131
ext/mythtv/gstmythtvsrc.h Normal file
View file

@ -0,0 +1,131 @@
/* GStreamer
* Copyright (C) <2006> Rosfran Borges <rosfran.borges@indt.org.br>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_MYTHTV_SRC_H__
#define __GST_MYTHTV_SRC_H__
#include <gst/gst.h>
#include <gst/base/gstbasesrc.h>
#include <gst/base/gstpushsrc.h>
#include <stdio.h>
#include <gmyth/gmyth_socket.h>
#include <gmyth/gmyth_file_transfer.h>
#include <gmyth/gmyth_livetv.h>
#include <gmyth/gmyth_backendinfo.h>
G_BEGIN_DECLS
#define GST_TYPE_MYTHTV_SRC \
(gst_mythtv_src_get_type())
#define GST_MYTHTV_SRC(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MYTHTV_SRC,GstMythtvSrc))
#define GST_MYTHTV_SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MYTHTV_SRC,GstMythtvSrcClass))
#define GST_IS_MYTHTV_SRC(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MYTHTV_SRC))
#define GST_IS_MYTHTV_SRC_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MYTHTV_SRC))
typedef struct _GstMythtvSrc GstMythtvSrc;
typedef struct _GstMythtvSrcClass GstMythtvSrcClass;
typedef enum {
GST_MYTHTV_SRC_FILE_TRANSFER,
GST_MYTHTV_SRC_NEXT_PROGRAM_CHAIN,
GST_MYTHTV_SRC_INVALID_DATA
} GstMythtvState;
struct _GstMythtvSrc {
GstPushSrc element;
/* MythFileTransfer */
GMythFileTransfer *file_transfer;
GMythLiveTV *spawn_livetv;
GMythBackendInfo *backend_info;
GstMythtvState state;
gchar *uri_name;
gchar *user_agent;
gchar *live_chain_id;
gint mythtv_version;
gint64 content_size;
gint64 prev_content_size;
gint64 content_size_last;
guint64 bytes_read;
gint64 read_offset;
gint buffer_remain;
gboolean eos;
gboolean do_start;
gboolean unique_setup;
gboolean live_tv;
gboolean enable_timing_position;
gint live_tv_id;
gint channel_num;
guint mode;
/* MythTV capabilities */
GstCaps *mythtv_caps;
GstPad *sinkpad;
GStaticRecMutex *th_mutex;
GByteArray *bytes_queue;
#ifndef GST_DISABLE_GST_DEBUG
/* enable Myth TV debug messages */
gboolean mythtv_msgs_dbg;
#endif
gboolean update_prog_chain;
/* stablish a maximum iteration value to the IS_RECORDING message */
guint wait_to_transfer;
};
struct _GstMythtvSrcClass {
GstPushSrcClass parent_class;
};
GType gst_mythtv_src_get_type (void);
G_END_DECLS
#endif /* __GST_MYTHTV_SRC_H__ */

View file

@ -38,6 +38,7 @@ BuildRequires: gcc-c++
@USE_LIBMMS_TRUE@Requires: libmms >= 0.1
@USE_OPENGL_TRUE@Requires: mesa-libGL
@USE_WAVPACK_TRUE@Requires: wavpack-devel >= 4.32
@USE_MYTHTV_TRUE@Requires: gmyth-0.1
%description
GStreamer is a streaming media framework, based on graphs of filters which
@ -118,6 +119,7 @@ rm -rf $RPM_BUILD_ROOT
@USE_MUSEPACK_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmusepack.so
@USE_GSM_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstgsm.so
@USE_DTS_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstdtsdec.so
@USE_MYTHTV_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstmythtvsrc.so
%changelog
* Fri Dec 15 2006 Thomas Vander Stichele <thomas at apestaart dot org>