Mercurial > mplayer.hg
comparison stream/asf_mmst_streaming.c @ 27359:d788e177a35e
Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;
CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff.
author | diego |
---|---|
date | Fri, 01 Aug 2008 20:28:58 +0000 |
parents | e7c989f7a7c9 |
children | 4876c89bafdd |
comparison
equal
deleted
inserted
replaced
27358:e736897cf006 | 27359:d788e177a35e |
---|---|
44 #else | 44 #else |
45 #include <winsock2.h> | 45 #include <winsock2.h> |
46 #endif | 46 #endif |
47 | 47 |
48 #ifndef CONFIG_SETLOCALE | 48 #ifndef CONFIG_SETLOCALE |
49 #undef CONFIG_ICONV | 49 #undef HAVE_ICONV |
50 #endif | 50 #endif |
51 | 51 |
52 #ifdef CONFIG_ICONV | 52 #ifdef HAVE_ICONV |
53 #include <iconv.h> | 53 #include <iconv.h> |
54 #ifdef CONFIG_LANGINFO | 54 #ifdef HAVE_LANGINFO |
55 #include <langinfo.h> | 55 #include <langinfo.h> |
56 #endif | 56 #endif |
57 #endif | 57 #endif |
58 | 58 |
59 #include "url.h" | 59 #include "url.h" |
141 if (send (s, cmd.buf, len8*8+48, 0) != (len8*8+48)) { | 141 if (send (s, cmd.buf, len8*8+48, 0) != (len8*8+48)) { |
142 mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_WriteError); | 142 mp_msg(MSGT_NETWORK,MSGL_ERR,MSGTR_MPDEMUX_MMST_WriteError); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 #ifdef CONFIG_ICONV | 146 #ifdef HAVE_ICONV |
147 static iconv_t url_conv; | 147 static iconv_t url_conv; |
148 #endif | 148 #endif |
149 | 149 |
150 static void string_utf16(char *dest, char *src, int len) { | 150 static void string_utf16(char *dest, char *src, int len) { |
151 int i; | 151 int i; |
152 #ifdef CONFIG_ICONV | 152 #ifdef HAVE_ICONV |
153 size_t len1, len2; | 153 size_t len1, len2; |
154 char *ip, *op; | 154 char *ip, *op; |
155 | 155 |
156 if (url_conv != (iconv_t)(-1)) | 156 if (url_conv != (iconv_t)(-1)) |
157 { | 157 { |
170 dest[i*2+1] = 0; | 170 dest[i*2+1] = 0; |
171 } | 171 } |
172 /* trailing zeroes */ | 172 /* trailing zeroes */ |
173 dest[i*2] = 0; | 173 dest[i*2] = 0; |
174 dest[i*2+1] = 0; | 174 dest[i*2+1] = 0; |
175 #ifdef CONFIG_ICONV | 175 #ifdef HAVE_ICONV |
176 } | 176 } |
177 #endif | 177 #endif |
178 } | 178 } |
179 | 179 |
180 static void get_answer (int s) | 180 static void get_answer (int s) |
573 * This command is sent at the very start of protocol initiation. It sends local information to the serve | 573 * This command is sent at the very start of protocol initiation. It sends local information to the serve |
574 * cmd 1 0x01 | 574 * cmd 1 0x01 |
575 * */ | 575 * */ |
576 | 576 |
577 /* prepare for the url encoding conversion */ | 577 /* prepare for the url encoding conversion */ |
578 #ifdef CONFIG_ICONV | 578 #ifdef HAVE_ICONV |
579 #ifdef CONFIG_LANGINFO | 579 #ifdef HAVE_LANGINFO |
580 url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); | 580 url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET)); |
581 #else | 581 #else |
582 url_conv = iconv_open("UTF-16LE", NULL); | 582 url_conv = iconv_open("UTF-16LE", NULL); |
583 #endif | 583 #endif |
584 #endif | 584 #endif |
688 stream->streaming_ctrl->status = streaming_playing_e; | 688 stream->streaming_ctrl->status = streaming_playing_e; |
689 | 689 |
690 packet_length1 = packet_length; | 690 packet_length1 = packet_length; |
691 mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length); | 691 mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length); |
692 | 692 |
693 #ifdef CONFIG_ICONV | 693 #ifdef HAVE_ICONV |
694 if (url_conv != (iconv_t)(-1)) | 694 if (url_conv != (iconv_t)(-1)) |
695 iconv_close(url_conv); | 695 iconv_close(url_conv); |
696 #endif | 696 #endif |
697 | 697 |
698 return 0; | 698 return 0; |