vdr-plugin-softhddevice/video.h

156 lines
4.4 KiB
C
Raw Permalink Normal View History

2011-12-07 15:05:38 +01:00
///
/// @file video.h @brief Video module header file
///
/// 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 Video
/// @{
//----------------------------------------------------------------------------
// Typedefs
//----------------------------------------------------------------------------
/// Video hardware decoder typedef
typedef struct _video_hw_decoder_ VideoHwDecoder;
//----------------------------------------------------------------------------
// Variables
//----------------------------------------------------------------------------
extern char VideoIgnoreRepeatPict; ///< disable repeat pict warning
2011-12-07 15:05:38 +01:00
//----------------------------------------------------------------------------
// Prototypes
//----------------------------------------------------------------------------
/// Allocate new video hardware decoder.
extern VideoHwDecoder *VideoNewHwDecoder(void);
2012-01-19 00:16:15 +01:00
/// Deallocate video hardware decoder.
extern void VideoDelHwDecoder(VideoHwDecoder *);
2011-12-07 15:05:38 +01:00
/// Get and allocate a video hardware surface.
extern unsigned VideoGetSurface(VideoHwDecoder *);
/// Release a video hardware surface
2011-12-07 15:05:38 +01:00
extern void VideoReleaseSurface(VideoHwDecoder *, unsigned);
#ifdef LIBAVCODEC_VERSION
/// Callback to negotiate the PixelFormat.
extern enum PixelFormat Video_get_format(VideoHwDecoder *, AVCodecContext *,
const enum PixelFormat *);
/// Render a ffmpeg frame.
extern void VideoRenderFrame(VideoHwDecoder *, const AVCodecContext *,
const AVFrame *);
2011-12-07 15:05:38 +01:00
/// Get ffmpeg vaapi context.
2011-12-07 15:05:38 +01:00
extern struct vaapi_context *VideoGetVaapiContext(VideoHwDecoder *);
2011-12-23 19:33:30 +01:00
#ifdef AVCODEC_VDPAU_H
/// Draw vdpau render state.
2011-12-23 19:33:30 +01:00
extern void VideoDrawRenderState(VideoHwDecoder *,
struct vdpau_render_state *);
#endif
2011-12-07 15:05:38 +01:00
#endif
/// Poll video events.
extern void VideoPollEvent(void);
/// Wakeup display handler.
extern void VideoDisplayWakeup(void);
/// Set video geometry.
2011-12-07 15:05:38 +01:00
extern int VideoSetGeometry(const char *);
/// Set 60Hz display mode.
extern void VideoSet60HzMode(int);
/// Set video output position.
extern void VideoSetOutputPosition(int, int, int, int);
/// Set video mode.
extern void VideoSetVideoMode(int, int, int, int);
/// Set display format.
extern void VideoSetDisplayFormat(int);
2012-01-13 16:31:29 +01:00
/// Set video fullscreen mode.
extern void VideoSetFullscreen(int);
/// Set deinterlace.
extern void VideoSetDeinterlace(int[]);
/// Set skip chroma deinterlace.
extern void VideoSetSkipChromaDeinterlace(int[]);
/// Set inverse telecine.
extern void VideoSetInverseTelecine(int[]);
/// Set scaling.
extern void VideoSetScaling(int[]);
/// Set denoise.
extern void VideoSetDenoise(int[]);
/// Set sharpen.
extern void VideoSetSharpen(int[]);
/// Set skip lines.
extern void VideoSetSkipLines(int);
/// Set studio levels.
extern void VideoSetStudioLevels(int);
/// Set background.
extern void VideoSetBackground(uint32_t);
/// Set audio delay.
extern void VideoSetAudioDelay(int);
2012-01-20 15:33:37 +01:00
/// Set auto-crop parameters.
2012-01-27 23:49:05 +01:00
extern void VideoSetAutoCrop(int, int, int);
2012-01-20 15:33:37 +01:00
/// Clear OSD.
2011-12-07 15:05:38 +01:00
extern void VideoOsdClear(void);
/// Draw an OSD ARGB image.
2011-12-07 15:05:38 +01:00
extern void VideoOsdDrawARGB(int, int, int, int, const uint8_t *);
/// Get OSD size.
extern void VideoGetOsdSize(int *, int *);
extern int64_t VideoGetClock(void); ///< Get video clock.
2011-12-14 18:01:03 +01:00
2012-01-20 21:46:22 +01:00
/// Grab screen.
2012-01-24 22:40:06 +01:00
extern uint8_t *VideoGrab(int *, int *, int *, int);
2012-01-20 21:46:22 +01:00
extern void VideoOsdInit(void); ///< Setup osd.
extern void VideoOsdExit(void); ///< Cleanup osd.
2011-12-07 15:05:38 +01:00
extern void VideoInit(const char *); ///< Setup video module.
extern void VideoExit(void); ///< Cleanup and exit video module.
2011-12-07 15:05:38 +01:00
extern void VideoFlushInput(void); ///< Flush video input buffers.
extern int VideoDecode(void); ///< Decode video input buffers.
extern int VideoGetBuffers(void); ///< Get number of input buffers.
2011-12-07 15:05:38 +01:00
/// @}