summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
authorZdenek Kabelac <kabi@informatics.muni.cz>2002-05-14 14:17:11 +0000
committerZdenek Kabelac <kabi@informatics.muni.cz>2002-05-14 14:17:11 +0000
commite8f147930b9b972cd73b15453e2f3b4bf21c4f9b (patch)
tree43445c0c5eca9915ac6b2bffa3de1e26191a5751 /libavcodec/avcodec.h
parent13a0314fba9470c28fbcd82377c96d87b3d32df8 (diff)
* first shot for the new avcodec API
- comments, critics, improvements on the ffmpeg list are welcomed Originally committed as revision 494 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h77
1 files changed, 77 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 3bd0b8a9bb..a56f9f130b 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -426,4 +426,81 @@ void avcodec_flush_buffers(AVCodecContext *avctx);
extern int quant_store[MBR+1][MBC+1]; // [Review]
#endif
+
+/**
+ * Interface for 0.5.0 version
+ *
+ * do not even think about it's usage for this moment
+ */
+
+typedef struct {
+ // compressed size used from given memory buffer
+ int size;
+ /// I/P/B frame type
+ int frame_type;
+} avc_enc_result_t;
+
+/**
+ * Commands
+ * order can't be changed - once it was defined
+ */
+typedef enum {
+ // general commands
+ AVC_OPEN_BY_NAME = 0xACA000,
+ AVC_OPEN_BY_CODEC_ID,
+ AVC_OPEN_BY_FOURCC,
+ AVC_CLOSE,
+
+ AVC_FLUSH,
+ // pin - struct { uint8_t* src, uint_t src_size }
+ // pout - struct { AVPicture* img, consumed_bytes,
+ AVC_DECODE,
+ // pin - struct { AVPicture* img, uint8_t* dest, uint_t dest_size }
+ // pout - uint_t used_from_dest_size
+ AVC_ENCODE,
+
+ // query/get video commands
+ AVC_GET_VERSION = 0xACB000,
+ AVC_GET_WIDTH,
+ AVC_GET_HEIGHT,
+ AVC_GET_DELAY,
+ AVC_GET_QUANT_TABLE,
+ // ...
+
+ // query/get audio commands
+ AVC_GET_FRAME_SIZE = 0xABC000,
+
+ // maybe define some simple structure which
+ // might be passed to the user - but they can't
+ // contain any codec specific parts and these
+ // calls are usualy necessary only few times
+
+ // set video commands
+ AVC_SET_WIDTH = 0xACD000,
+ AVC_SET_HEIGHT,
+
+ // set video encoding commands
+ AVC_SET_FRAME_RATE = 0xACD800,
+ AVC_SET_QUALITY,
+ AVC_SET_HURRY_UP,
+
+ // set audio commands
+ AVC_SET_SAMPLE_RATE = 0xACE000,
+ AVC_SET_CHANNELS,
+
+} avc_cmd_t;
+
+/**
+ * \param handle allocated private structure by libavcodec
+ * for initialization pass NULL - will be returned pout
+ * user is supposed to know nothing about its structure
+ * \param cmd type of operation to be performed
+ * \param pint input parameter
+ * \param pout output parameter
+ *
+ * \returns command status - eventually for query command it might return
+ * integer resulting value
+ */
+int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout);
+
#endif /* AVCODEC_H */