You Are Here:

Community: Developer Discussion Boards

#1 Old Question Question on Displaying Video using Different Classes - 2006-02-22, 09:41

Join Date: Oct 2004
Posts: 18
anxamobile
Offline
Registered User
Hi everyone,

I've been working on an application that displays a video using MMAPI classes. And these are the things I have done. I made a class which its sole job is for initialization and starting the video playback. Inside this class is where the player is initialized and started. Below is the code snippet of my VideoClass;

class VideoClass {

Canvas canvas;

public VideoClass(Canvas canvas) {
this.canvas = canvas;
}

void initializePlayer () {
try {
Player p = Manager.createPlayer("http://mymachine/abc.mpg");
p.realize();
VideoControl vc;
if ((vc = (VideoControl)p.getControl("VideoControl")) != null) {
vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, canvas);
vc.setVisible(true);
}
p.prefetch();
} catch (MediaException pe) {
} catch (IOException ioe) {
}
}

void play() {
try {
player.start();
}catch(MediaException me) {}
}

Now I have several classes that use VideoClass in order to play the video. However, audio is playing but the video is not displayed. The code snippet below is how I invoke VideoClass;

VideoClass vc = new VideoClass(this);
vc.initializePlayer();
vc.play();

Is there anything wrong with these? Because if ever I subclass VideoClass with Canvas and then play video from there, it works fine, that is, audio and video(is shown) is played.
Reply With Quote

#2 Old Re: Question on Displaying Video using Different Classes - 2006-02-22, 15:13

Join Date: Jun 2005
Posts: 928
dcrocha's Avatar
dcrocha
Offline
Forum Nokia Expert
Canvas is an abstract class, so the correct way of using it is, indeed, by subclassing it and playing the video using the instantiated subclass.

Daniel
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying some text over video moldovan_catalin Symbian Media (Graphics & Sounds) 7 2006-07-25 14:55
Play video on Canvas with N 6600 doesnt work. Please help!!! Robert111 Mobile Java Media (Graphics & Sounds) 2 2006-02-22 09:45
Simultaneous video rendering - issue SOS arvind_v Streaming and Video 0 2006-01-04 16:12
Displaying Viewfinder while recording video anmian Symbian Media (Graphics & Sounds) 1 2005-03-09 09:05
Downloading and displaying video with WML COROVICD Browsing and Mark-ups 0 2005-03-06 21:57

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ