Loading...
Searching...
No Matches
hw_decode.c File Reference
`#include <stdio.h>`
`#include <libavcodec/avcodec.h>`
`#include <libavformat/avformat.h>`
`#include <libavutil/mem.h>`
`#include <libavutil/pixdesc.h>`
`#include <libavutil/hwcontext.h>`
`#include <libavutil/opt.h>`
`#include <libavutil/avassert.h>`
`#include <libavutil/imgutils.h>`

Go to the source code of this file.

## Functions

static int | hw_decoder_init (AVCodecContext *ctx, const enum AVHWDeviceType type)
static enum AVPixelFormat | get_hw_format (AVCodecContext *ctx, const enum AVPixelFormat *pix_fmts)
static int | decode_write (AVCodecContext *avctx, AVPacket *packet)
int | main (int argc, char *argv[])

## Variables

static AVBufferRef * | hw_device_ctx = NULL
static enum AVPixelFormat | hw_pix_fmt
static FILE * | output_file = NULL

## Function Documentation

## hw_decoder_init()

static int hw_decoder_init | ( | AVCodecContext * | ctx,
|  | const enum AVHWDeviceType | type
| ) |  |

static

Examples
  hw_decode.c.

Definition at line 49 of file hw_decode.c.

Referenced by main().

## get_hw_format()

static enum AVPixelFormat get_hw_format | ( | AVCodecContext * | ctx,
|  | const enum AVPixelFormat * | pix_fmts
| ) |  |

static

Examples
  hw_decode.c.

Definition at line 63 of file hw_decode.c.

Referenced by main().

## decode_write()

static int decode_write | ( | AVCodecContext * | avctx,
|  | AVPacket * | packet
| ) |  |

static

Examples
  hw_decode.c.

Definition at line 77 of file hw_decode.c.

Referenced by main().

## main()

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Definition at line 149 of file hw_decode.c.

## Variable Documentation

## hw_device_ctx

AVBufferRef* hw_device_ctx = NULL

static

Examples
  hw_decode.c, qsv_transcode.c, vaapi_encode.c, and vaapi_transcode.c.

Definition at line 45 of file hw_decode.c.

Referenced by hw_decoder_init(), main(), main(), open_input_file(), open_input_file(), and set_hwframe_ctx().

## hw_pix_fmt

enum AVPixelFormat hw_pix_fmt

static

Examples
  hw_decode.c.

Definition at line 46 of file hw_decode.c.

Referenced by decode_write(), get_hw_format(), and main().

## output_file

FILE* output_file = NULL

static

Examples
  hw_decode.c.

Definition at line 47 of file hw_decode.c.

Referenced by decode_write(), and main().