summaryrefslogtreecommitdiff
path: root/telepathy-farsight/stream-priv.h
blob: 3e82a180e1699279f53d4fbcaaf07261f8ba6ae0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef __TF_STREAM_PRIV_H__
#define __TF_STREAM_PRIV_H__

#include "stream.h"

G_BEGIN_DECLS

typedef struct _TfStreamPrivate TfStreamPrivate;

/*
 * TfStream:
 * @parent: the parent #GObject
 * @stream_id: the ID of the stream (READ-ONLY)
 *
 * All other members are privated
 */

struct _TfStream {
  GObject parent;

  /* Read-only */
  guint stream_id;

  /*< private >*/

  TfStreamPrivate *priv;
};

/*
 * TfStreamClass:
 * @parent_class: the parent #GObjecClass
 *
 * There are no overridable functions
 */

struct _TfStreamClass {
  GObjectClass parent_class;

  /*< private >*/

  gpointer unused[4];
};


typedef struct {
  gchar *nat_traversal;
  gchar *stun_server;
  guint16 stun_port;
  gchar *relay_token;
} TfNatProperties;

typedef void (NewStreamCreatedCb) (TfStream *stream, gpointer channel);

TfStream *
_tf_stream_new (gpointer channel,
    FsConference *conference,
    FsParticipant *participant,
    TpMediaStreamHandler *proxy,
    guint stream_id,
    TpMediaStreamType media_type,
    TpMediaStreamDirection direction,
    TfNatProperties *nat_props,
    GList *local_codecs_config,
    NewStreamCreatedCb new_stream_created_cb);

gboolean _tf_stream_bus_message (TfStream *stream,
    GstMessage *message);

void _tf_stream_try_sending_codecs (TfStream *stream);

TpMediaStreamError fserror_to_tperror (GError *error);

G_END_DECLS

#endif /* __TF_STREAM_PRIV_H__ */