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
Super Contributor
lyon819
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT
Accepted Solution

How to create a video file name??

Purpose: Creat a video file name in Cascade SDK.

 

Error: When the filename is created, the actual file name still be "VID_00000142.mp4".

            mfilenameLabel->setText also shows the  "VID_00000142.mp4".

 

Question: How to create a video file name??

 

Mini code:

char *videofilename = "./shared/camera/test.mp4";

 

if (camera_roll_open_video(mCameraHandle, &mVideoFileDescriptor,
videofilename, sizeof(videofilename), CAMERA_ROLL_VIDEO_FMT_MP4)
== CAMERA_EOK) {

mfilenameLabel->setText(basename(videofilename));

 

Thanks your attention,

 

 

 

 

-Fight with BB10
Please use plain text.
Retired
PBernhardt
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: How to create a video file name??

As this is dealing with the C Camera API it should go in the Native board, but camera_roll_open_video is designed to give you an automatically generated filename. Your videofilename string is supposed to get overwritten with the actual file name of the video.

 

If you want to name the file yourself for whatever reason, just don't use the camera roll and manage it yourself.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Please use plain text.
Super Contributor
lyon819
Posts: 253
Registered: ‎08-19-2010
My Device: BB10, Playbook, 9900, 9800, 9700, 9550, 9530, 9500, 8700.
My Carrier: TT

Re: How to create a video file name??

Finally, we use  rename(filename, videofilename) to solve our issue.

 

 

-Fight with BB10
Please use plain text.