[FFmpeg-soc] [soc]: r3177 - in mxf: mxf.h mxfdec.c mxfenc.c

spyfeng subversion at mplayerhq.hu
Tue Aug 12 09:11:56 CEST 2008


Author: spyfeng
Date: Tue Aug 12 09:11:56 2008
New Revision: 3177

Log:
extract common struct from mxfenc.c/mxfdec.c to mxf.h


Added:
   mxf/mxf.h
Modified:
   mxf/mxfdec.c
   mxf/mxfenc.c

Added: mxf/mxf.h
==============================================================================
--- (empty file)
+++ mxf/mxf.h	Tue Aug 12 09:11:56 2008
@@ -0,0 +1,55 @@
+/*
+ * MXF
+ * Copyright (c) 2008 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "avformat.h"
+#include "libavcodec/bytestream.h"
+
+typedef uint8_t UID[16];
+
+enum MXFMetadataSetType {
+    AnyType,
+    MaterialPackage,
+    SourcePackage,
+    SourceClip,
+    TimecodeComponent,
+    Sequence,
+    MultipleDescriptor,
+    Descriptor,
+    Track,
+    CryptoContext,
+};
+
+typedef struct {
+    UID key;
+    offset_t offset;
+    uint64_t length;
+} KLVPacket;
+
+typedef struct {
+    UID uid;
+    unsigned matching_len;
+    enum CodecID id;
+} MXFCodecUL;
+
+typedef struct {
+    UID uid;
+    enum CodecType type;
+} MXFDataDefinitionUL;

Modified: mxf/mxfdec.c
==============================================================================
--- mxf/mxfdec.c	(original)
+++ mxf/mxfdec.c	Tue Aug 12 09:11:56 2008
@@ -46,23 +46,7 @@
 //#define DEBUG
 
 #include "libavutil/aes.h"
-#include "libavcodec/bytestream.h"
-#include "avformat.h"
-
-typedef uint8_t UID[16];
-
-enum MXFMetadataSetType {
-    AnyType,
-    MaterialPackage,
-    SourcePackage,
-    SourceClip,
-    TimecodeComponent,
-    Sequence,
-    MultipleDescriptor,
-    Descriptor,
-    Track,
-    CryptoContext,
-};
+#include "mxf.h"
 
 typedef struct {
     UID uid;
@@ -143,29 +127,12 @@ typedef struct {
     int local_tags_count;
 } MXFContext;
 
-typedef struct {
-    UID key;
-    offset_t offset;
-    uint64_t length;
-} KLVPacket;
-
 enum MXFWrappingScheme {
     Frame,
     Clip,
 };
 
 typedef struct {
-    UID uid;
-    unsigned matching_len;
-    enum CodecID id;
-} MXFCodecUL;
-
-typedef struct {
-    UID uid;
-    enum CodecType type;
-} MXFDataDefinitionUL;
-
-typedef struct {
     const UID key;
     int (*read)();
     int ctx_size;

Modified: mxf/mxfenc.c
==============================================================================
--- mxf/mxfenc.c	(original)
+++ mxf/mxfenc.c	Tue Aug 12 09:11:56 2008
@@ -31,29 +31,10 @@
 
 #define DEBUG
 
-#include "avformat.h"
-#include "libavcodec/bytestream.h"
+#include "mxf.h"
 
-typedef uint8_t UID[16];
 typedef uint8_t UMID[32];
 
-enum MXFMetadataSetType {
-    MaterialPackage,
-    SourcePackage,
-};
-
-typedef struct {
-    UID key;
-    offset_t offset;
-    uint64_t length;
-} KLVPacket;
-
-typedef struct {
-    UID uid;
-    unsigned matching_len;
-    enum CodecID id;
-} MXFCodecUL;
-
 typedef struct {
     int local_tag;
     UID uid;
@@ -61,11 +42,6 @@ typedef struct {
 
 typedef struct {
     UID uid;
-    enum CodecType type;
-} MXFDataDefinitionUL;
-
-typedef struct {
-    UID uid;
     enum CodecID type;
 } MXFEssenceElementKey;
 



More information about the FFmpeg-soc mailing list