comparison avcodec.h @ 382:b1663b0ffbbc libavcodec

* first shot for the new avcodec API - comments, critics, improvements on the ffmpeg list are welcomed
author kabi
date Tue, 14 May 2002 14:17:11 +0000
parents 975aa6fe83b8
children e6b64bc3bc87
comparison
equal deleted inserted replaced
381:0d6178e4d503 382:b1663b0ffbbc
424 #define MBR 96 424 #define MBR 96
425 #endif 425 #endif
426 extern int quant_store[MBR+1][MBC+1]; // [Review] 426 extern int quant_store[MBR+1][MBC+1]; // [Review]
427 #endif 427 #endif
428 428
429
430 /**
431 * Interface for 0.5.0 version
432 *
433 * do not even think about it's usage for this moment
434 */
435
436 typedef struct {
437 // compressed size used from given memory buffer
438 int size;
439 /// I/P/B frame type
440 int frame_type;
441 } avc_enc_result_t;
442
443 /**
444 * Commands
445 * order can't be changed - once it was defined
446 */
447 typedef enum {
448 // general commands
449 AVC_OPEN_BY_NAME = 0xACA000,
450 AVC_OPEN_BY_CODEC_ID,
451 AVC_OPEN_BY_FOURCC,
452 AVC_CLOSE,
453
454 AVC_FLUSH,
455 // pin - struct { uint8_t* src, uint_t src_size }
456 // pout - struct { AVPicture* img, consumed_bytes,
457 AVC_DECODE,
458 // pin - struct { AVPicture* img, uint8_t* dest, uint_t dest_size }
459 // pout - uint_t used_from_dest_size
460 AVC_ENCODE,
461
462 // query/get video commands
463 AVC_GET_VERSION = 0xACB000,
464 AVC_GET_WIDTH,
465 AVC_GET_HEIGHT,
466 AVC_GET_DELAY,
467 AVC_GET_QUANT_TABLE,
468 // ...
469
470 // query/get audio commands
471 AVC_GET_FRAME_SIZE = 0xABC000,
472
473 // maybe define some simple structure which
474 // might be passed to the user - but they can't
475 // contain any codec specific parts and these
476 // calls are usualy necessary only few times
477
478 // set video commands
479 AVC_SET_WIDTH = 0xACD000,
480 AVC_SET_HEIGHT,
481
482 // set video encoding commands
483 AVC_SET_FRAME_RATE = 0xACD800,
484 AVC_SET_QUALITY,
485 AVC_SET_HURRY_UP,
486
487 // set audio commands
488 AVC_SET_SAMPLE_RATE = 0xACE000,
489 AVC_SET_CHANNELS,
490
491 } avc_cmd_t;
492
493 /**
494 * \param handle allocated private structure by libavcodec
495 * for initialization pass NULL - will be returned pout
496 * user is supposed to know nothing about its structure
497 * \param cmd type of operation to be performed
498 * \param pint input parameter
499 * \param pout output parameter
500 *
501 * \returns command status - eventually for query command it might return
502 * integer resulting value
503 */
504 int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout);
505
429 #endif /* AVCODEC_H */ 506 #endif /* AVCODEC_H */