×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Play a video file: is it possible?

    Friends

    I already googled around and still hadn't any solid information. So here goes the questions:

    a) Is video API available for latest PyS60 releases?

    b) Where is it documented?

    c) If not, where I can get some code snippets showing how to play a video file (say, in 3GP or preferable in flv/mpeg4)?


    Best regards


    Adenilson

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Play a video file: is it possible?

    Quote Originally Posted by savago View Post
    I already googled around and still hadn't any solid information. So here goes the questions:

    a) Is video API available for latest PyS60 releases?

    b) Where is it documented?
    Hmph,

    I'm pretty sure I've seen PyS60 manual in google, really strange if you didn't find it! In that case it might be better to check the manual directly. For example this might be useful:

    5.3 camera - Interface for taking photographs and video recording

    start record(filename, callable)
    Starts video recording. Filename is the file where the video clip is saved and callable will be called with possible error code (int) and status information (see data in module camera) as parameter.
    Cheers,

    --jouni

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Re: Play a video file: is it possible?

    Dear JOM

    I don't want to record a video... as matter of fact, I just want to *play* an already existent video file.

    In the same spirit of 'audio' module, can I do something like:

    import video
    import appuifw

    v_obj = video.File.open('foo.flv')
    acanvas = appuifw.Canvas()
    v_obj.setCanvas(acanvas)
    appuifw.app.body = acanvas
    v_obj.play()


    Regards


    Adenilson

  4. #4
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: Play a video file: is it possible?

    Quote Originally Posted by savago View Post
    - - where I can get some code snippets showing how to play a video file (say, in 3GP or preferable in flv/mpeg4)?
    At least you can use "content handler" to open video file:
    http://www.google.com/search?q=appuifw.Content_handler

  5. #5
    Registered User
    Join Date
    Jul 2007
    Posts
    18

    Re: Play a video file: is it possible?

    Friend


    Thanks for the tip, I solved it with this code (I hope that it dont break the indenting).


    Best regards


    Adenilson

    /*****************************************************************/
    import e32
    import appuifw

    def sys_play(filename):
    lock = e32.Ao_lock()
    handler = appuifw.Content_handler(lock.signal)
    handler.open(filename)
    lock.wait()

    #Try to open video files in the memory card
    sys_play(u'E:\\Videos\\natasha.3gp')
    sys_play(u'E:\\Videos\\real.rm')

  6. #6
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: Play a video file: is it possible?

    Quote Originally Posted by savago View Post
    Thanks for the tip, I solved it with this code (I hope that it dont break the indenting).
    You're welcome.

    And you can (and should) always use CODE-tags around code snippets (#-icon in message editor):


    Code:
    /*****************************************************************/
    import e32
    import appuifw
    
    def sys_play(filename):
           lock = e32.Ao_lock()
           handler = appuifw.Content_handler(lock.signal)
           handler.open(filename)
           lock.wait()
    
    #Try to open video files in the memory card
    sys_play(u'E:\\Videos\\natasha.3gp')
    sys_play(u'E:\\Videos\\real.rm')

Similar Threads

  1. To play raw audio data file
    By pawans in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-12-11, 11:38
  2. Send Video file through gprs from mobile to mobile
    By tkaihock in forum Symbian Networking & Messaging (Closed)
    Replies: 13
    Last Post: 2008-10-11, 11:19
  3. cannot able to play a video file.
    By shalini.mishra in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2006-11-13, 16:54
  4. how to play video file on midlet program
    By mathi77in in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-07-16, 06:46

Posting Permissions

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