09-22-2011 04:55 AM - edited 09-22-2011 04:57 AM
I create a custom videoRecording like this............
try
{
player = javax.microedition.media.Manager.createPlayer("cap ture://video?" + encoding);
player.start();
videoControl = (VideoControl) player.getControl("VideoControl");
recordControl = (RecordControl) player.getControl("RecordControl");
// Initialize the video display
Field videoField = (Field) videoControl.initDisplayMode(VideoControl.USE_GUI_ PRIMITIVE, "net.rim.device.api.ui.Field");
try
{
videoControl.setDisplaySize( Display.getWidth(), Display.getHeight() );
}
catch( MediaException me )
{
// setDisplaySize is not supported
}
videoControl.setVisible(true);
add(videoField);
startRecord();
}
catch( Exception e ) // Dispose of the player if it was created
{
if( player != null )
{
player.close();
}
player = null;
}After this I called the stop record like this.....
private void startRecord()
{
try
{
recordControl.setRecordLocation(PATH);
_committed = false;
recordControl.startRecord();
_recording = true;
}
catch( Exception e )
{
StartUp.errorDialog(e.toString());
}
}There is no problem in simulator, but the problem is it doesn't work in device.
If I run the application it opens the camera and recording, when I want to stop recording it doesn't close the camera and stop the record and hang the device.
It is urgent requirement.
If any one know help me?
09-26-2011 12:47 PM
What BlackBerry Smartphone model and BlackBerry device software version are you testing on? You can find this under Options, About on the BlackBerry Smartphone.
Do you see this behaviour with the VideoRecordingDemo included with the BlackBerry Java SDK and BlackBerry JDE?
10-01-2011 12:28 AM - edited 10-01-2011 01:11 AM
Thanks for Reply,
I am using Blackberry 9780 divice (Version 6.0). Up to now also It works on simulator very nicely but what happend in the device I don't know. It opens the camera for video recording but it doesn't close and continues the recording(hang the device).
I saw the VideoRecordingDemo included with the BlackBerry Java SDK and BlackBerry JDE that is also same condition. It doesn't close the camera.
If anyone give the solution its great for me.
10-01-2011 08:13 PM - edited 10-01-2011 08:13 PM
Can you show us the code when you try and close the app?
10-03-2011 12:36 AM
I wrote this below code to stop record:
private void stopRecord()
{
try
{
recordControl.stopRecord();
recordControl.commit();
_recording = false;
if (player != null)
{
player.close();
recordControl.reset();
}
}
catch( Exception e )
{
StartUp.errorDialog("RecordControl#stopRecord() threw " + e.toString());
}
}
10-03-2011 10:08 AM
Please try to run the VideoRecordingDemo and report if you have any errors.
What is the exact behaviour? Does the application hang or continue recording? Is any error or exception thrown? Where are you saving the recorded video?
10-06-2011 09:55 AM
I run the VideoRecordingDemo
1. The application hang or continue recording.
2. In device it woriking very nice. I getting problem in device.
3. It doesn't thrown any exception.
4. I am saving file in "file:///SDCard/BlackBerry/videos"
10-06-2011 12:40 PM
#1 and 2 contradict themselves. Can you clarify what you are seeing?
10-11-2011 09:16 AM - edited 10-11-2011 09:33 AM
Thank you very much for your patient reply.
I run the VideoRecordingDemo
1. The application hang or continue recording.
2. In simulator it woriking very nice. I am getting problem in device.// I wrote here device instead of simulator(In last post.).
3. It doesn't thrown any exception.
4. I am saving file in "file:///SDCard/BlackBerry/videos"
I put my code in the following url :
After My record is completed. Then again I want to play the same record.
so After completing my record I am pushing next screen to play the saved file when user select the Play Record in MenuItem.(PlayVideoScreen(PATH,encodingFormat)).
My only problem is close the camera.
Again thanks for your Patience reply.
10-11-2011 09:22 AM
Can you set all Permissions to ALLOW on device and try it again.