]> git.sesse.net Git - ffmpeg/blobdiff - libav/avformat.h
- ME method compatibility with legacy apps.
[ffmpeg] / libav / avformat.h
index d1b4ce5618d688c690afa2b920c2555d35bb9988..c0d25f1607a75423dc8eada2659d8dab0f330c77 100644 (file)
@@ -12,6 +12,7 @@ typedef struct AVPacket {
     int stream_index;
     int flags;
 #define PKT_FLAG_KEY   0x0001
+#define PKT_FLAG_DROPPED_FRAME   0x0002
 } AVPacket; 
 
 int av_new_packet(AVPacket *pkt, int size);
@@ -29,7 +30,7 @@ typedef struct AVFormatParameters {
     int channels;
     int width;
     int height;
-    int pix_fmt;
+    enum PixelFormat pix_fmt;
 } AVFormatParameters;
 
 typedef struct AVFormat {
@@ -44,7 +45,7 @@ typedef struct AVFormat {
     int (*write_header)(struct AVFormatContext *);
     int (*write_packet)(struct AVFormatContext *, 
                         int stream_index,
-                        unsigned char *buf, int size);
+                        unsigned char *buf, int size, int force_pts);
     int (*write_trailer)(struct AVFormatContext *);
 
     /* optional input support */
@@ -62,7 +63,8 @@ typedef struct AVFormat {
        origin is defined by the stream */
     int (*read_seek)(struct AVFormatContext *, INT64 pts);
     int flags;
-#define AVFMT_NOFILE 0x0001 /* no file should be opened */
+#define AVFMT_NOFILE        0x0001 /* no file should be opened */
+#define AVFMT_NEEDNUMBER    0x0002 /* needs '%d' in filename */ 
     struct AVFormat *next;
 } AVFormat;
 
@@ -112,6 +114,10 @@ extern AVFormat asf_format;
 /* avienc.c */
 extern AVFormat avi_format;
 
+/* mov.c */
+extern AVFormat mov_format;
+extern AVFormat mp4_format;
+
 /* jpegenc.c */
 extern AVFormat mpjpeg_format;
 extern AVFormat jpeg_format;
@@ -120,6 +126,11 @@ extern AVFormat single_jpeg_format;
 /* swfenc.c */
 extern AVFormat swf_format;
 
+/* gif.c */
+extern AVFormat gif_format;
+/* au.c */
+extern AVFormat au_format;
+
 /* wav.c */
 extern AVFormat wav_format;
 
@@ -139,7 +150,14 @@ extern AVFormat ac3_format;
 extern AVFormat h263_format;
 extern AVFormat mpeg1video_format;
 extern AVFormat mjpeg_format;
-extern AVFormat pcm_format;
+extern AVFormat pcm_s16le_format;
+extern AVFormat pcm_s16be_format;
+extern AVFormat pcm_u16le_format;
+extern AVFormat pcm_u16be_format;
+extern AVFormat pcm_s8_format;
+extern AVFormat pcm_u8_format;
+extern AVFormat pcm_mulaw_format;
+extern AVFormat pcm_alaw_format;
 extern AVFormat rawvideo_format;
 
 /* ffm.c */
@@ -172,11 +190,14 @@ int fifo_size(FifoBuffer *f, UINT8 *rptr);
 int fifo_read(FifoBuffer *f, UINT8 *buf, int buf_size, UINT8 **rptr_ptr);
 void fifo_write(FifoBuffer *f, UINT8 *buf, int size, UINT8 **wptr_ptr);
 
-AVFormatContext *av_open_input_file(const char *filename, int buf_size);
+AVFormatContext *av_open_input_file(const char *filename, 
+                                    const char *format_name,
+                                    int buf_size,
+                                    AVFormatParameters *ap);
 int av_read_packet(AVFormatContext *s, AVPacket *pkt);
 void av_close_input_file(AVFormatContext *s);
 
-int av_write_packet(AVFormatContext *s, AVPacket *pkt);
+int av_write_packet(AVFormatContext *s, AVPacket *pkt, int force_pts);
 
 void dump_format(AVFormatContext *ic,
                  int index, 
@@ -194,3 +215,12 @@ void ffm_set_write_index(AVFormatContext *s, offset_t pos, offset_t file_size);
 
 int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info);
 
+int get_frame_filename(char *buf, int buf_size,
+                       const char *path, int number);
+
+/* grab/output specific */
+extern AVFormat video_grab_device_format;
+extern AVFormat audio_device_format;
+
+extern const char *v4l_device;
+extern const char *audio_device;