Opened 18 years ago
Closed 17 years ago
#2460 closed patch (fixed)
Add proper cout buffered logging of libavcodec
Reported by: | Owned by: | Janne Grunau | |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | logging |
Cc: | Ticket locked: | no |
Description
I got this idea from mythtv/programs/mythtranscode/mpeg2fix.cpp. By using the av_log_set_callback we can set how the libavcodec library displays its information and error messages. Even what level of message to display too or not at all.
The biggest downside seem to be where to put it. I put it in the mythtv/libs/libmyth/mythcontext.cpp file. While used everywhere libavcodec is used, it is also used when libavcodec isn't. This requires libavutil beening linked into mythuitest, mythbrowser and mtd.
Attachments (3)
Change History (7)
Changed 18 years ago by
Attachment: | libavcodec-log.patch added |
---|
comment:1 follow-up: 3 Changed 18 years ago by
Keywords: | logging added |
---|---|
Milestone: | unknown → 0.21 |
This is a good starting point. It should use the myth VERBOSE macros with an appropriate level ie. VB_LIBAV rather than cout to print the messages.
Changed 18 years ago by
Attachment: | libavcodec-log-2.patch added |
---|
Update to use VERBOSE to print message.
comment:2 Changed 17 years ago by
Owner: | changed from Isaac Richards to Janne Grunau |
---|---|
Version: | 0.20 → head |
comment:3 Changed 17 years ago by
Replying to stuarta:
This is a good starting point. It should use the myth VERBOSE macros with an appropriate level ie. VB_LIBAV rather than cout to print the messages.
Should this stop the stream related information I'm seeing in my mythbackend log:
0: start_time: -9223372036854.775 duration: -9223372036854.775 1: start_time: -9223372036854.775 duration: -9223372036854.775 2: start_time: -9223372036854.775 duration: -9223372036854.775 3: start_time: -9223372036854.775 duration: -9223372036854.775 4: start_time: -9223372036854.775 duration: -9223372036854.775 5: start_time: -9223372036854.775 duration: -9223372036854.775 6: start_time: -9223372036854.775 duration: -9223372036854.775 7: start_time: -9223372036854.775 duration: -9223372036854.775 stream: start_time: -9223372036854.775 duration: -9223372036854.775 bitrate=10256 kb/s 0: start_time: 1787.081 duration: 342.490 1: start_time: 1787.037 duration: 342.477 2: start_time: 1787.043 duration: 342.468 3: start_time: 1787.037 duration: 342.533 4: start_time: 1787.037 duration: 342.533 5: start_time: 1787.037 duration: 342.533 6: start_time: 1787.037 duration: 342.533 7: start_time: 1787.037 duration: 342.533 stream: start_time: 19855.971 duration: 3805.923 bitrate=4623 kb/s
I've manually applied the patches (files have changed since diffs made) and still see these entries which are not timestamped.
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [14411]) Fixes #2460. Wrap libav* log output in AVFormatDecoder
Allows us to filter the output with mythtv's verbose levels. All error and fatal libav log levels go to VB_IMPORTANT, the rest goes to VB_LIBAV and is usually ignored.
based on patch from Paul Andreassen % paulx A andreassen P com P au %
mythcontext changes