本文整理汇总了C#中FFmpeg.AutoGen.AVPacket类的典型用法代码示例。如果您正苦于以下问题:C# AVPacket类的具体用法?C# AVPacket怎么用?C# AVPacket使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AVPacket类属于FFmpeg.AutoGen命名空间,在下文中一共展示了AVPacket类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryDecode
public bool TryDecode(ref AVPacket packet, out AVFrame* pFrame)
{
int gotPicture;
fixed (AVPacket* pPacket = &packet)
{
int decodedSize = FFmpegInvoke.avcodec_decode_video2(codec_context, avFrame, &gotPicture, pPacket);
if (decodedSize < 0) { Console.WriteLine("Error while decoding frame."); }
}
pFrame = avFrame;
return gotPicture == 1;
}
示例2: TryDecode
public bool TryDecode(ref AVPacket packet, ref AVFrame frame)
{
int gotPicture;
fixed (AVPacket* pPacket = &packet)
fixed (AVFrame* pFrame = &frame)
{
int decodedSize = FFmpegInvoke.avcodec_decode_video2(_pDecodingContext, pFrame, &gotPicture, pPacket);
if (decodedSize < 0)
Trace.TraceWarning("Error while decoding frame.");
}
return gotPicture == 1;
}
示例3: TryDecode
public bool TryDecode(ref byte[] data, out AVFrame frame)
{
int gotPicture;
frame = new AVFrame();
fixed (byte* pData = &data[0])
fixed (AVFrame* pFrame = &frame)
{
var packet = new AVPacket {data = pData, size = data.Length};
int decodedSize = FFmpegInvoke.avcodec_decode_video2(_pDecodingContext, pFrame, &gotPicture, &packet);
if (decodedSize < 0)
Trace.TraceWarning("Error while decoding frame.");
}
return gotPicture == 1;
}
示例4: av_pkt_dump2
public static extern void av_pkt_dump2(void* f, AVPacket* pkt, int dump_payload, AVStream* st);
示例5: av_read_frame
public static extern int av_read_frame(AVFormatContext* s, AVPacket* pkt);
示例6: avcodec_encode_video2
public static extern int avcodec_encode_video2(AVCodecContext* avctx, AVPacket* avpkt, AVFrame* frame, int* got_packet_ptr);
示例7: avcodec_decode_video2
public static extern int avcodec_decode_video2(AVCodecContext* avctx, AVFrame* picture, int* got_picture_ptr, AVPacket* avpkt);
示例8: avcodec_decode_audio3
public static extern int avcodec_decode_audio3(AVCodecContext* avctx, short* samples, int* frame_size_ptr, AVPacket* avpkt);
示例9: av_packet_copy_props
public static extern int av_packet_copy_props(AVPacket* dst, AVPacket* src);
示例10: av_copy_packet_side_data
public static extern int av_copy_packet_side_data(AVPacket* dst, AVPacket* src);
示例11: av_dup_packet
public static extern int av_dup_packet(AVPacket* pkt);
示例12: av_packet_from_data
public static extern int av_packet_from_data(AVPacket* pkt, byte* data, int size);
示例13: av_grow_packet
public static extern int av_grow_packet(AVPacket* pkt, int grow_by);
示例14: av_shrink_packet
public static extern void av_shrink_packet(AVPacket* pkt, int size);
示例15: av_new_packet
public static extern int av_new_packet(AVPacket* pkt, int size);