Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change video decoder from omx*dec to nvv4l2decoder. #89

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions codec/gstDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -600,8 +606,6 @@ bool gstDecoder::buildLaunchStr()
return false;
}

// resize if requested
if( mCustomSize || mOptions.flipMethod != videoOptions::FLIP_NONE )
{
ss << "nvvidconv";

Expand All @@ -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
Expand Down