1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/gmyth-stream/client/autogen.sh Tue Apr 03 19:42:17 2007 +0100
1.3 @@ -0,0 +1,19 @@
1.4 +#!/bin/sh
1.5 +# Run this to generate all the initial makefiles, etc.
1.6 +
1.7 +srcdir=`dirname $0`
1.8 +test -z "$srcdir" && srcdir=.
1.9 +
1.10 +PKG_NAME="myth-stream"
1.11 +
1.12 +(test -f $srcdir/configure.ac) || {
1.13 + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
1.14 + echo " top-level $PKG_NAME directory"
1.15 + exit 1
1.16 +}
1.17 +
1.18 +which gnome-autogen.sh || {
1.19 + echo "You need to install gnome-common from the GNOME CVS"
1.20 + exit 1
1.21 +}
1.22 +REQUIRED_AUTOMAKE_VERSION=1.9 USE_GNOME2_MACROS=1 . gnome-autogen.sh
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/gmyth-stream/client/src/.deps/libgmythstreamclient_la-gmyth-stream-client.Plo Tue Apr 03 19:42:17 2007 +0100
2.3 @@ -0,0 +1,340 @@
2.4 +libgmythstreamclient_la-gmyth-stream-client.lo \
2.5 + libgmythstreamclient_la-gmyth-stream-client.o: gmyth-stream-client.c \
2.6 + ../config.h /usr/include/sys/types.h /usr/include/features.h \
2.7 + /usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
2.8 + /usr/include/gnu/stubs.h /usr/include/gnu/stubs-32.h \
2.9 + /usr/include/bits/types.h \
2.10 + /usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h \
2.11 + /usr/include/bits/typesizes.h /usr/include/time.h /usr/include/endian.h \
2.12 + /usr/include/bits/endian.h /usr/include/sys/select.h \
2.13 + /usr/include/bits/select.h /usr/include/bits/sigset.h \
2.14 + /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
2.15 + /usr/include/bits/pthreadtypes.h /usr/include/sys/socket.h \
2.16 + /usr/include/sys/uio.h /usr/include/bits/uio.h \
2.17 + /usr/include/bits/socket.h \
2.18 + /usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h \
2.19 + /usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h \
2.20 + /usr/include/limits.h /usr/include/bits/posix1_lim.h \
2.21 + /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
2.22 + /usr/include/bits/posix2_lim.h /usr/include/bits/sockaddr.h \
2.23 + /usr/include/asm/socket.h /usr/include/asm-i386/socket.h \
2.24 + /usr/include/asm/sockios.h /usr/include/asm-i386/sockios.h \
2.25 + /usr/include/netdb.h /usr/include/netinet/in.h /usr/include/stdint.h \
2.26 + /usr/include/bits/wchar.h /usr/include/bits/in.h \
2.27 + /usr/include/bits/byteswap.h /usr/include/rpc/netdb.h \
2.28 + /usr/include/bits/netdb.h /usr/include/unistd.h \
2.29 + /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
2.30 + /usr/include/getopt.h /usr/include/glib-2.0/glib.h \
2.31 + /usr/include/glib-2.0/glib/galloca.h \
2.32 + /usr/include/glib-2.0/glib/gtypes.h \
2.33 + /usr/lib/glib-2.0/include/glibconfig.h \
2.34 + /usr/include/glib-2.0/glib/gmacros.h \
2.35 + /usr/lib/gcc/i486-linux-gnu/4.1.2/include/float.h \
2.36 + /usr/include/glib-2.0/glib/garray.h \
2.37 + /usr/include/glib-2.0/glib/gasyncqueue.h \
2.38 + /usr/include/glib-2.0/glib/gthread.h \
2.39 + /usr/include/glib-2.0/glib/gerror.h /usr/include/glib-2.0/glib/gquark.h \
2.40 + /usr/include/glib-2.0/glib/gatomic.h \
2.41 + /usr/include/glib-2.0/glib/gbacktrace.h \
2.42 + /usr/include/glib-2.0/glib/gbase64.h \
2.43 + /usr/include/glib-2.0/glib/gbookmarkfile.h \
2.44 + /usr/include/glib-2.0/glib/gcache.h /usr/include/glib-2.0/glib/glist.h \
2.45 + /usr/include/glib-2.0/glib/gmem.h /usr/include/glib-2.0/glib/gslice.h \
2.46 + /usr/include/glib-2.0/glib/gcompletion.h \
2.47 + /usr/include/glib-2.0/glib/gconvert.h \
2.48 + /usr/include/glib-2.0/glib/gdataset.h \
2.49 + /usr/include/glib-2.0/glib/gdate.h /usr/include/glib-2.0/glib/gdir.h \
2.50 + /usr/include/glib-2.0/glib/gfileutils.h \
2.51 + /usr/include/glib-2.0/glib/ghash.h /usr/include/glib-2.0/glib/ghook.h \
2.52 + /usr/include/glib-2.0/glib/giochannel.h \
2.53 + /usr/include/glib-2.0/glib/gmain.h /usr/include/glib-2.0/glib/gslist.h \
2.54 + /usr/include/glib-2.0/glib/gstring.h \
2.55 + /usr/include/glib-2.0/glib/gunicode.h \
2.56 + /usr/include/glib-2.0/glib/gutils.h \
2.57 + /usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h \
2.58 + /usr/include/glib-2.0/glib/gkeyfile.h \
2.59 + /usr/include/glib-2.0/glib/gmappedfile.h \
2.60 + /usr/include/glib-2.0/glib/gmarkup.h \
2.61 + /usr/include/glib-2.0/glib/gmessages.h \
2.62 + /usr/include/glib-2.0/glib/gnode.h /usr/include/glib-2.0/glib/goption.h \
2.63 + /usr/include/glib-2.0/glib/gpattern.h \
2.64 + /usr/include/glib-2.0/glib/gprimes.h \
2.65 + /usr/include/glib-2.0/glib/gqsort.h /usr/include/glib-2.0/glib/gqueue.h \
2.66 + /usr/include/glib-2.0/glib/grand.h /usr/include/glib-2.0/glib/grel.h \
2.67 + /usr/include/glib-2.0/glib/gscanner.h \
2.68 + /usr/include/glib-2.0/glib/gshell.h /usr/include/glib-2.0/glib/gspawn.h \
2.69 + /usr/include/glib-2.0/glib/gstrfuncs.h \
2.70 + /usr/include/glib-2.0/glib/gthreadpool.h \
2.71 + /usr/include/glib-2.0/glib/gtimer.h /usr/include/glib-2.0/glib/gtree.h \
2.72 + /usr/include/glib-2.0/glib/gprintf.h /usr/include/stdio.h \
2.73 + /usr/include/libio.h /usr/include/_G_config.h /usr/include/wchar.h \
2.74 + /usr/include/gconv.h /usr/include/bits/stdio_lim.h \
2.75 + /usr/include/bits/sys_errlist.h /usr/include/string.h \
2.76 + gmyth-stream-client.h /usr/include/glib-2.0/glib-object.h \
2.77 + /usr/include/glib-2.0/gobject/gboxed.h \
2.78 + /usr/include/glib-2.0/gobject/gtype.h \
2.79 + /usr/include/glib-2.0/gobject/genums.h \
2.80 + /usr/include/glib-2.0/gobject/gobject.h \
2.81 + /usr/include/glib-2.0/gobject/gvalue.h \
2.82 + /usr/include/glib-2.0/gobject/gparam.h \
2.83 + /usr/include/glib-2.0/gobject/gclosure.h \
2.84 + /usr/include/glib-2.0/gobject/gsignal.h \
2.85 + /usr/include/glib-2.0/gobject/gmarshal.h \
2.86 + /usr/include/glib-2.0/gobject/gparamspecs.h \
2.87 + /usr/include/glib-2.0/gobject/gsourceclosure.h \
2.88 + /usr/include/glib-2.0/gobject/gtypemodule.h \
2.89 + /usr/include/glib-2.0/gobject/gtypeplugin.h \
2.90 + /usr/include/glib-2.0/gobject/gvaluearray.h \
2.91 + /usr/include/glib-2.0/gobject/gvaluetypes.h
2.92 +
2.93 +../config.h:
2.94 +
2.95 +/usr/include/sys/types.h:
2.96 +
2.97 +/usr/include/features.h:
2.98 +
2.99 +/usr/include/sys/cdefs.h:
2.100 +
2.101 +/usr/include/bits/wordsize.h:
2.102 +
2.103 +/usr/include/gnu/stubs.h:
2.104 +
2.105 +/usr/include/gnu/stubs-32.h:
2.106 +
2.107 +/usr/include/bits/types.h:
2.108 +
2.109 +/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stddef.h:
2.110 +
2.111 +/usr/include/bits/typesizes.h:
2.112 +
2.113 +/usr/include/time.h:
2.114 +
2.115 +/usr/include/endian.h:
2.116 +
2.117 +/usr/include/bits/endian.h:
2.118 +
2.119 +/usr/include/sys/select.h:
2.120 +
2.121 +/usr/include/bits/select.h:
2.122 +
2.123 +/usr/include/bits/sigset.h:
2.124 +
2.125 +/usr/include/bits/time.h:
2.126 +
2.127 +/usr/include/sys/sysmacros.h:
2.128 +
2.129 +/usr/include/bits/pthreadtypes.h:
2.130 +
2.131 +/usr/include/sys/socket.h:
2.132 +
2.133 +/usr/include/sys/uio.h:
2.134 +
2.135 +/usr/include/bits/uio.h:
2.136 +
2.137 +/usr/include/bits/socket.h:
2.138 +
2.139 +/usr/lib/gcc/i486-linux-gnu/4.1.2/include/limits.h:
2.140 +
2.141 +/usr/lib/gcc/i486-linux-gnu/4.1.2/include/syslimits.h:
2.142 +
2.143 +/usr/include/limits.h:
2.144 +
2.145 +/usr/include/bits/posix1_lim.h:
2.146 +
2.147 +/usr/include/bits/local_lim.h:
2.148 +
2.149 +/usr/include/linux/limits.h:
2.150 +
2.151 +/usr/include/bits/posix2_lim.h:
2.152 +
2.153 +/usr/include/bits/sockaddr.h:
2.154 +
2.155 +/usr/include/asm/socket.h:
2.156 +
2.157 +/usr/include/asm-i386/socket.h:
2.158 +
2.159 +/usr/include/asm/sockios.h:
2.160 +
2.161 +/usr/include/asm-i386/sockios.h:
2.162 +
2.163 +/usr/include/netdb.h:
2.164 +
2.165 +/usr/include/netinet/in.h:
2.166 +
2.167 +/usr/include/stdint.h:
2.168 +
2.169 +/usr/include/bits/wchar.h:
2.170 +
2.171 +/usr/include/bits/in.h:
2.172 +
2.173 +/usr/include/bits/byteswap.h:
2.174 +
2.175 +/usr/include/rpc/netdb.h:
2.176 +
2.177 +/usr/include/bits/netdb.h:
2.178 +
2.179 +/usr/include/unistd.h:
2.180 +
2.181 +/usr/include/bits/posix_opt.h:
2.182 +
2.183 +/usr/include/bits/confname.h:
2.184 +
2.185 +/usr/include/getopt.h:
2.186 +
2.187 +/usr/include/glib-2.0/glib.h:
2.188 +
2.189 +/usr/include/glib-2.0/glib/galloca.h:
2.190 +
2.191 +/usr/include/glib-2.0/glib/gtypes.h:
2.192 +
2.193 +/usr/lib/glib-2.0/include/glibconfig.h:
2.194 +
2.195 +/usr/include/glib-2.0/glib/gmacros.h:
2.196 +
2.197 +/usr/lib/gcc/i486-linux-gnu/4.1.2/include/float.h:
2.198 +
2.199 +/usr/include/glib-2.0/glib/garray.h:
2.200 +
2.201 +/usr/include/glib-2.0/glib/gasyncqueue.h:
2.202 +
2.203 +/usr/include/glib-2.0/glib/gthread.h:
2.204 +
2.205 +/usr/include/glib-2.0/glib/gerror.h:
2.206 +
2.207 +/usr/include/glib-2.0/glib/gquark.h:
2.208 +
2.209 +/usr/include/glib-2.0/glib/gatomic.h:
2.210 +
2.211 +/usr/include/glib-2.0/glib/gbacktrace.h:
2.212 +
2.213 +/usr/include/glib-2.0/glib/gbase64.h:
2.214 +
2.215 +/usr/include/glib-2.0/glib/gbookmarkfile.h:
2.216 +
2.217 +/usr/include/glib-2.0/glib/gcache.h:
2.218 +
2.219 +/usr/include/glib-2.0/glib/glist.h:
2.220 +
2.221 +/usr/include/glib-2.0/glib/gmem.h:
2.222 +
2.223 +/usr/include/glib-2.0/glib/gslice.h:
2.224 +
2.225 +/usr/include/glib-2.0/glib/gcompletion.h:
2.226 +
2.227 +/usr/include/glib-2.0/glib/gconvert.h:
2.228 +
2.229 +/usr/include/glib-2.0/glib/gdataset.h:
2.230 +
2.231 +/usr/include/glib-2.0/glib/gdate.h:
2.232 +
2.233 +/usr/include/glib-2.0/glib/gdir.h:
2.234 +
2.235 +/usr/include/glib-2.0/glib/gfileutils.h:
2.236 +
2.237 +/usr/include/glib-2.0/glib/ghash.h:
2.238 +
2.239 +/usr/include/glib-2.0/glib/ghook.h:
2.240 +
2.241 +/usr/include/glib-2.0/glib/giochannel.h:
2.242 +
2.243 +/usr/include/glib-2.0/glib/gmain.h:
2.244 +
2.245 +/usr/include/glib-2.0/glib/gslist.h:
2.246 +
2.247 +/usr/include/glib-2.0/glib/gstring.h:
2.248 +
2.249 +/usr/include/glib-2.0/glib/gunicode.h:
2.250 +
2.251 +/usr/include/glib-2.0/glib/gutils.h:
2.252 +
2.253 +/usr/lib/gcc/i486-linux-gnu/4.1.2/include/stdarg.h:
2.254 +
2.255 +/usr/include/glib-2.0/glib/gkeyfile.h:
2.256 +
2.257 +/usr/include/glib-2.0/glib/gmappedfile.h:
2.258 +
2.259 +/usr/include/glib-2.0/glib/gmarkup.h:
2.260 +
2.261 +/usr/include/glib-2.0/glib/gmessages.h:
2.262 +
2.263 +/usr/include/glib-2.0/glib/gnode.h:
2.264 +
2.265 +/usr/include/glib-2.0/glib/goption.h:
2.266 +
2.267 +/usr/include/glib-2.0/glib/gpattern.h:
2.268 +
2.269 +/usr/include/glib-2.0/glib/gprimes.h:
2.270 +
2.271 +/usr/include/glib-2.0/glib/gqsort.h:
2.272 +
2.273 +/usr/include/glib-2.0/glib/gqueue.h:
2.274 +
2.275 +/usr/include/glib-2.0/glib/grand.h:
2.276 +
2.277 +/usr/include/glib-2.0/glib/grel.h:
2.278 +
2.279 +/usr/include/glib-2.0/glib/gscanner.h:
2.280 +
2.281 +/usr/include/glib-2.0/glib/gshell.h:
2.282 +
2.283 +/usr/include/glib-2.0/glib/gspawn.h:
2.284 +
2.285 +/usr/include/glib-2.0/glib/gstrfuncs.h:
2.286 +
2.287 +/usr/include/glib-2.0/glib/gthreadpool.h:
2.288 +
2.289 +/usr/include/glib-2.0/glib/gtimer.h:
2.290 +
2.291 +/usr/include/glib-2.0/glib/gtree.h:
2.292 +
2.293 +/usr/include/glib-2.0/glib/gprintf.h:
2.294 +
2.295 +/usr/include/stdio.h:
2.296 +
2.297 +/usr/include/libio.h:
2.298 +
2.299 +/usr/include/_G_config.h:
2.300 +
2.301 +/usr/include/wchar.h:
2.302 +
2.303 +/usr/include/gconv.h:
2.304 +
2.305 +/usr/include/bits/stdio_lim.h:
2.306 +
2.307 +/usr/include/bits/sys_errlist.h:
2.308 +
2.309 +/usr/include/string.h:
2.310 +
2.311 +gmyth-stream-client.h:
2.312 +
2.313 +/usr/include/glib-2.0/glib-object.h:
2.314 +
2.315 +/usr/include/glib-2.0/gobject/gboxed.h:
2.316 +
2.317 +/usr/include/glib-2.0/gobject/gtype.h:
2.318 +
2.319 +/usr/include/glib-2.0/gobject/genums.h:
2.320 +
2.321 +/usr/include/glib-2.0/gobject/gobject.h:
2.322 +
2.323 +/usr/include/glib-2.0/gobject/gvalue.h:
2.324 +
2.325 +/usr/include/glib-2.0/gobject/gparam.h:
2.326 +
2.327 +/usr/include/glib-2.0/gobject/gclosure.h:
2.328 +
2.329 +/usr/include/glib-2.0/gobject/gsignal.h:
2.330 +
2.331 +/usr/include/glib-2.0/gobject/gmarshal.h:
2.332 +
2.333 +/usr/include/glib-2.0/gobject/gparamspecs.h:
2.334 +
2.335 +/usr/include/glib-2.0/gobject/gsourceclosure.h:
2.336 +
2.337 +/usr/include/glib-2.0/gobject/gtypemodule.h:
2.338 +
2.339 +/usr/include/glib-2.0/gobject/gtypeplugin.h:
2.340 +
2.341 +/usr/include/glib-2.0/gobject/gvaluearray.h:
2.342 +
2.343 +/usr/include/glib-2.0/gobject/gvaluetypes.h:
3.1 Binary file gmyth-stream/client/src/.libs/libgmythstreamclient.a has changed
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/gmyth-stream/client/src/.libs/libgmythstreamclient.lai Tue Apr 03 19:42:17 2007 +0100
4.3 @@ -0,0 +1,35 @@
4.4 +# libgmythstreamclient.la - a libtool library file
4.5 +# Generated by ltmain.sh - GNU libtool 1.5.22 Debian 1.5.22-4 (1.1220.2.365 2005/12/18 22:14:06)
4.6 +#
4.7 +# Please DO NOT delete this file!
4.8 +# It is necessary for linking the library.
4.9 +
4.10 +# The name that we can dlopen(3).
4.11 +dlname='libgmythstreamclient.so.0'
4.12 +
4.13 +# Names of this library.
4.14 +library_names='libgmythstreamclient.so.0.0.0 libgmythstreamclient.so.0 libgmythstreamclient.so'
4.15 +
4.16 +# The name of the static archive.
4.17 +old_library='libgmythstreamclient.a'
4.18 +
4.19 +# Libraries that this one depends upon.
4.20 +dependency_libs=' /usr/lib/libgobject-2.0.la /usr/lib/libglib-2.0.la /usr/lib/libglib-2.0.la -lrt'
4.21 +
4.22 +# Version information for libgmythstreamclient.
4.23 +current=0
4.24 +age=0
4.25 +revision=0
4.26 +
4.27 +# Is this an already installed library?
4.28 +installed=yes
4.29 +
4.30 +# Should we warn about portability when linking against -modules?
4.31 +shouldnotlink=no
4.32 +
4.33 +# Files to dlopen/dlpreopen
4.34 +dlopen=''
4.35 +dlpreopen=''
4.36 +
4.37 +# Directory that this library needs to be installed in:
4.38 +libdir='/usr/local/lib'
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/gmyth-stream/client/src/.libs/libgmythstreamclient.so Tue Apr 03 19:42:17 2007 +0100
5.3 @@ -0,0 +1,1 @@
5.4 +libgmythstreamclient.so.0.0.0
5.5 \ No newline at end of file
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/gmyth-stream/client/src/.libs/libgmythstreamclient.so.0 Tue Apr 03 19:42:17 2007 +0100
6.3 @@ -0,0 +1,1 @@
6.4 +libgmythstreamclient.so.0.0.0
6.5 \ No newline at end of file
7.1 Binary file gmyth-stream/client/src/.libs/libgmythstreamclient.so.0.0.0 has changed
8.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
8.2 +++ b/gmyth-stream/client/src/Makefile.am Tue Apr 03 19:42:17 2007 +0100
8.3 @@ -0,0 +1,14 @@
8.4 +lib_LTLIBRARIES = libgmythstreamclient.la
8.5 +
8.6 +libgmythstreamclient_la_SOURCES = \
8.7 + gmyth-stream-client.c \
8.8 + gmyth-stream-client.h
8.9 +
8.10 +libgmythstreamclient_la_CFLAGS = \
8.11 + $(GLIB_CFLAGS)
8.12 +
8.13 +libgmythstreamclient_la_LDFLAGS = \
8.14 + $(GLIB_LIBS)
8.15 +
8.16 +
8.17 +CLEANFILES =
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/gmyth-stream/client/src/gmyth-stream-client.c Tue Apr 03 19:42:17 2007 +0100
9.3 @@ -0,0 +1,218 @@
9.4 +#ifdef HAVE_CONFIG_H
9.5 +#include "config.h"
9.6 +#endif
9.7 +
9.8 +#include <sys/types.h>
9.9 +#include <sys/socket.h>
9.10 +#include <netdb.h>
9.11 +#include <netinet/in.h>
9.12 +#include <unistd.h>
9.13 +#include <glib.h>
9.14 +#include <glib/gprintf.h>
9.15 +#include <string.h>
9.16 +
9.17 +#include "gmyth-stream-client.h"
9.18 +
9.19 +
9.20 +#define GMYTH_STREAM_CLIENT_GET_PRIVATE(obj) \
9.21 + (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GMYTH_TYPE_STREAM_CLIENT, GMythStreamClientPrivate))
9.22 +
9.23 +
9.24 +typedef struct _GMythStreamClientPrivate GMythStreamClientPrivate;
9.25 +
9.26 +struct _GMythStreamClientPrivate
9.27 +{
9.28 + GList *streams;
9.29 + gint sock;
9.30 + gboolean connected;
9.31 +};
9.32 +
9.33 +typedef struct _StreamData StreamData;
9.34 +
9.35 +struct _StreamData
9.36 +{
9.37 + guint id;
9.38 + guint port;
9.39 +};
9.40 +
9.41 +static void gmyth_stream_client_class_init (GMythStreamClientClass *klass);
9.42 +static void gmyth_stream_client_init (GMythStreamClient *object);
9.43 +static void gmyth_stream_client_dispose (GObject *object);
9.44 +static void gmyth_stream_client_finalize (GObject *object);
9.45 +
9.46 +G_DEFINE_TYPE(GMythStreamClient, gmyth_stream_client, G_TYPE_OBJECT)
9.47 +
9.48 +static void
9.49 +gmyth_stream_client_class_init (GMythStreamClientClass *klass)
9.50 +{
9.51 + GObjectClass *gobject_class;
9.52 +
9.53 + gobject_class = (GObjectClass *) klass;
9.54 +
9.55 + g_type_class_add_private (klass, sizeof (GMythStreamClientPrivate));
9.56 +
9.57 + gobject_class->dispose = gmyth_stream_client_dispose;
9.58 + gobject_class->finalize = gmyth_stream_client_finalize;
9.59 +}
9.60 +
9.61 +static void
9.62 +gmyth_stream_client_init (GMythStreamClient *self)
9.63 +{
9.64 +}
9.65 +
9.66 +static void
9.67 +gmyth_stream_client_dispose (GObject *object)
9.68 +{
9.69 + gmyth_stream_client_disconnect (GMYTH_STREAM_CLIENT (object));
9.70 +}
9.71 +
9.72 +
9.73 +static void
9.74 +gmyth_stream_client_finalize (GObject *object)
9.75 +{
9.76 +}
9.77 +
9.78 +GMythStreamClient*
9.79 +gmyth_stream_client_new ()
9.80 +{
9.81 + return GMYTH_STREAM_CLIENT (g_object_new (GMYTH_TYPE_STREAM_CLIENT, NULL));
9.82 +}
9.83 +
9.84 +gboolean
9.85 +gmyth_stream_client_connect (GMythStreamClient *self, const gchar *server, guint port)
9.86 +{
9.87 + struct sockaddr_in addr;
9.88 + struct hostent *hp;
9.89 +
9.90 + GMythStreamClientPrivate *priv = GMYTH_STREAM_CLIENT_GET_PRIVATE (self);
9.91 +
9.92 + g_return_val_if_fail (priv->connected == FALSE, TRUE);
9.93 +
9.94 + priv->sock = socket (PF_INET, SOCK_STREAM, 0);
9.95 + if (priv->sock == -1) {
9.96 + g_debug ("Fail to create sock");
9.97 + return FALSE;
9.98 + }
9.99 +
9.100 + memset(&addr, 0, sizeof(addr));
9.101 + hp = gethostbyname(server);
9.102 + memcpy(&addr, *(hp->h_addr_list),sizeof(struct in_addr));
9.103 + addr.sin_family = AF_INET;
9.104 + addr.sin_port = htons (port);
9.105 +
9.106 + if (connect (priv->sock, (struct sockaddr *) &addr, sizeof (addr)) == -1) {
9.107 + g_debug ("Fail to connect with server");
9.108 + shutdown (priv->sock, SHUT_RDWR);
9.109 + priv->sock = -1;
9.110 + return FALSE;
9.111 + }
9.112 +
9.113 + priv->connected = TRUE;
9.114 + return TRUE;
9.115 +}
9.116 +
9.117 +void
9.118 +gmyth_stream_client_disconnect (GMythStreamClient *self)
9.119 +{
9.120 + GMythStreamClientPrivate *priv = GMYTH_STREAM_CLIENT_GET_PRIVATE (self);
9.121 +
9.122 + g_return_if_fail (priv->connected == FALSE);
9.123 +
9.124 + GList *lst = priv->streams;
9.125 +
9.126 + for (; lst != NULL; lst = lst->next) {
9.127 + StreamData *data = (StreamData *) lst->data;
9.128 + gmyth_stream_client_close_stream (self, data->id);
9.129 + }
9.130 +
9.131 + close (priv->sock);
9.132 + shutdown (priv->sock, SHUT_RDWR);
9.133 + priv->sock = -1;
9.134 + priv->connected = FALSE;
9.135 +}
9.136 +
9.137 +guint
9.138 +gmyth_stream_client_open_stream (GMythStreamClient *self,
9.139 + const gchar* file_name,
9.140 + const gchar* mux,
9.141 + const gchar* vcodec,
9.142 + guint vbitrate,
9.143 + gdouble fps,
9.144 + const gchar* acodec,
9.145 + guint abitrate,
9.146 + guint width, guint height,
9.147 + guint port,
9.148 + const gchar* opt)
9.149 +{
9.150 + gint stream_id = 0;
9.151 + gchar *cmd;
9.152 + StreamData *data = NULL;
9.153 + GMythStreamClientPrivate *priv = GMYTH_STREAM_CLIENT_GET_PRIVATE (self);
9.154 +
9.155 + g_return_val_if_fail (priv->connected == TRUE, FALSE);
9.156 +
9.157 + if (send (priv->sock, "SETUP", 5, MSG_CONFIRM) == -1)
9.158 + return -1;
9.159 +
9.160 + cmd = g_strdup_printf ("%s %s %s %d %f %s %d %d %d %d %s",
9.161 + file_name, mux, vcodec, vbitrate, fps,
9.162 + acodec, abitrate, width, height, port, opt);
9.163 +
9.164 +
9.165 + if (send (priv->sock, cmd, strlen (cmd), MSG_CONFIRM) == -1) {
9.166 + g_free (cmd);
9.167 + return -1;
9.168 + }
9.169 + g_free (cmd);
9.170 +
9.171 +
9.172 + data = g_new0 (StreamData, 1);
9.173 + data->id = stream_id;
9.174 + data->port = port;
9.175 +
9.176 + priv->streams = g_list_append (priv->streams, data);
9.177 + return stream_id;
9.178 +}
9.179 +
9.180 +gboolean
9.181 +gmyth_stream_client_play_stream (GMythStreamClient *self,
9.182 + guint stream_id)
9.183 +{
9.184 + GMythStreamClientPrivate *priv = GMYTH_STREAM_CLIENT_GET_PRIVATE (self);
9.185 +
9.186 + g_return_val_if_fail (priv->connected == TRUE, FALSE);
9.187 +
9.188 + if (send (priv->sock, "PLAY", 4, MSG_MORE) == -1) {
9.189 + return FALSE;
9.190 + }
9.191 + return TRUE;
9.192 +}
9.193 +
9.194 +void
9.195 +gmyth_stream_client_pause_stream (GMythStreamClient *self,
9.196 + guint stream_id)
9.197 +{
9.198 + GMythStreamClientPrivate *priv = GMYTH_STREAM_CLIENT_GET_PRIVATE (self);
9.199 +
9.200 + g_return_if_fail (priv->connected == TRUE);
9.201 +
9.202 + if (send (priv->sock, "PAUSE", 5, MSG_MORE) == -1) {
9.203 + return;
9.204 + }
9.205 +}
9.206 +
9.207 +void
9.208 +gmyth_stream_client_close_stream (GMythStreamClient *self,
9.209 + guint stream_id)
9.210 +{
9.211 + GMythStreamClientPrivate *priv = GMYTH_STREAM_CLIENT_GET_PRIVATE (self);
9.212 +
9.213 + g_return_if_fail (priv->connected == TRUE);
9.214 +
9.215 + if (send (priv->sock, "STOP", 4, MSG_MORE) == -1) {
9.216 + return;
9.217 + }
9.218 +
9.219 + //TODO: remove from streams list
9.220 +
9.221 +}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/gmyth-stream/client/src/gmyth-stream-client.h Tue Apr 03 19:42:17 2007 +0100
10.3 @@ -0,0 +1,60 @@
10.4 +#ifndef __GMYTH_STREAM_CLIENT_H__
10.5 +#define __GMYTH_STREAM_CLIENT_H__
10.6 +
10.7 +#include <glib-object.h>
10.8 +
10.9 +G_BEGIN_DECLS
10.10 +
10.11 +typedef struct _GMythStreamClient GMythStreamClient;
10.12 +typedef struct _GMythStreamClientClass GMythStreamClientClass;
10.13 +
10.14 +struct _GMythStreamClientClass {
10.15 + GObjectClass parent_class;
10.16 +};
10.17 +
10.18 +struct _GMythStreamClient {
10.19 + GObject parent;
10.20 +};
10.21 +
10.22 +/* TYPE MACROS */
10.23 +#define GMYTH_TYPE_STREAM_CLIENT \
10.24 + (gmyth_stream_client_get_type())
10.25 +#define GMYTH_STREAM_CLIENT(obj) \
10.26 + (G_TYPE_CHECK_INSTANCE_CAST((obj), GMYTH_TYPE_STREAM_CLIENT, GMythStreamClient))
10.27 +#define GMYTH_STREAM_CLIENT_CLASS(klass) \
10.28 + (G_TYPE_CHECK_CLASS_CAST((klass), GMYTH_TYPE_STREAM_CLIENT, GMythStreamClientClass))
10.29 +#define GMYTH_IS_STREAM_CLIENT(obj) \
10.30 + (G_TYPE_CHECK_INSTANCE_TYPE((obj), GMYTH_TYPE_STREAM_CLIENT))
10.31 +#define GMYTH_IS_STREAM_CLIENT_CLASS(klass) \
10.32 + (G_TYPE_CHECK_CLASS_TYPE((klass), GMYTH_TYPE_STREAM_CLIENT))
10.33 +#define GMYTH_STREAM_CLIENT_GET_CLASS(obj) \
10.34 + (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_TYPE_STREAM_CLIENT, GMythStreamClientClass))
10.35 +
10.36 +
10.37 +GType gmyth_stream_client_get_type (void);
10.38 +GMythStreamClient* gmyth_stream_client_new (void);
10.39 +gboolean gmyth_stream_client_connect (GMythStreamClient *self,
10.40 + const gchar *server, guint port);
10.41 +void gmyth_stream_client_disconnect (GMythStreamClient *self);
10.42 +guint gmyth_stream_client_open_stream (GMythStreamClient *self,
10.43 + const gchar* file_name,
10.44 + const gchar* mux,
10.45 + const gchar* vcodec,
10.46 + guint vbitrate,
10.47 + gdouble fps,
10.48 + const gchar* acodec,
10.49 + guint abitrate,
10.50 + guint width, guint height,
10.51 + guint port,
10.52 + const gchar* opt);
10.53 +gboolean gmyth_stream_client_play_stream (GMythStreamClient *self,
10.54 + guint stream_id);
10.55 +void gmyth_stream_client_pause_stream(GMythStreamClient *self,
10.56 + guint stream_id);
10.57 +void gmyth_stream_client_close_stream (GMythStreamClient *self,
10.58 + guint stream_id);
10.59 +
10.60 +
10.61 +G_END_DECLS
10.62 +
10.63 +#endif
11.1 --- a/gmyth-stream/server/stream.conf Tue Apr 03 19:39:23 2007 +0100
11.2 +++ b/gmyth-stream/server/stream.conf Tue Apr 03 19:42:17 2007 +0100
11.3 @@ -4,7 +4,7 @@
11.4
11.5
11.6 [Media]
11.7 -engine = mencoder
11.8 +engine = gstreamer
11.9
11.10
11.11 [Vlc]