Path: blob/master/dep/ffmpeg/include/libavutil/hwcontext_mediacodec.h
4216 views
/*1* This file is part of FFmpeg.2*3* FFmpeg is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* FFmpeg is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with FFmpeg; if not, write to the Free Software15* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16*/1718#ifndef AVUTIL_HWCONTEXT_MEDIACODEC_H19#define AVUTIL_HWCONTEXT_MEDIACODEC_H2021/**22* MediaCodec details.23*24* Allocated as AVHWDeviceContext.hwctx25*/26typedef struct AVMediaCodecDeviceContext {27/**28* android/view/Surface handle, to be filled by the user.29*30* This is the default surface used by decoders on this device.31*/32void *surface;3334/**35* Pointer to ANativeWindow.36*37* It both surface and native_window is NULL, try to create it38* automatically if create_window is true and OS support39* createPersistentInputSurface.40*41* It can be used as output surface for decoder and input surface for42* encoder.43*/44void *native_window;4546/**47* Enable createPersistentInputSurface automatically.48*49* Disabled by default.50*51* It can be enabled by setting this flag directly, or by setting52* AVDictionary of av_hwdevice_ctx_create(), with "create_window" as key.53* The second method is useful for ffmpeg cmdline, e.g., we can enable it54* via:55* -init_hw_device mediacodec=mediacodec,create_window=156*/57int create_window;58} AVMediaCodecDeviceContext;5960#endif /* AVUTIL_HWCONTEXT_MEDIACODEC_H */616263