~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/rtpproto.c

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 * @return zero if no error.
61
61
 */
62
62
 
63
 
int rtp_set_remote_url(URLContext *h, const char *uri)
 
63
int ff_rtp_set_remote_url(URLContext *h, const char *uri)
64
64
{
65
65
    RTPContext *s = h->priv_data;
66
66
    char hostname[256];
86
86
 * "http://host:port/path?option1=val1&option2=val2...
87
87
 */
88
88
 
89
 
static void url_add_option(char *buf, int buf_size, const char *fmt, ...)
 
89
static av_printf_format(3, 4) void url_add_option(char *buf, int buf_size, const char *fmt, ...)
90
90
{
91
91
    char buf1[1024];
92
92
    va_list ap;
136
136
 
137
137
static int rtp_open(URLContext *h, const char *uri, int flags)
138
138
{
139
 
    RTPContext *s;
 
139
    RTPContext *s = h->priv_data;
140
140
    int rtp_port, rtcp_port,
141
141
        ttl, connect,
142
142
        local_rtp_port, local_rtcp_port, max_packet_size;
145
145
    char path[1024];
146
146
    const char *p;
147
147
 
148
 
    s = av_mallocz(sizeof(RTPContext));
149
 
    if (!s)
150
 
        return AVERROR(ENOMEM);
151
 
    h->priv_data = s;
152
 
 
153
148
    av_url_split(NULL, 0, NULL, 0, hostname, sizeof(hostname), &rtp_port,
154
149
                 path, sizeof(path), uri);
155
150
    /* extract parameters */
188
183
    build_udp_url(buf, sizeof(buf),
189
184
                  hostname, rtp_port, local_rtp_port, ttl, max_packet_size,
190
185
                  connect);
191
 
    if (ffurl_open(&s->rtp_hd, buf, flags) < 0)
 
186
    if (ffurl_open(&s->rtp_hd, buf, flags, &h->interrupt_callback, NULL) < 0)
192
187
        goto fail;
193
188
    if (local_rtp_port>=0 && local_rtcp_port<0)
194
189
        local_rtcp_port = ff_udp_get_local_port(s->rtp_hd) + 1;
196
191
    build_udp_url(buf, sizeof(buf),
197
192
                  hostname, rtcp_port, local_rtcp_port, ttl, max_packet_size,
198
193
                  connect);
199
 
    if (ffurl_open(&s->rtcp_hd, buf, flags) < 0)
 
194
    if (ffurl_open(&s->rtcp_hd, buf, flags, &h->interrupt_callback, NULL) < 0)
200
195
        goto fail;
201
196
 
202
197
    /* just to ease handle access. XXX: need to suppress direct handle
213
208
        ffurl_close(s->rtp_hd);
214
209
    if (s->rtcp_hd)
215
210
        ffurl_close(s->rtcp_hd);
216
 
    av_free(s);
217
211
    return AVERROR(EIO);
218
212
}
219
213
 
225
219
    int len, n;
226
220
    struct pollfd p[2] = {{s->rtp_fd, POLLIN, 0}, {s->rtcp_fd, POLLIN, 0}};
227
221
 
228
 
#if 0
229
 
    for(;;) {
230
 
        from_len = sizeof(from);
231
 
        len = recvfrom (s->rtp_fd, buf, size, 0,
232
 
                        (struct sockaddr *)&from, &from_len);
233
 
        if (len < 0) {
234
 
            if (ff_neterrno() == AVERROR(EAGAIN) ||
235
 
                ff_neterrno() == AVERROR(EINTR))
236
 
                continue;
237
 
            return AVERROR(EIO);
238
 
        }
239
 
        break;
240
 
    }
241
 
#else
242
 
    for(;;) {
243
 
        if (url_interrupt_cb())
 
222
    for(;;) {
 
223
        if (ff_check_interrupt(&h->interrupt_callback))
244
224
            return AVERROR_EXIT;
245
225
        /* build fdset to listen to RTP and RTCP packets */
246
226
        n = poll(p, 2, 100);
277
257
            return AVERROR(EIO);
278
258
        }
279
259
    }
280
 
#endif
281
260
    return len;
282
261
}
283
262
 
296
275
    }
297
276
 
298
277
    ret = ffurl_write(hd, buf, size);
299
 
#if 0
300
 
    {
301
 
        struct timespec ts;
302
 
        ts.tv_sec = 0;
303
 
        ts.tv_nsec = 10 * 1000000;
304
 
        nanosleep(&ts, NULL);
305
 
    }
306
 
#endif
307
278
    return ret;
308
279
}
309
280
 
313
284
 
314
285
    ffurl_close(s->rtp_hd);
315
286
    ffurl_close(s->rtcp_hd);
316
 
    av_free(s);
317
287
    return 0;
318
288
}
319
289
 
323
293
 * @return the local port number
324
294
 */
325
295
 
326
 
int rtp_get_local_rtp_port(URLContext *h)
 
296
int ff_rtp_get_local_rtp_port(URLContext *h)
327
297
{
328
298
    RTPContext *s = h->priv_data;
329
299
    return ff_udp_get_local_port(s->rtp_hd);
335
305
 * @return the local port number
336
306
 */
337
307
 
338
 
int rtp_get_local_rtcp_port(URLContext *h)
 
308
int ff_rtp_get_local_rtcp_port(URLContext *h)
339
309
{
340
310
    RTPContext *s = h->priv_data;
341
311
    return ff_udp_get_local_port(s->rtcp_hd);
347
317
    return s->rtp_fd;
348
318
}
349
319
 
350
 
int rtp_get_rtcp_file_handle(URLContext *h) {
 
320
int ff_rtp_get_rtcp_file_handle(URLContext *h) {
351
321
    RTPContext *s = h->priv_data;
352
322
    return s->rtcp_fd;
353
323
}
359
329
    .url_write           = rtp_write,
360
330
    .url_close           = rtp_close,
361
331
    .url_get_file_handle = rtp_get_file_handle,
 
332
    .priv_data_size      = sizeof(RTPContext),
 
333
    .flags               = URL_PROTOCOL_FLAG_NETWORK,
362
334
};