History

avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx()

softworkz committed 1 year ago

Commit e2f39671 parent 34bb7f53 files · +24 −0Browse files

Showing the changes to libavfilter (2 of 3 files). Show all

Unified · Split

2 files
  1. libavfilter/avfilter.c +9 −0
  2. libavfilter/avfilter.h +12 −0
libavfilter/avfilter.c+9−0
@@ -989,6 +989,15 @@ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx) · 988 unmodified lines
989 return pads[pad_idx].type;989 return pads[pad_idx].type;
990}990}
991 991
992AVBufferRef *avfilter_link_get_hw_frames_ctx(AVFilterLink *link)
993{
994 FilterLink *plink = ff_filter_link(link);
995 if (plink->hw_frames_ctx)
996 return av_buffer_ref(plink->hw_frames_ctx);
997
998 return NULL;
999}
1000
992static int default_filter_frame(AVFilterLink *link, AVFrame *frame)1001static int default_filter_frame(AVFilterLink *link, AVFrame *frame)
993{1002{
994 return ff_filter_frame(link->dst->outputs[0], frame);1003 return ff_filter_frame(link->dst->outputs[0], frame);
libavfilter/avfilter.h+12−0
@@ -96,6 +96,18 @@ const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx); · 95 unmodified lines
96 */96 */
97enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);97enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
98 98
99/**
100 * Get the hardware frames context of a filter link.
101 *
102 * @param link an AVFilterLink
103 *
104 * @return a ref-counted copy of the link's hw_frames_ctx field if there is
105 * a hardware frames context associated with the link or NULL otherwise.
106 * The returned AVBufferRef needs to be released with av_buffer_unref()
107 * when it is no longer used.
108 */
109AVBufferRef* avfilter_link_get_hw_frames_ctx(AVFilterLink *link);
110
99/**111/**
100 * Lists of formats / etc. supported by an end of a link.112 * Lists of formats / etc. supported by an end of a link.
101 *113 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t