How to catch these logs?

Hi,

I would like to handle these logs using GStreamer C/C++ library:

NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
Allocating new output: 1920x1088 (x 11), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3605: Send OMX_EventPortSettingsChanged: nFrameWidth = 1920, nFrameHeight = 1080

Is there any way to do so?

GStreamer pipeline: souphttpsrc location=http://stream.brucity.be/BXLCAM/CAM-GrandePlace.stream/chunklist_w503834965.m3u8 ! hlsdemux ! tsdemux ! h264parse ! omxh264dec ! videoscale ! video/x-raw,width=800,height=450 ! videoconvert ! appsink

Thanks,

Hi,
Not quite understand what handle these logs means. Please share more detail about the request.

And we have deprecated omx plugins. Please replace omxh264dec with nvv4l2decoder.

I would like to intercept those logs in order to do something with them (E.g. saving them in a database). If possible I would like to catch them from my C++ code.

If you just want to see what is there, and don’t need to actually intervene, then you might try a “system()” call to the command line “tail -f /var/log/theLogName”. You haven’t said anything about use-case so it is hard to know what is needed.

I would like to directly get the logs when they are sent, hopefully without a file. My use case is catching them to save each logs in a database (an reuse them for monitoring purpose).

I’m not sure which system calls are providing those logs, nor am I aware of whether or not there is some existing method of intercepting. My thought though is that there are already methods to stream the logs to another computer instead of writing the logs to the local computer. You could probably read the data stream for logging when it is set up for remote logging such that it is your program reading the data instead of going to a client which writes a file, but I’ve never attempted such a thing and have no experience with the remote logging software. I can tell you though that such software is standard and commonly available, so documents on the internet would tell you how to set up remote logging (and then you’d modify it from there).

The twist on the story is that if you don’t want to go to a remote computer for logging, that the remote computer can just as easily be the local computer (the Jetson). When the content is sent by network it can instead use localhost address (and wouldn’t even need a network connection).

Hi,
The log is printed in low level code, which is built as libnvmmlite_video.so. For this use-case, you can check if you can customize gst-v4l2 to achieve the request. When codec data is parsed, it sends the event V4L2_EVENT_RESOLUTION_CHANGE to upper layer. You can catch the event in gst-v4l2.

The link to source code:
https://developer.nvidia.com/embedded/l4t/r32_release_v6.1/sources/t210/public_sources.tbz2

Is it possible to do without having to edit an existing library?

Hi,
By default it receives the event in gst-v4l2 and then creating buffers. For your request, would need to make customzation. Since it is open source, you can follow README to built it for a try.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.