本文整理汇总了C#中AVPixelFormat类的典型用法代码示例。如果您正苦于以下问题:C# AVPixelFormat类的具体用法?C# AVPixelFormat怎么用?C# AVPixelFormat使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AVPixelFormat类属于命名空间,在下文中一共展示了AVPixelFormat类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
private void Initialize(int width, int height, AVPixelFormat inFormat)
{
_initialized = true;
_pContext = FFmpegInvoke.sws_getContext(width, height, inFormat, width, height, _pixelFormat, FFmpegInvoke.SWS_FAST_BILINEAR, null, null, null);
if (_pContext == null)
throw new VideoConverterException("Could not initialize the conversion context.");
_pCurrentFrame = FFmpegInvoke.avcodec_alloc_frame();
int outputDataSize = FFmpegInvoke.avpicture_get_size(_pixelFormat, width, height);
_outputData = new byte[outputDataSize];
fixed (byte* pOutputData = &_outputData[0])
{
FFmpegInvoke.avpicture_fill((AVPicture*)_pCurrentFrame, pOutputData, _pixelFormat, width, height);
}
}
示例2: av_picture_copy
public static extern void av_picture_copy(AVPicture* dst, AVPicture* src, AVPixelFormat pix_fmt, int width, int height);
示例3: sws_isSupportedEndiannessConversion
public static extern int sws_isSupportedEndiannessConversion(AVPixelFormat pix_fmt);
示例4: av_image_copy_to_buffer
public static extern int av_image_copy_to_buffer(byte* dst, int dst_size, byte** src_data, int* src_linesize, AVPixelFormat pix_fmt, int width, int height, int align);
示例5: av_image_fill_arrays
public static extern int av_image_fill_arrays(byte** dst_data, int* dst_linesize, byte* src, AVPixelFormat pix_fmt, int width, int height, int align);
示例6: av_image_alloc
public static extern int av_image_alloc(byte** pointers, int* linesizes, int w, int h, AVPixelFormat pix_fmt, int align);
示例7: av_image_fill_linesizes
public static extern int av_image_fill_linesizes(int* linesizes, AVPixelFormat pix_fmt, int width);
示例8: av_find_best_pix_fmt_of_2
public static extern AVPixelFormat av_find_best_pix_fmt_of_2(AVPixelFormat dst_pix_fmt1, AVPixelFormat dst_pix_fmt2, AVPixelFormat src_pix_fmt, int has_alpha, int* loss_ptr);
示例9: av_opt_set_pixel_fmt
public static extern int av_opt_set_pixel_fmt(void* obj, String name, AVPixelFormat fmt, int search_flags);
示例10: avcodec_default_get_format
public static extern AVPixelFormat avcodec_default_get_format(AVCodecContext* s, AVPixelFormat* fmt);
示例11: avcodec_find_best_pix_fmt_of_list
public static extern AVPixelFormat avcodec_find_best_pix_fmt_of_list(AVPixelFormat* pix_fmt_list, AVPixelFormat src_pix_fmt, int has_alpha, int* loss_ptr);
示例12: avcodec_pix_fmt_to_codec_tag
public static extern int avcodec_pix_fmt_to_codec_tag(AVPixelFormat pix_fmt);
示例13: avcodec_get_chroma_sub_sample
public static extern void avcodec_get_chroma_sub_sample(AVPixelFormat pix_fmt, int* h_shift, int* v_shift);
示例14: av_picture_pad
public static extern int av_picture_pad(AVPicture* dst, AVPicture* src, int height, int width, AVPixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, int* color);
示例15: av_picture_crop
public static extern int av_picture_crop(AVPicture* dst, AVPicture* src, AVPixelFormat pix_fmt, int top_band, int left_band);