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

OMX_GetParameter OMX_IndexParamVideoBitrate set zeros version, size, port #163

Closed
xlazom00 opened this issue Mar 13, 2013 · 14 comments
Closed

Comments

@xlazom00
Copy link

OMX_VIDEO_PARAM_BITRATETYPE bitrate_param;

GST_OMX_INIT_STRUCT (&bitrate_param); // set up to init values
bitrate_param.nPortIndex = self->enc_out_port->index;

OMX_ERRORTYPE err;
err = OMX_GetParameter (self->enc->handle, OMX_IndexParamVideoBitrate, &bitrate_param);

OMX_GetParameter return zero in version, size, port
It should return same port I setup up before OMX_GetParameter
right version and size

some frameworks like gst-omx use get/set mechanism for initialization

@sdroege
Copy link

sdroege commented Mar 13, 2013

And if getting that parameter is not supported the corresponding error should be returned

@popcornmix
Copy link
Contributor

Getting this parameter is supported (by video_encode). OpenMax guy says this does work in general.
Can you provide an example that shows the problem (e.g. by editing hello_encode example).
Is an error response set?

@xlazom00
Copy link
Author

OMX_VIDEO_PARAM_BITRATETYPE bitrate_param;

// set up to init values like version, size , port,...
bitrate_param.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE);
bitrate_param.nVersion.nVersion = OMX_VERSION;
GST_OMX_INIT_STRUCT (&bitrate_param);
bitrate_param.nPortIndex = 201;

But after this
OMX_GetParameter (self->enc->handle, OMX_IndexParamVideoBitrate, &bitrate_param);

all values in bitrate_param looks like after
memset(&bitrateType, 0, sizeof(OMX_VIDEO_PARAM_BITRATETYPE));

nSize == 0 nVersion ==0 , nPortIndex == 0,....
OMX accept values but zero buffer.

@popcornmix
Copy link
Contributor

@xlazom00
You've just repeated your first message. Can you produce a self contained example that exhibit your problem.
It should be possible to trivially modify hello_encode to do this.

@xlazom00
Copy link
Author

@popcornmix
Copy link
Contributor

@xlazom00
Thanks, I'll pass it on.

@popcornmix
Copy link
Contributor

Confirmed. A bug report is opened in our jira bugtracker.

@Ruffio
Copy link

Ruffio commented Jun 24, 2015

@popcornmix has this been resolved in the jira bugtracker?

@popcornmix
Copy link
Contributor

Pretty sure this has been fixed. @xlazom00 can you still reproduce this?

@6by9
Copy link

6by9 commented Jun 24, 2015

Just looking at the source and I don't think this is fixed.
nSize an nVersion aren't set by default in the component, and getParameter copies port->video_bitrate in its entirety, so returns 0 for those fields. Two line patch required I think - @popcornmix I'll ping it through to you.

popcornmix added a commit that referenced this issue Jun 26, 2015
kernel: bcm2708-spi: Don't use static pin configuration with DT

kernel: bcm2708-i2s: Don't use static pin configuration with DT

kernel: gpio-poweroff: Allow it to work on Raspberry Pi
See: raspberrypi/linux#1031

kernel: BCM270X_DT: Create a core clock, use it for SPI and sdhost

kernel: BCM270X_DT: Add overlay to enable uart1
See: raspberrypi/linux#1008

kernel: config: Enable ZSMALLOC, ZRAM and PGTABLE_MAPPING
See: Hexxeh/rpi-firmware#85

firmware: arm_loader: Support initialising vchiq through mailbox property interface
See: raspberrypi/linux#1026

firmware: drivers/usb: Reduce busy-wait to sensible timeout
See: raspberrypi/linux#1026

firmware: video_encode: Initialise headers for video_bitrate
See: #163

firmware: arm_loader: Use the new core_freq DT parameter if present

firmware: arm_loader: Set the uart1_clkrate DT property from core_freq

firmware: arm_cursor: Better handling of a second app requesting a cursor

firmware: arm: Tidy up setting of arm_control and arm_bash
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this issue Jun 26, 2015
kernel: bcm2708-spi: Don't use static pin configuration with DT

kernel: bcm2708-i2s: Don't use static pin configuration with DT

kernel: gpio-poweroff: Allow it to work on Raspberry Pi
See: raspberrypi/linux#1031

kernel: BCM270X_DT: Create a core clock, use it for SPI and sdhost

kernel: BCM270X_DT: Add overlay to enable uart1
See: raspberrypi/linux#1008

kernel: config: Enable ZSMALLOC, ZRAM and PGTABLE_MAPPING
See: #85

firmware: arm_loader: Support initialising vchiq through mailbox property interface
See: raspberrypi/linux#1026

firmware: drivers/usb: Reduce busy-wait to sensible timeout
See: raspberrypi/linux#1026

firmware: video_encode: Initialise headers for video_bitrate
See: raspberrypi/firmware#163

firmware: arm_loader: Use the new core_freq DT parameter if present

firmware: arm_loader: Set the uart1_clkrate DT property from core_freq

firmware: arm_cursor: Better handling of a second app requesting a cursor

firmware: arm: Tidy up setting of arm_control and arm_bash
@popcornmix
Copy link
Contributor

I've added @6by9's patch in latest rpi-update - does that help?

neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
kernel: bcm2708-spi: Don't use static pin configuration with DT

kernel: bcm2708-i2s: Don't use static pin configuration with DT

kernel: gpio-poweroff: Allow it to work on Raspberry Pi
See: raspberrypi/linux#1031

kernel: BCM270X_DT: Create a core clock, use it for SPI and sdhost

kernel: BCM270X_DT: Add overlay to enable uart1
See: raspberrypi/linux#1008

kernel: config: Enable ZSMALLOC, ZRAM and PGTABLE_MAPPING
See: Hexxeh/rpi-firmware#85

firmware: arm_loader: Support initialising vchiq through mailbox property interface
See: raspberrypi/linux#1026

firmware: drivers/usb: Reduce busy-wait to sensible timeout
See: raspberrypi/linux#1026

firmware: video_encode: Initialise headers for video_bitrate
See: raspberrypi#163

firmware: arm_loader: Use the new core_freq DT parameter if present

firmware: arm_loader: Set the uart1_clkrate DT property from core_freq

firmware: arm_cursor: Better handling of a second app requesting a cursor

firmware: arm: Tidy up setting of arm_control and arm_bash
@JamesH65
Copy link
Contributor

JamesH65 commented Dec 7, 2017

Can this be closed as fixed?

@JamesH65
Copy link
Contributor

@6by9 This appears to be fixed?

@6by9
Copy link

6by9 commented Dec 19, 2017

AFAIK It's fixed. Confirmation would have been nice from the OP, but may as well close after all this time.

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

No branches or pull requests

6 participants