×
Namespaces

Variants
Actions

Archived:How to record and play video in m

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

M on Symbian is not maintained and may not run on current Symbian versions. All M articles have been archived.

Article Metadata
Tested with
Devices(s): Nokia N95, Nokia E90
Compatibility
Platform(s): S60 2nd Edition, S60 3rd Edition, S60 5th Edition
Symbian
S60 5th Edition
Platform Security
Capabilities: )
Article
Created: bogdan.galiceanu (06 May 2009)
Last edited: hamishwillee (09 May 2013)

Contents

Overview

This article shows how to record and play video in m.

Preconditions

Note: The create function of the video module requires the Write permission.

Note: The open function of the video module requires the Read permission.

Source code

Retrieving supported settings

use video, cam
 
 
for i in video.recorders do
print i["name"] + "supplied by" + i["supplier"];
print "Formats:";
for j in i["formats"] do
print " " + j["name"] + "by" + j["supplier"];
print " " + "MIME types:";
for k in j["types"] do
print " " + k;
end
end
end
 
print "Available video resolutions:"
for i in cam.sizes(true) do
print i[0] + "x" + i[1];
end

Recording

use video, cam, graph, ui
 
 
//Turn on the camera in video mode
cam.on(-1, true)
//Create a new video file
video.create("C:\\video.mp4")
//Start the viewfinder
cam.view(0, 0, graph.full()[0], graph.full()[1])
 
//Set up the menu with the option to start recording
ui.menu("Options", ["Start"], false)
if ui.cmd() = "Start" then
//Prepare for recording
video.setup();
//Start
video.record();
end
 
//Set up the menu with the option to stop recording
ui.menu("Options", ["Stop"], false)
if ui.cmd() = "Stop" then
//Stop
video.stop();
//Close the video file
video.close();
//Turn off the camera
cam.off();
end

Playing

use video
 
 
//Open the video file
video.open("C:\\video.mp4")
//Set the volume to 80% of the maximum
video.volume(80)
//Start playing it
video.play()
//Wait until playing finishes
video.wait()
//Close the file
video.close()

Postconditions

The first snippet displays information about various settings, the second snippet records video and the third snippet plays video.

This page was last modified on 9 May 2013, at 05:49.
41 page views in the last 30 days.
×