History

Define macro AV_NE() and use it in libavdevice.

Help further refactoring. Originally committed as revision 24814 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 4f2d2e41 parent 3f52a904 files · +10 −11Browse files

Unified · Split

4 files
  1. libavdevice/alsa-audio.h +1 −5
  2. libavdevice/oss_audio.c +1 −5
  3. libavutil/avutil.h +1 −1
  4. libavutil/common.h +7 −0
libavdevice/alsa-audio.h+1−5
@@ -37,11 +37,7 @@ · 36 unmodified lines
3737 /* XXX: we make the assumption that the soundcard accepts this format */
3838 /* XXX: find better solution with "preinit" method, needed also in
3939 other formats */
40−#if HAVE_BIGENDIAN
41−#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16BE
42−#else
43−#define DEFAULT_CODEC_ID CODEC_ID_PCM_S16LE
44−#endif
40+#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
4541
4642 typedef struct {
4743 snd_pcm_t *h;
libavdevice/oss_audio.c+1−5
@@ -315,11 +315,7 @@ AVOutputFormat oss_muxer = { · 314 unmodified lines
315315 /* XXX: we make the assumption that the soundcard accepts this format */
316316 /* XXX: find better solution with "preinit" method, needed also in
317317 other formats */
318−#if HAVE_BIGENDIAN
319− CODEC_ID_PCM_S16BE,
320−#else
321− CODEC_ID_PCM_S16LE,
322−#endif
318+ AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
323319 CODEC_ID_NONE,
324320 audio_write_header,
325321 audio_write_packet,
libavutil/avutil.h+1−1
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 #define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
4141
4242 #define LIBAVUTIL_VERSION_MAJOR 50
43−#define LIBAVUTIL_VERSION_MINOR 23
43+#define LIBAVUTIL_VERSION_MINOR 24
4444 #define LIBAVUTIL_VERSION_MICRO 0
4545
4646 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
libavutil/common.h+7−0
@@ -35,6 +35,13 @@ · 34 unmodified lines
3535 #include <stdlib.h>
3636 #include <string.h>
3737 #include "attributes.h"
38+#include "avconfig.h"
39+
40+#if AV_HAVE_BIGENDIAN
41+# define AV_NE(be, le) be
42+#else
43+# define AV_NE(be, le) le
44+#endif
3845
3946 //rounded division & shift
4047 #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t