diff --git a/codec/gstDecoder.cpp b/codec/gstDecoder.cpp index 78fe81a4..e080f763 100644 --- a/codec/gstDecoder.cpp +++ b/codec/gstDecoder.cpp @@ -558,17 +558,23 @@ bool gstDecoder::buildLaunchStr() #if GST_CHECK_VERSION(1,0,0) if( mOptions.codec == videoOptions::CODEC_H264 ) - ss << "omxh264dec ! "; + // ss << "omxh264dec ! "; + ss << "nvv4l2decoder ! "; else if( mOptions.codec == videoOptions::CODEC_H265 ) - ss << "omxh265dec ! "; + // ss << "omxh265dec ! "; + ss << "nvv4l2decoder ! "; else if( mOptions.codec == videoOptions::CODEC_VP8 ) - ss << "omxvp8dec ! "; + // ss << "omxvp8dec ! "; + ss << "nvv4l2decoder ! "; else if( mOptions.codec == videoOptions::CODEC_VP9 ) - ss << "omxvp9dec ! "; + // ss << "omxvp9dec ! "; + ss << "nvv4l2decoder ! "; else if( mOptions.codec == videoOptions::CODEC_MPEG2 ) - ss << "omxmpeg2videodec ! "; + // ss << "omxmpeg2videodec ! "; + ss << "nvv4l2decoder ! "; else if( mOptions.codec == videoOptions::CODEC_MPEG4 ) - ss << "omxmpeg4videodec ! "; + // ss << "omxmpeg4videodec ! "; + ss << "nvv4l2decoder ! "; else if( mOptions.codec == videoOptions::CODEC_MJPEG ) ss << "nvjpegdec ! "; #else @@ -600,8 +606,6 @@ bool gstDecoder::buildLaunchStr() return false; } - // resize if requested - if( mCustomSize || mOptions.flipMethod != videoOptions::FLIP_NONE ) { ss << "nvvidconv"; @@ -610,14 +614,11 @@ bool gstDecoder::buildLaunchStr() ss << " ! video/x-raw"; - if( mOptions.width != 0 && mOptions.height != 0 ) + // resize if requested + if( mCustomSize && mOptions.width != 0 && mOptions.height != 0 ) ss << ", width=(int)" << mOptions.width << ", height=(int)" << mOptions.height << ", format=(string)NV12"; - ss <<" ! "; - } - else - { - ss << "video/x-raw ! "; + ss << " ! "; } // rate-limit if requested