-
Notifications
You must be signed in to change notification settings - Fork 7
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
[RSDK-9843] Support mpeg4 to address codecInfo error on some RTSP streams #75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me!
Wondering if we have any physical MPEG4 cams in the office to test out on..
rtsp.go
Outdated
|
||
// Initialize the rawDecoder with MPEG4 config data | ||
if f.Config != nil { | ||
// Prepend MPEG4 Visual Object Sequence (VOS) and Video Object (VO) start codes if not present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we mean by "if not present" here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol there's no conditional in the code to justify using "if" here (anymore). I'll delete that
C.avcodec_close(codecCtx) | ||
return nil, errors.New("av_malloc() failed for extradata") | ||
} | ||
C.memcpy(unsafe.Pointer(codecCtx.extradata), unsafe.Pointer(&extraData[0]), C.size_t(codecCtx.extradata_size)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done -- did not realize this how you set the global headers for MPEG4 decoder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't either! I tried to make h264/5 also use this global headers flow, but I think NAL units work differently i.e. every frame
We do not :,) Waiting on some people to tell us what camera we should buy if that's an option for actually testing this feature |
RSDK-9843
Adds new model
viam:viamrtsp:rtsp-mpeg4
. Adds support for mpeg4 including codec detection with agnostic model. Adds integration test.Manual Testing