[vlc-commits] packetizers: move state enum in packetizer_helper.h
Rafaël Carré
git at videolan.org
Wed Sep 14 00:10:45 CEST 2011
vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Sep 13 18:02:17 2011 -0400| [d47186c7a6cbe0a1d19ee639b90fe96905d9f6cc] | committer: Rafaël Carré
packetizers: move state enum in packetizer_helper.h
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d47186c7a6cbe0a1d19ee639b90fe96905d9f6cc
---
modules/codec/a52.c | 12 ++----------
modules/codec/dts.c | 12 ++----------
modules/codec/mpeg_audio.c | 12 ++----------
modules/packetizer/flac.c | 11 +----------
modules/packetizer/mlp.c | 12 ++----------
modules/packetizer/mpeg4audio.c | 10 +---------
modules/packetizer/packetizer_helper.h | 6 +++++-
7 files changed, 15 insertions(+), 60 deletions(-)
diff --git a/modules/codec/a52.c b/modules/codec/a52.c
index 6bcfae9..a5d052d 100644
--- a/modules/codec/a52.c
+++ b/modules/codec/a52.c
@@ -39,6 +39,8 @@
#include "a52.h"
+#include "../packetizer/packetizer_helper.h"
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
@@ -85,16 +87,6 @@ struct decoder_sys_t
vlc_a52_header_t frame;
};
-enum {
-
- STATE_NOSYNC,
- STATE_SYNC,
- STATE_HEADER,
- STATE_NEXT_SYNC,
- STATE_GET_DATA,
- STATE_SEND_DATA
-};
-
/****************************************************************************
* Local prototypes
****************************************************************************/
diff --git a/modules/codec/dts.c b/modules/codec/dts.c
index c0e7448..50240ea 100644
--- a/modules/codec/dts.c
+++ b/modules/codec/dts.c
@@ -40,6 +40,8 @@
#include <vlc_modules.h>
#include <vlc_cpu.h>
+#include "../packetizer/packetizer_helper.h"
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
@@ -89,16 +91,6 @@ struct decoder_sys_t
unsigned int i_channels_conf;
};
-enum {
-
- STATE_NOSYNC,
- STATE_SYNC,
- STATE_HEADER,
- STATE_NEXT_SYNC,
- STATE_GET_DATA,
- STATE_SEND_DATA
-};
-
#define DTS_HEADER_SIZE 14
/****************************************************************************
diff --git a/modules/codec/mpeg_audio.c b/modules/codec/mpeg_audio.c
index 26d7278..08dc775 100644
--- a/modules/codec/mpeg_audio.c
+++ b/modules/codec/mpeg_audio.c
@@ -40,6 +40,8 @@
#include <vlc_block_helper.h>
+#include "../packetizer/packetizer_helper.h"
+
/*****************************************************************************
* decoder_sys_t : decoder descriptor
*****************************************************************************/
@@ -71,16 +73,6 @@ struct decoder_sys_t
bool b_discontinuity;
};
-enum {
-
- STATE_NOSYNC,
- STATE_SYNC,
- STATE_HEADER,
- STATE_NEXT_SYNC,
- STATE_GET_DATA,
- STATE_SEND_DATA
-};
-
/* This isn't the place to put mad-specific stuff. However, it makes the
* mad plug-in's life much easier if we put 8 extra bytes at the end of the
* buffer, because that way it doesn't have to copy the aout_buffer_t to a
diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index 5d6ad75..1fef09a 100644
--- a/modules/packetizer/flac.c
+++ b/modules/packetizer/flac.c
@@ -36,6 +36,7 @@
#include <vlc_block_helper.h>
#include <vlc_bits.h>
+#include "packetizer_helper.h"
/*****************************************************************************
* Module descriptor
@@ -89,16 +90,6 @@ struct decoder_sys_t
unsigned int i_rate, i_channels, i_bits_per_sample;
};
-enum
-{
- STATE_NOSYNC,
- STATE_SYNC,
- STATE_HEADER,
- STATE_NEXT_SYNC,
- STATE_GET_DATA,
- STATE_SEND_DATA
-};
-
/*****************************************************************************
* Local prototypes
*****************************************************************************/
diff --git a/modules/packetizer/mlp.c b/modules/packetizer/mlp.c
index 1b9dc8b..de4c3f5 100644
--- a/modules/packetizer/mlp.c
+++ b/modules/packetizer/mlp.c
@@ -36,6 +36,8 @@
#include <vlc_bits.h>
#include <assert.h>
+#include "packetizer_helper.h"
+
/*****************************************************************************
* Module descriptor
*****************************************************************************/
@@ -89,16 +91,6 @@ struct decoder_sys_t
mlp_header_t mlp;
};
-enum {
-
- STATE_NOSYNC,
- STATE_SYNC,
- STATE_HEADER,
- STATE_NEXT_SYNC,
- STATE_GET_DATA,
- STATE_SEND_DATA
-};
-
#define MLP_MAX_SUBSTREAMS (16)
#define MLP_HEADER_SYNC (28)
#define MLP_HEADER_SIZE (4 + MLP_HEADER_SYNC + 4 * MLP_MAX_SUBSTREAMS)
diff --git a/modules/packetizer/mpeg4audio.c b/modules/packetizer/mpeg4audio.c
index b0de740..6214080 100644
--- a/modules/packetizer/mpeg4audio.c
+++ b/modules/packetizer/mpeg4audio.c
@@ -38,6 +38,7 @@
#include <vlc_bits.h>
#include <vlc_block_helper.h>
+#include "packetizer_helper.h"
#include <assert.h>
@@ -141,15 +142,6 @@ struct decoder_sys_t
};
enum {
- STATE_NOSYNC,
- STATE_SYNC,
- STATE_HEADER,
- STATE_NEXT_SYNC,
- STATE_GET_DATA,
- STATE_SEND_DATA
-};
-
-enum {
TYPE_NONE,
TYPE_RAW,
TYPE_ADTS,
diff --git a/modules/packetizer/packetizer_helper.h b/modules/packetizer/packetizer_helper.h
index bb6f3ed..87f5b05 100644
--- a/modules/packetizer/packetizer_helper.h
+++ b/modules/packetizer/packetizer_helper.h
@@ -29,7 +29,11 @@
enum
{
STATE_NOSYNC,
- STATE_NEXT_SYNC
+ STATE_SYNC,
+ STATE_HEADER,
+ STATE_NEXT_SYNC,
+ STATE_GET_DATA,
+ STATE_SEND_DATA
};
typedef void (*packetizer_reset_t)( void *p_private, bool b_broken );
More information about the vlc-commits
mailing list