Hi. I have a third party application that pushes H265 encoded stream’s frames one by one, and I need to create a pipeline that can handle this stream.
I am using C# bindings, with VisioForge library. But my question is not directly related to that particular library. I want to learn building that pipeline generally, then it can easily be adapted to VisioForge (it is kind of a wrapper for gstreamer c# bindings)
Here is the code I use to build the pipeline now:
As source, I am using AppSrc and I push frames using need-data delegate. I have the pipeline working for H264 encoded stream, but now having trouble making H265 part:
_appSrc = new CustomMediaBlock(new CustomMediaBlockSettings("appsrc"));
if (_streamInfo!.VideoCodec is VideoCodecType.H264) // works nicely
{
_h264Parser = new H264ParseBlock();
_pipeline.Connect(_appSrc.Output, _h264Parser.Input);
_h264Decoder = new H264DecoderBlock(new OpenH264DecoderSettings());
_pipeline.Connect(_h264Parser.Output, _h264Decoder.Input);
_videoConverter = new VideoConverterBlock();
_pipeline.Connect(_h264Decoder.Output, _videoConverter.Input);
_grabber = new VideoSampleGrabberBlock(addNullRenderer: true);
_pipeline.Connect(_videoConverter.Output, _grabber.Input);
}
else if (_streamInfo.VideoCodec is VideoCodecType.HEVC)
{
_h265Parser = new H265ParseBlock();
_pipeline.Connect(_appSrc.Output, _h265Parser.Input);
_h265DecoderBin = new DecodeBinBlock(false, false, false);
// _h265Decoder = new D3D11H265DecoderBlock();
_pipeline.Connect(_h265Parser.Output, _h265DecoderBin.Input);
_videoConverter = new VideoConverterBlock();
_pipeline.Connect(_h265DecoderBin.Output, _videoConverter.Input);
_grabber = new VideoSampleGrabberBlock(addNullRenderer: true);
_pipeline.Connect(_videoConverter.Output, _grabber.Input);
}
Any help or comment is much appreciated,
thanks in advance!