Mercurial > mplayer.hg
comparison stream/stream_rtp.c @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | a26e50cae389 |
children | 9494acd724a9 |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
46 if (!stream) | 46 if (!stream) |
47 return -1; | 47 return -1; |
48 | 48 |
49 streaming_ctrl = stream->streaming_ctrl; | 49 streaming_ctrl = stream->streaming_ctrl; |
50 fd = stream->fd; | 50 fd = stream->fd; |
51 | 51 |
52 if (fd < 0) | 52 if (fd < 0) |
53 { | 53 { |
54 fd = udp_open_socket (streaming_ctrl->url); | 54 fd = udp_open_socket (streaming_ctrl->url); |
55 if (fd < 0) | 55 if (fd < 0) |
56 return -1; | 56 return -1; |
57 stream->fd = fd; | 57 stream->fd = fd; |
58 } | 58 } |
59 | 59 |
60 streaming_ctrl->streaming_read = rtp_streaming_read; | 60 streaming_ctrl->streaming_read = rtp_streaming_read; |
61 streaming_ctrl->streaming_seek = nop_streaming_seek; | 61 streaming_ctrl->streaming_seek = nop_streaming_seek; |
62 streaming_ctrl->prebuffer_size = 64 * 1024; /* 64 KBytes */ | 62 streaming_ctrl->prebuffer_size = 64 * 1024; /* 64 KBytes */ |
63 streaming_ctrl->buffering = 0; | 63 streaming_ctrl->buffering = 0; |
64 streaming_ctrl->status = streaming_playing_e; | 64 streaming_ctrl->status = streaming_playing_e; |
65 | 65 |
66 return 0; | 66 return 0; |
67 } | 67 } |
68 | 68 |
69 static int | 69 static int |
70 rtp_stream_open (stream_t *stream, int mode, void *opts, int *file_format) | 70 rtp_stream_open (stream_t *stream, int mode, void *opts, int *file_format) |
71 { | 71 { |
72 URL_t *url; | 72 URL_t *url; |
73 extern int network_bandwidth; | 73 extern int network_bandwidth; |
74 | 74 |
75 mp_msg (MSGT_OPEN, MSGL_INFO, "STREAM_RTP, URL: %s\n", stream->url); | 75 mp_msg (MSGT_OPEN, MSGL_INFO, "STREAM_RTP, URL: %s\n", stream->url); |
76 stream->streaming_ctrl = streaming_ctrl_new (); | 76 stream->streaming_ctrl = streaming_ctrl_new (); |
77 if (!stream->streaming_ctrl) | 77 if (!stream->streaming_ctrl) |
78 return STREAM_ERROR; | 78 return STREAM_ERROR; |
79 | 79 |
85 { | 85 { |
86 mp_msg (MSGT_NETWORK, MSGL_ERR, | 86 mp_msg (MSGT_NETWORK, MSGL_ERR, |
87 "You must enter a port number for RTP streams!\n"); | 87 "You must enter a port number for RTP streams!\n"); |
88 streaming_ctrl_free (stream->streaming_ctrl); | 88 streaming_ctrl_free (stream->streaming_ctrl); |
89 stream->streaming_ctrl = NULL; | 89 stream->streaming_ctrl = NULL; |
90 | 90 |
91 return STREAM_UNSUPPORTED; | 91 return STREAM_UNSUPPORTED; |
92 } | 92 } |
93 | 93 |
94 if (rtp_streaming_start (stream) < 0) | 94 if (rtp_streaming_start (stream) < 0) |
95 { | 95 { |
96 mp_msg (MSGT_NETWORK, MSGL_ERR, "rtp_streaming_start failed\n"); | 96 mp_msg (MSGT_NETWORK, MSGL_ERR, "rtp_streaming_start failed\n"); |
97 streaming_ctrl_free (stream->streaming_ctrl); | 97 streaming_ctrl_free (stream->streaming_ctrl); |
98 stream->streaming_ctrl = NULL; | 98 stream->streaming_ctrl = NULL; |
99 | 99 |
100 return STREAM_UNSUPPORTED; | 100 return STREAM_UNSUPPORTED; |
101 } | 101 } |
102 | 102 |
103 stream->type = STREAMTYPE_STREAM; | 103 stream->type = STREAMTYPE_STREAM; |
104 fixup_network_stream_cache (stream); | 104 fixup_network_stream_cache (stream); |
105 | 105 |
106 return STREAM_OK; | 106 return STREAM_OK; |
107 } | 107 } |
108 | 108 |
109 const stream_info_t stream_info_rtp = { | 109 const stream_info_t stream_info_rtp = { |
110 "MPEG over RTP streaming", | 110 "MPEG over RTP streaming", |