diff aac_ac3_parser.h @ 6565:013def14c931 libavcodec

change of aac_ac3_parser, so it is able to send complete portion of data to decoder
author bwolowiec
date Sat, 05 Apr 2008 20:09:36 +0000
parents 04763b6fd4f0
children 9b8a881e871c
line wrap: on
line diff
--- a/aac_ac3_parser.h	Fri Apr 04 00:43:34 2008 +0000
+++ b/aac_ac3_parser.h	Sat Apr 05 20:09:36 2008 +0000
@@ -26,23 +26,23 @@
 #include <stdint.h>
 #include "avcodec.h"
 
-typedef enum{
-    FRAME_COMPLETE,    ///< Complete frame, ends previous frame
-    FRAME_START,       ///< Frame start, ends previous frame
-    FRAME_CONTINUATION ///< Part of the previous frame
-}AACAC3FrameFlag;
-
 typedef struct AACAC3ParseContext {
-    uint8_t *inbuf_ptr;
     int frame_size;
     int header_size;
-    int (*sync)(struct AACAC3ParseContext *hdr_info, AACAC3FrameFlag *flag);
-    uint8_t inbuf[8192]; /* input buffer */
+    int (*sync)(uint64_t state, struct AACAC3ParseContext *hdr_info,
+            int *need_next_header, int *new_frame_start);
 
     int channels;
     int sample_rate;
     int bit_rate;
     int samples;
+
+    ParseContext pc;
+    int remaining_size;
+    uint64_t state;
+
+    int need_next_header;
+    int new_frame_start;
 } AACAC3ParseContext;
 
 int ff_aac_ac3_parse(AVCodecParserContext *s1,