2011-12-07 15:05:38 +01:00
|
|
|
///
|
|
|
|
/// @file codec.h @brief Codec module headerfile
|
|
|
|
///
|
2012-01-08 21:46:00 +01:00
|
|
|
/// Copyright (c) 2009 - 2012 by Johns. All Rights Reserved.
|
2011-12-07 15:05:38 +01:00
|
|
|
///
|
|
|
|
/// Contributor(s):
|
|
|
|
///
|
|
|
|
/// License: AGPLv3
|
|
|
|
///
|
|
|
|
/// This program is free software: you can redistribute it and/or modify
|
|
|
|
/// it under the terms of the GNU Affero General Public License as
|
|
|
|
/// published by the Free Software Foundation, either version 3 of the
|
|
|
|
/// License.
|
|
|
|
///
|
|
|
|
/// This program 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 Affero General Public License for more details.
|
|
|
|
///
|
|
|
|
/// $Id$
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/// @addtogroup Codec
|
|
|
|
/// @{
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// Typedefs
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
/// Video decoder typedef.
|
|
|
|
typedef struct _video_decoder_ VideoDecoder;
|
|
|
|
|
|
|
|
/// Audio decoder typedef.
|
|
|
|
typedef struct _audio_decoder_ AudioDecoder;
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
// Prototypes
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
/// Allocate a new video decoder context.
|
|
|
|
extern VideoDecoder *CodecVideoNewDecoder(VideoHwDecoder *);
|
|
|
|
|
2012-01-22 17:07:08 +01:00
|
|
|
/// Deallocate a video decoder context.
|
|
|
|
extern void CodecVideoDelDecoder(VideoDecoder *);
|
|
|
|
|
2012-01-08 21:46:00 +01:00
|
|
|
/// Open video codec.
|
2011-12-07 15:05:38 +01:00
|
|
|
extern void CodecVideoOpen(VideoDecoder *, const char *, int);
|
|
|
|
|
2012-01-08 21:46:00 +01:00
|
|
|
/// Close video codec.
|
2011-12-07 15:05:38 +01:00
|
|
|
extern void CodecVideoClose(VideoDecoder *);
|
|
|
|
|
2012-01-08 21:46:00 +01:00
|
|
|
/// Decode a video packet.
|
|
|
|
extern void CodecVideoDecode(VideoDecoder *, const AVPacket *);
|
|
|
|
|
|
|
|
/// Flush video buffers.
|
|
|
|
extern void CodecVideoFlushBuffers(VideoDecoder *);
|
2011-12-07 15:05:38 +01:00
|
|
|
|
|
|
|
/// Allocate a new audio decoder context.
|
|
|
|
extern AudioDecoder *CodecAudioNewDecoder(void);
|
|
|
|
|
2012-01-22 17:07:08 +01:00
|
|
|
/// Deallocate an audio decoder context.
|
|
|
|
extern void CodecAudioDelDecoder(AudioDecoder *);
|
|
|
|
|
2012-01-08 21:46:00 +01:00
|
|
|
/// Open audio codec.
|
2011-12-07 15:05:38 +01:00
|
|
|
extern void CodecAudioOpen(AudioDecoder *, const char *, int);
|
|
|
|
|
2012-01-08 21:46:00 +01:00
|
|
|
/// Close audio codec.
|
2011-12-07 15:05:38 +01:00
|
|
|
extern void CodecAudioClose(AudioDecoder *);
|
|
|
|
|
2012-01-08 21:46:00 +01:00
|
|
|
/// Decode an audio packet.
|
|
|
|
extern void CodecAudioDecode(AudioDecoder *, const AVPacket *);
|
|
|
|
|
|
|
|
/// Flush audio buffers.
|
|
|
|
extern void CodecAudioFlushBuffers(AudioDecoder *);
|
2011-12-07 15:05:38 +01:00
|
|
|
|
|
|
|
/// Setup and initialize codec module.
|
|
|
|
extern void CodecInit(void);
|
|
|
|
|
|
|
|
/// Cleanup and exit codec module.
|
|
|
|
extern void CodecExit(void);
|
|
|
|
|
|
|
|
/// @}
|