gmyth/src/gmyth_vlc.h
branchtrunk
changeset 329 818deb9ae65d
child 349 7005e696052c
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gmyth/src/gmyth_vlc.h	Wed Feb 07 00:03:05 2007 +0000
     1.3 @@ -0,0 +1,97 @@
     1.4 +/**
     1.5 + * GMyth Library
     1.6 + *
     1.7 + * @file gmyth/gmyth_vlc.c
     1.8 + * 
     1.9 + * @brief <p> GMythVLC library provides functions that
    1.10 + * interact with a VLC server running telnet interface.
    1.11 + *
    1.12 + * Copyright (C) 2007 INdT - Instituto Nokia de Tecnologia.
    1.13 + * @author Artur Duque de Souza <artur.souza@indt.org.br>
    1.14 + *
    1.15 + * 
    1.16 + * This program is free software; you can redistribute it and/or modify
    1.17 + * it under the terms of the GNU Lesser General Public License as published by
    1.18 + * the Free Software Foundation; either version 2 of the License, or
    1.19 + * (at your option) any later version.
    1.20 + *
    1.21 + * This program is distributed in the hope that it will be useful,
    1.22 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.23 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.24 + * GNU General Public License for more details.
    1.25 + *
    1.26 + * You should have received a copy of the GNU Lesser General Public License
    1.27 + * along with this program; if not, write to the Free Software
    1.28 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.29 + */
    1.30 +
    1.31 +#ifndef __GMYTH_VLC_H__
    1.32 +#define __GMYTH_VLC_H__
    1.33 +
    1.34 +#include <glib-object.h>
    1.35 +
    1.36 +#include <glib.h>
    1.37 +#include <stdio.h>
    1.38 +#include <stdlib.h>
    1.39 +#include <unistd.h>
    1.40 +#include <errno.h>
    1.41 +#include <string.h>
    1.42 +#include <netdb.h>
    1.43 +#include <sys/types.h>
    1.44 +#include <netinet/in.h>
    1.45 +#include <sys/socket.h>
    1.46 +
    1.47 +
    1.48 +#include "gmyth_backendinfo.h"
    1.49 +#include "gmyth_util.h"
    1.50 +
    1.51 +G_BEGIN_DECLS
    1.52 +
    1.53 +#define VLC_TELNET_PORT 4212
    1.54 +#define BUFFER 512
    1.55 +
    1.56 +typedef struct _GMythVlc GMythVlc;
    1.57 +
    1.58 +struct _GMythVlc
    1.59 +{
    1.60 +  int sockfd;
    1.61 +
    1.62 +  // Number of outputs used
    1.63 +  int n_outputs;
    1.64 +
    1.65 +  // Number of inputs
    1.66 +  int n_inputs;
    1.67 +
    1.68 +  // Socket vars
    1.69 +  struct hostent *he;
    1.70 +  struct sockaddr_in their_addr;
    1.71 +
    1.72 +  char buf[BUFFER];
    1.73 +};
    1.74 +
    1.75 +
    1.76 +
    1.77 +int gmyth_vlc_setup_output(GMythVlc *vlc, int output, \
    1.78 +                           gchar* kind, gchar* opts);
    1.79 +
    1.80 +
    1.81 +int gmyth_vlc_clean_playlist(GMythVlc *vlc);
    1.82 +
    1.83 +
    1.84 +int gmyth_vlc_control_input(GMythVlc *vlc, int output, \
    1.85 +                            gchar* command);
    1.86 +
    1.87 +int gmyth_vlc_create_input(GMythVlc *vlc, int output,\
    1.88 +                           gchar* file);
    1.89 +
    1.90 +int gmyth_vlc_create_channel(GMythVlc *vlc, gchar* type,\
    1.91 +                             int port);
    1.92 +
    1.93 +int gmyth_vlc_connect(GMythVlc *vlc, GMythBackendInfo *backend_info,\
    1.94 +                      gchar* passwd);
    1.95 +
    1.96 +int gmyth_vlc_disconnect(GMythVlc *vlc);
    1.97 +
    1.98 +G_END_DECLS
    1.99 +
   1.100 +#endif /* __GMYTH_VLC_H__ */