~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavformat/network.h

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc, Andrew Starr-Bochicchio, Lionel Le Folgoc
  • Date: 2008-12-26 00:10:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081226001006-2040ls9680bd1blt
Tags: 1.1.7-0.2ubuntu1
[ Andrew Starr-Bochicchio ]
* Merge from debian-multimedia (LP: #298547), Ubuntu Changes:
 - For ffmpeg-related build-deps, fix versionized dependencies
   as the ubuntu versioning is different than debian-multimedia's.

[ Lionel Le Folgoc ]
* LP: #311412 is fixed since the 1.1.7~rc1-0.1 revision.
* debian/patches/03_ffmpeg.diff: updated to fix FTBFS due to libswscale API
  change (cherry-pick from Gentoo #234383).

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
19
 */
20
20
 
21
 
#ifndef NETWORK_H
22
 
#define NETWORK_H
23
 
 
 
21
#ifndef FFMPEG_NETWORK_H
 
22
#define FFMPEG_NETWORK_H
 
23
 
 
24
#ifdef HAVE_WINSOCK2_H
 
25
#include <winsock2.h>
 
26
#include <ws2tcpip.h>
 
27
 
 
28
#define ff_neterrno() WSAGetLastError()
 
29
#define FF_NETERROR(err) WSA##err
 
30
#define WSAEAGAIN WSAEWOULDBLOCK
 
31
#else
24
32
#include <sys/types.h>
25
33
#include <sys/socket.h>
26
34
#include <netinet/in.h>
 
35
#include <netdb.h>
 
36
 
 
37
#define ff_neterrno() errno
 
38
#define FF_NETERROR(err) err
 
39
#endif
 
40
 
 
41
#ifdef HAVE_ARPA_INET_H
27
42
#include <arpa/inet.h>
28
 
#include <netdb.h>
29
 
 
30
 
#endif
 
43
#endif
 
44
 
 
45
int ff_socket_nonblock(int socket, int enable);
 
46
 
 
47
static inline int ff_network_init(void)
 
48
{
 
49
#ifdef HAVE_WINSOCK2_H
 
50
    WSADATA wsaData;
 
51
    if (WSAStartup(MAKEWORD(1,1), &wsaData))
 
52
        return 0;
 
53
#endif
 
54
    return 1;
 
55
}
 
56
 
 
57
static inline void ff_network_close(void)
 
58
{
 
59
#ifdef HAVE_WINSOCK2_H
 
60
    WSACleanup();
 
61
#endif
 
62
}
 
63
 
 
64
#if !defined(HAVE_INET_ATON)
 
65
/* in os_support.c */
 
66
int inet_aton (const char * str, struct in_addr * add);
 
67
#endif
 
68
 
 
69
#endif /* FFMPEG_NETWORK_H */