mirror of
https://github.com/jojo61/vdr-plugin-softhdcuvid.git
synced 2025-12-27 07:21:07 +01:00
Reindent all sources to common coding style.
This commit is contained in:
128
codec.h
128
codec.h
@@ -1,97 +1,97 @@
|
||||
///
|
||||
/// @file codec.h @brief Codec module headerfile
|
||||
/// @file codec.h @brief Codec module headerfile
|
||||
///
|
||||
/// Copyright (c) 2009 - 2013, 2015 by Johns. All Rights Reserved.
|
||||
/// Copyright (c) 2009 - 2013, 2015 by Johns. All Rights Reserved.
|
||||
///
|
||||
/// Contributor(s):
|
||||
/// Contributor(s):
|
||||
///
|
||||
/// License: AGPLv3
|
||||
/// 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 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.
|
||||
/// 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: bdb4d18dbe371e497d039e45faa7c134b019860a $
|
||||
/// $Id: bdb4d18dbe371e497d039e45faa7c134b019860a $
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/// @addtogroup Codec
|
||||
/// @{
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Defines
|
||||
// Defines
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#define CodecPCM 0x01 ///< PCM bit mask
|
||||
#define CodecMPA 0x02 ///< MPA bit mask (planned)
|
||||
#define CodecAC3 0x04 ///< AC-3 bit mask
|
||||
#define CodecEAC3 0x08 ///< E-AC-3 bit mask
|
||||
#define CodecDTS 0x10 ///< DTS bit mask (planned)
|
||||
#define CodecPCM 0x01 ///< PCM bit mask
|
||||
#define CodecMPA 0x02 ///< MPA bit mask (planned)
|
||||
#define CodecAC3 0x04 ///< AC-3 bit mask
|
||||
#define CodecEAC3 0x08 ///< E-AC-3 bit mask
|
||||
#define CodecDTS 0x10 ///< DTS bit mask (planned)
|
||||
|
||||
#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
|
||||
|
||||
enum HWAccelID {
|
||||
HWACCEL_NONE = 0,
|
||||
HWACCEL_AUTO,
|
||||
HWACCEL_VDPAU,
|
||||
HWACCEL_DXVA2,
|
||||
HWACCEL_VDA,
|
||||
HWACCEL_VIDEOTOOLBOX,
|
||||
HWACCEL_QSV,
|
||||
HWACCEL_VAAPI,
|
||||
HWACCEL_CUVID,
|
||||
enum HWAccelID
|
||||
{
|
||||
HWACCEL_NONE = 0,
|
||||
HWACCEL_AUTO,
|
||||
HWACCEL_VDPAU,
|
||||
HWACCEL_DXVA2,
|
||||
HWACCEL_VDA,
|
||||
HWACCEL_VIDEOTOOLBOX,
|
||||
HWACCEL_QSV,
|
||||
HWACCEL_VAAPI,
|
||||
HWACCEL_CUVID,
|
||||
};
|
||||
|
||||
|
||||
extern AVBufferRef *hw_device_ctx;
|
||||
|
||||
///
|
||||
/// Video decoder structure.
|
||||
/// Video decoder structure.
|
||||
///
|
||||
struct _video_decoder_
|
||||
{
|
||||
VideoHwDecoder *HwDecoder; ///< video hardware decoder
|
||||
|
||||
int GetFormatDone; ///< flag get format called!
|
||||
AVCodec *VideoCodec; ///< video codec
|
||||
AVCodecContext *VideoCtx; ///< video codec context
|
||||
//#ifdef FFMPEG_WORKAROUND_ARTIFACTS
|
||||
int FirstKeyFrame; ///< flag first frame
|
||||
//#endif
|
||||
// AVFrame *Frame; ///< decoded video frame
|
||||
VideoHwDecoder *HwDecoder; ///< video hardware decoder
|
||||
|
||||
int filter; // flag for deint filter
|
||||
int GetFormatDone; ///< flag get format called!
|
||||
AVCodec *VideoCodec; ///< video codec
|
||||
AVCodecContext *VideoCtx; ///< video codec context
|
||||
//#ifdef FFMPEG_WORKAROUND_ARTIFACTS
|
||||
int FirstKeyFrame; ///< flag first frame
|
||||
//#endif
|
||||
// AVFrame *Frame; ///< decoded video frame
|
||||
|
||||
/* hwaccel options */
|
||||
enum HWAccelID hwaccel_id;
|
||||
char *hwaccel_device;
|
||||
enum AVPixelFormat hwaccel_output_format;
|
||||
|
||||
/* hwaccel context */
|
||||
enum HWAccelID active_hwaccel_id;
|
||||
void *hwaccel_ctx;
|
||||
void (*hwaccel_uninit)(AVCodecContext *s);
|
||||
int (*hwaccel_get_buffer)(AVCodecContext *s, AVFrame *frame, int flags);
|
||||
int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame);
|
||||
enum AVPixelFormat hwaccel_pix_fmt;
|
||||
enum AVPixelFormat hwaccel_retrieved_pix_fmt;
|
||||
AVBufferRef *hw_frames_ctx;
|
||||
int filter; // flag for deint filter
|
||||
|
||||
void *hwdec_priv;
|
||||
// For HDR side-data caching
|
||||
double cached_hdr_peak;
|
||||
// From VO
|
||||
struct mp_hwdec_devices *hwdec_devs;
|
||||
/* hwaccel options */
|
||||
enum HWAccelID hwaccel_id;
|
||||
char *hwaccel_device;
|
||||
enum AVPixelFormat hwaccel_output_format;
|
||||
|
||||
/* hwaccel context */
|
||||
enum HWAccelID active_hwaccel_id;
|
||||
void *hwaccel_ctx;
|
||||
void (*hwaccel_uninit)(AVCodecContext * s);
|
||||
int (*hwaccel_get_buffer)(AVCodecContext * s, AVFrame * frame, int flags);
|
||||
int (*hwaccel_retrieve_data)(AVCodecContext * s, AVFrame * frame);
|
||||
enum AVPixelFormat hwaccel_pix_fmt;
|
||||
enum AVPixelFormat hwaccel_retrieved_pix_fmt;
|
||||
AVBufferRef *hw_frames_ctx;
|
||||
|
||||
void *hwdec_priv;
|
||||
// For HDR side-data caching
|
||||
double cached_hdr_peak;
|
||||
// From VO
|
||||
struct mp_hwdec_devices *hwdec_devs;
|
||||
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Typedefs
|
||||
// Typedefs
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/// Video decoder typedef.
|
||||
@@ -111,14 +111,14 @@ extern const char *X11DisplayName;
|
||||
extern AVBufferRef *HwDeviceContext;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Variables
|
||||
// Variables
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/// Flag prefer fast xhannel switch
|
||||
extern char CodecUsePossibleDefectFrames;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Prototypes
|
||||
// Prototypes
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
/// Allocate a new video decoder context.
|
||||
|
||||
Reference in New Issue
Block a user