toolbox

Check-in [cf6db36e7b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:radio: cosmetic changes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: cf6db36e7b9fb8dd02d4df49642b2894a034ba3fab7a3db3d55ebfa348bfc35d
User & Date: jef 2019-08-04 14:42:18
Context
2019-08-04
15:19
arte7dump: use a struct for json search patterns check-in: f2f1081b64 user: jef tags: trunk
14:42
radio: cosmetic changes check-in: cf6db36e7b user: jef tags: trunk
13:03
radio: add Vertical Radio check-in: bf1de8151f user: jef tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/radio/radio.c.

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
};

void
print_stream_title(const char *str)
{
	char *label = "StreamTitle='";
	char *pos = strstr(str, label);
	if (pos == NULL) {
		return;
	}
	pos += strlen(label);
	char *posend = strstr(pos, "';");
	if (posend && posend > pos) {
		fwrite(pos, 1, posend - pos, stdout);
		puts("");
		fflush(stdout);
	}
................................................................................

	/* the current stream provide icy metadata */
	ssize_t toread, towrite;
	toread = size;
	static ssize_t nicy = 0;
	static ssize_t ndata = -1;

	if (ndata < 0) {
		ndata = player->metaint;
	}

	while (toread > 0) {
		if (nicy > 0) {
			size_t towrite = MIN(nicy, toread);
			memcpy(player->metadataend, httpdata, towrite);
			httpdata += towrite;
			player->metadataend += towrite;







|

<







 







|

<







120
121
122
123
124
125
126
127
128

129
130
131
132
133
134
135
...
167
168
169
170
171
172
173
174
175

176
177
178
179
180
181
182
};

void
print_stream_title(const char *str)
{
	char *label = "StreamTitle='";
	char *pos = strstr(str, label);
	if (pos == NULL)
		return;

	pos += strlen(label);
	char *posend = strstr(pos, "';");
	if (posend && posend > pos) {
		fwrite(pos, 1, posend - pos, stdout);
		puts("");
		fflush(stdout);
	}
................................................................................

	/* the current stream provide icy metadata */
	ssize_t toread, towrite;
	toread = size;
	static ssize_t nicy = 0;
	static ssize_t ndata = -1;

	if (ndata < 0)
		ndata = player->metaint;


	while (toread > 0) {
		if (nicy > 0) {
			size_t towrite = MIN(nicy, toread);
			memcpy(player->metadataend, httpdata, towrite);
			httpdata += towrite;
			player->metadataend += towrite;