Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: source/patched-ffmpeg-mt/libavformat/rtpproto.c

Issue 4533003: patched ffmpeg nov 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * RTP network protocol 2 * RTP network protocol
3 * Copyright (c) 2002 Fabrice Bellard 3 * Copyright (c) 2002 Fabrice Bellard
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 * @return the local port number 321 * @return the local port number
322 */ 322 */
323 323
324 int rtp_get_local_rtp_port(URLContext *h) 324 int rtp_get_local_rtp_port(URLContext *h)
325 { 325 {
326 RTPContext *s = h->priv_data; 326 RTPContext *s = h->priv_data;
327 return udp_get_local_port(s->rtp_hd); 327 return udp_get_local_port(s->rtp_hd);
328 } 328 }
329 329
330 /** 330 /**
331 * Return the local rtp port used by the RTP connection
332 * @param h media file context
333 * @return the local port number
334 */
335
336 int rtp_get_local_port(URLContext *h)
337 {
338 RTPContext *s = h->priv_data;
339 return udp_get_local_port(s->rtp_hd);
340 }
341
342 /**
343 * Return the local rtcp port used by the RTP connection 331 * Return the local rtcp port used by the RTP connection
344 * @param h media file context 332 * @param h media file context
345 * @return the local port number 333 * @return the local port number
346 */ 334 */
347 335
348 int rtp_get_local_rtcp_port(URLContext *h) 336 int rtp_get_local_rtcp_port(URLContext *h)
349 { 337 {
350 RTPContext *s = h->priv_data; 338 RTPContext *s = h->priv_data;
351 return udp_get_local_port(s->rtcp_hd); 339 return udp_get_local_port(s->rtcp_hd);
352 } 340 }
353 341
354 #if (LIBAVFORMAT_VERSION_MAJOR <= 52)
355 /**
356 * Return the rtp and rtcp file handles for select() usage to wait for
357 * several RTP streams at the same time.
358 * @param h media file context
359 */
360
361 void rtp_get_file_handles(URLContext *h, int *prtp_fd, int *prtcp_fd)
362 {
363 RTPContext *s = h->priv_data;
364
365 *prtp_fd = s->rtp_fd;
366 *prtcp_fd = s->rtcp_fd;
367 }
368 #endif
369
370 static int rtp_get_file_handle(URLContext *h) 342 static int rtp_get_file_handle(URLContext *h)
371 { 343 {
372 RTPContext *s = h->priv_data; 344 RTPContext *s = h->priv_data;
373 return s->rtp_fd; 345 return s->rtp_fd;
374 } 346 }
375 347
376 int rtp_get_rtcp_file_handle(URLContext *h) { 348 int rtp_get_rtcp_file_handle(URLContext *h) {
377 RTPContext *s = h->priv_data; 349 RTPContext *s = h->priv_data;
378 return s->rtcp_fd; 350 return s->rtcp_fd;
379 } 351 }
380 352
381 URLProtocol rtp_protocol = { 353 URLProtocol rtp_protocol = {
382 "rtp", 354 "rtp",
383 rtp_open, 355 rtp_open,
384 rtp_read, 356 rtp_read,
385 rtp_write, 357 rtp_write,
386 NULL, /* seek */ 358 NULL, /* seek */
387 rtp_close, 359 rtp_close,
388 .url_get_file_handle = rtp_get_file_handle, 360 .url_get_file_handle = rtp_get_file_handle,
389 }; 361 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698