Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 14
Registered: ‎12-06-2012
My Device: BB10
My Carrier: Airtel

H264 runtime bitrate and frame change support

Hi

 

In our application, it required to change the H264 frame-rate and bit-rate runtime depending on the bandwidth available.

 

In code, I am trying to achieve with following calls

camera_error_t err;

err = camera_set_videovf_property( gCameraHandle,
CAMERA_IMGPROP_FRAMERATE, (double)gCurrentFrameRate
);
err = camera_set_video_property( gCameraHandle,

CAMERA_IMGPROP_FRAMERATE, (double)gCurrentFrameRate,
CAMERA_IMGPROP_BITRATE, gCurrentBitRate
);
if (err != CAMERA_EOK)
{
error_printf("%s[%3d]: camera_set_video_property() failed: %d\n",__FUNCTION__,__LINE__,err);
return 0;
}

New Developer
Posts: 14
Registered: ‎12-06-2012
My Device: BB10
My Carrier: Airtel

Re: H264 runtime bitrate and frame change support

Sorry for previous incomplete mail.

 

Hi

In our application, it required to change the H264 frame-rate and bit-rate runtime depending on the bandwidth available.

In code, I am trying to achieve with following calls
err = camera_set_videovf_property( gCameraHandle,
CAMERA_IMGPROP_FRAMERATE, (double)gCurrentFrameRate
);
err = camera_set_video_property( gCameraHandle,
CAMERA_IMGPROP_FRAMERATE, (double)gCurrentFrameRate,
CAMERA_IMGPROP_BITRATE, gCurrentBitRate
);

But configuration is not happening correctly.
Reason is in Encoder callback i.e. enc_video_callback, value of bitrate remains the same as previous
printf("Compressed video frame Bitrate: %lld\n", buf->framedesc.compvid.bitrate);

Please let know how to change the bitrate and framerate dynamically (on the fly)?