Skip to content

Conversation

@rzerres
Copy link
Contributor

@rzerres rzerres commented Mar 6, 2019

v1:

  • recursive use of config->quiet flag
    append new argument to function calls. This can be evaluated to post enhanced messages if not (!quiet) selected
  • update for config options
    define a resonable default slice_path in setup-config()

rzerres added 2 commits March 6, 2019 22:11
- enable getopt_long supporting long option style
  (e.g --video-path, --fps, etc.)
- try to be consistent which 'v4l2-compliance' binary when
  choosing option names
- adapt help message
- to adopt the slice-path you need to explicitly prepend an
  argument-option (-s or --slice-path) with the path as an option-string
- adopt summary output to be in line with long options
- typo corrections
- update code style (tabify vs whitespace, alingement)

Signed-off-by: Ralf Zerres <[email protected]>
@rzerres rzerres force-pushed the wip-verbose branch 3 times, most recently from 8735d3e to 07de388 Compare March 7, 2019 02:40
printf(" Frames count: %d\n", preset->frames_count);

printf(" Format: ");
printf(" Codec Type: ");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replacing Format with Codec is definitely a change I would take in, but adding more than the short names for the codecs seems overkill. If you'd like to improve this area, one thing would be to use proper names: MPEG-2, H.264 and H.265 instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will produce an update.

/* Ref: https://www.kernel.org/doc/html/v4.10/media/uapi/v4l/vidioc-g-ext-ctrls.html */
fprintf(stderr, "Initialized 'controls' structure (ctrl_class: %d, which: %d)\n",
controls.ctrl_class, controls.which);
fprintf(stderr, " 'control' value (id: %d, size: %d)\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That feels overkill, I don't think I'll take it in, sorry.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep it in my branch. For testing

rc = ioctl(video_fd, VIDIOC_S_EXT_CTRLS, &controls);
if (rc < 0) {
fprintf(stderr, "Unable to set control: %s\n", strerror(errno));
fprintf(stderr, "Unable to set control: %s (%d)\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That one is a keeper!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will create an seperate PR

unsigned int capabilities;
int rc;

if(!quiet)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the changes below feel overkill.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep it in my brach. Just for testing ....

config->drm_driver = strdup("sun4i-drm");

config->preset_name = strdup("bbb-mpeg2");
asprintf(&config->slices_path, "data/%s", config->preset_name);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep this in main() so that we alloc once instead of alloc + free + alloc when user specifies another path.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. [v5] update already send.

&frame->h264.scaling_matrix,
sizeof(frame->h264.scaling_matrix) },
{ CODEC_TYPE_H264, "scaling matrix",
{ CODEC_TYPE_H264, "slice parameters",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, feel free to spin this as a standalone fix.

struct gem_buffer **buffers,
struct display_setup *setup)
struct display_setup *setup,
bool quiet)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These functions are not expected to interact with the user other than for printing out errors, so I don't think I'll take this in.

rzerres added 2 commits March 8, 2019 23:14
- const struct codec (.name, .description, .type)
  use more descriptive names when referencing codecs by enum type

Signed-off-by: Ralf Zerres <[email protected]>
- respect quiet field in function calls
- otherwise show descriptive control messages

Signed-off-by: Ralf Zerres <[email protected]>
rzerres added 3 commits March 8, 2019 23:22
- get more descriptive response messages on stderr

Signed-off-by: Ralf Zerres <[email protected]>
- h264-ctrls.h
- hevc-ctrls.h

compile will rely on up to date system/uapi headers

Signed-off-by: Ralf Zerres <[email protected]>
- h264-ctrls.h
- hevc-ctrls.h

Signed-off-by: Ralf Zerres <[email protected]>
@rzerres
Copy link
Contributor Author

rzerres commented Mar 8, 2019

This discussion can be closed.
Your comments are embedded in the new PR's

It took me a while to understand, that the github GUI requires an author to group disired commits for new PR's in its own branch. You aren't able to 'exclude' or 'include' just single commit hashes from a single working branch into the PR. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants