gst_plugins_base/gst/tcp/gsttcpserversrc.c
branchRCL_3
changeset 30 7e817e7e631c
parent 29 567bb019e3e3
equal deleted inserted replaced
29:567bb019e3e3 30:7e817e7e631c
    16  * License along with this library; if not, write to the
    16  * License along with this library; if not, write to the
    17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    18  * Boston, MA 02111-1307, USA.
    18  * Boston, MA 02111-1307, USA.
    19  */
    19  */
    20 
    20 
    21 /**
       
    22  * SECTION:element-tcpserversrc
       
    23  * @see_also: #tcpserversink
       
    24  *
       
    25  * <refsect2>
       
    26  * <title>Example launch line</title>
       
    27  * |[
       
    28  * # server:
       
    29  * gst-launch tcpserversrc protocol=none port=3000 ! fdsink fd=2
       
    30  * # client:
       
    31  * gst-launch fdsrc fd=1 ! tcpclientsink protocol=none port=3000
       
    32  * ]| 
       
    33  * </refsect2>
       
    34  */
       
    35 
    21 
    36 #ifdef HAVE_CONFIG_H
    22 #ifdef HAVE_CONFIG_H
    37 #include "config.h"
    23 #include "config.h"
    38 #endif
    24 #endif
    39 
    25 
       
    26 #ifdef __SYMBIAN32__
       
    27 #include "gst/gst-i18n-plugin.h"
       
    28 #else
    40 #include <gst/gst-i18n-plugin.h>
    29 #include <gst/gst-i18n-plugin.h>
       
    30 #endif
    41 #include "gsttcp.h"
    31 #include "gsttcp.h"
    42 #include "gsttcpserversrc.h"
    32 #include "gsttcpserversrc.h"
    43 #include <string.h>             /* memset */
    33 #include <string.h>             /* memset */
    44 #include <unistd.h>
    34 #include <unistd.h>
    45 #include <sys/ioctl.h>
    35 #include <sys/ioctl.h>
   118   gobject_class->get_property = gst_tcp_server_src_get_property;
   108   gobject_class->get_property = gst_tcp_server_src_get_property;
   119   gobject_class->finalize = gst_tcp_server_src_finalize;
   109   gobject_class->finalize = gst_tcp_server_src_finalize;
   120 
   110 
   121   g_object_class_install_property (gobject_class, PROP_HOST,
   111   g_object_class_install_property (gobject_class, PROP_HOST,
   122       g_param_spec_string ("host", "Host", "The hostname to listen as",
   112       g_param_spec_string ("host", "Host", "The hostname to listen as",
   123           TCP_DEFAULT_LISTEN_HOST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   113           TCP_DEFAULT_LISTEN_HOST, G_PARAM_READWRITE));
   124   g_object_class_install_property (gobject_class, PROP_PORT,
   114   g_object_class_install_property (gobject_class, PROP_PORT,
   125       g_param_spec_int ("port", "Port", "The port to listen to",
   115       g_param_spec_int ("port", "Port", "The port to listen to",
   126           0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT,
   116           0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE));
   127           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
       
   128   g_object_class_install_property (gobject_class, PROP_PROTOCOL,
   117   g_object_class_install_property (gobject_class, PROP_PROTOCOL,
   129       g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in",
   118       g_param_spec_enum ("protocol", "Protocol", "The protocol to wrap data in",
   130           GST_TYPE_TCP_PROTOCOL, GST_TCP_PROTOCOL_NONE,
   119           GST_TYPE_TCP_PROTOCOL, GST_TCP_PROTOCOL_NONE, G_PARAM_READWRITE));
   131           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
       
   132 
   120 
   133   gstbasesrc_class->start = gst_tcp_server_src_start;
   121   gstbasesrc_class->start = gst_tcp_server_src_start;
   134   gstbasesrc_class->stop = gst_tcp_server_src_stop;
   122   gstbasesrc_class->stop = gst_tcp_server_src_stop;
   135   gstbasesrc_class->unlock = gst_tcp_server_src_unlock;
   123   gstbasesrc_class->unlock = gst_tcp_server_src_unlock;
   136 
   124