BB::Multimedia:MediaPlayer

When will they be released?

Links for docs are present: https://bdsc.webapps.blackberry.com/cascades/reference/bb__multimedia__mediaplayer.html , but no page exists

The https://bdsc.webapps.blackberry.com/cascades/reference/cascades.html page has been fixed.

Stuart

Tags: BlackBerry Developers

Similar Questions

  • No sound from bb::multimedia:MediaPlayer

    If I use the following

      musicPlayer = new bb::multimedia::MediaPlayer(this);
      MediaError::Type anError = musicPlayer->setSourceUrl(QUrl("asset:///sounds/music/sample.mp3"));
      if (anError == bb::multimedia::MediaError::None)
          musicPlayer->play();
    

    There is no sound coming out. I've linked libraries.

    Documentation:

    Permissions: Applications that call this class should be the play_audio, the access_shared permission.

    If I add play_audio to the bar-descriptor - there is an error that play_audio is not recognized.

    No idea why there is no sound coming out?

    This library must be sufficient to make work of Beta 3 and following (there are more limitations in the beta 2 release).

    For your problem 'no sound', I guess you could miss one of the things below (can you double check the following things...)

    1. No logs errors or traces are produced which contains more details. Note that by default, nothing appears on the console in Beta 3. More information about registration or tracing display can be found here: http://devblog.blackberry.com/2012/10/blackberry-10-sdk-console-logging/
    2. Play/pause state is changing in fact (from distribute the signals of the MediaPlayer object)
    3. If you read a file packaged in the 'active' folder, the absolute path, you set the input energy is something like the following (using the traces of the program):

      /Accounts/1000/appdtata/[UniqueFolderForYourApp]/app/native/assets/sample.MP3

    4. The device is actually correct and audio plays through other applications (for example, the browser or application previewer of default media, through as part of the call)
    5. The volume of the device is actually maximum. In other words, use the UP/DOWN buttons on the device itself and play other media files through the browser or other
    6. Try to play something "folders" instead using the authorization of "access_shared" (as explained above)
    7. The file you are trying to play is actually correct (plays through other players) and is one of the supported formats
      https://developer.BlackBerry.com/DevZone/develop/supported_media/bb_media_support_at_a_glance.html

    Hope this helps and let us know how it goes.

    See you soon,.

    Rashid

  • How to control the volume of the MediaPlayer?

    BB:Multimedia:MediaPlayer has all the features of load, play, pause the music, but I couldn't find anything which could control the volume.

    Of course you can adjust the volume for the whole of the device, but is it possible to adjust the volume for this object?

    For example - if you have a background music in an application - it'd have to allow the user to adjust the volume of it.

    Hello djogon,

    It is certainly a valid use case. However, the API of MediaPlayer Qt (QML, Qt/C++), so far, is mainly designed for simple multimedia applications, for audio & video consumption (in local or streaming).

    This feature is currently doable by the low-level C API only; by mmrenderer:

    In other words, if you were to apply to your use case, you would have to implement playback using the C API and wrapper classes to communicate with the user of Cascades UI elements.

    The function to control the volume, in a context of mmrenderer (C API) is documented here:

    http://developer.BlackBerry.com/native/beta/reference/mmrenderer_libref/topic/mmr_api/mmr_output_par...

    ---------------------------

    The best place to start would be to look at some of the native apps sample mmrenderer, high during the scanning level tutorials and documentation (pasted below):

    ---------------------------

    * Reading video sample application - code and tutorial with C API:

    http://developer.BlackBerry.com/native/beta/documentation/video_playback_overview_2006471_11.html

    https://github.com/BlackBerry/NDK-samples/tree/next/VideoPlayback

    ---------------------------

    * PlayAudio sample application: https://github.com/blackberry/NDK-Samples/tree/next/PlayAudio

    ---------------------------

    To wrap the C/C++ API in QObjects and contact the QML UI elements, if you have not come across this already, there are other examples of applications which shows how to do this. Like this one:

    * Kakel, Cascades sample application: https://github.com/blackberry/Cascades-Samples/blob/master/kakel/src/kakelapp.h

    ---------------------------

    Some links to the relevant documentation for mmrenderer:

    http://developer.BlackBerry.com/native/beta/documentation/com.QNX.doc.Mme.mmrenderer/topic/arch.html

    http://developer.BlackBerry.com/native/beta/reference/mmrenderer_libref/topic/mm-renderer_client_api...

    http://developer.BlackBerry.com/native/beta/documentation/com.QNX.doc.Mme.mmrenderer/topic/about.htm...

    ---------------------------

    I'll try to convince the API team to include this feature in the MediaPlayer Qt API as well (for future versions of the operating system). If you can file a feature request in the Developer incidents handler, that would certainly help as well. (of course, more people asking for a function API - more chances).

    Hope at least part of this aid.

    See you soon,.
    Rashid

  • MediaPlayer in c ++

    Hello

    I'm having some trouble with MediaPlayer in C++. So I added

    #include
    

    and

    using namespace bb::multimedia;
    

    and when I am trying to create a MediaPlayer as written in the documentation:

    MediaPlayer mp(this);
    

    I get the following errors:

    ../src/Alarm.cpp:107: undefined reference to `bb::multimedia::MediaPlayer::MediaPlayer(QObject*)'
    ../src/Alarm.cpp:107: undefined reference to `bb::multimedia::MediaPlayer::~MediaPlayer()'
    

    Please notify.

    Try adding - lbbmultimedia

  • Error in MediaPlayer

    I'm doing something wrong here? I copied the example and you get the error:

    'class bb::multimedia:MediaPlayer' has no member named 'setSource.

    MediaPlayer mp(this);
            mp.setSource("/path/to/media.mp3");
            mp.play();
    

    No idea why it has no member named setSource? I seized semiautomatic on mp. and there setSoruce their.

    I'm also including:

    #include

    using namespace bb::multimedia;

    In R6, to use the MediaPlayer API, all the following libraries had to be bound: lbbmultimedia, lmmrndclient, lstrm and lasound.
    For R9, the following library is sufficient: lbbmultimedia.

    https://developer.BlackBerry.com/Cascades/documentation/dev/upgrading/platformchanges.html

  • Why NowPlayingConnection can be assigned to the C++ object as a property?

    Is there a reason why NowPlayingConnection can't be assigned to the property?

    I followed fragments of code (C++), setters and getters created well, all imports also.

    Q_PROPERTY (bb::multimedia::MediaPlayer* mediaPlayer READ mediaPlayer WRITE setMediaPlayer)
    Q_PROPERTY (bb::multimedia::NowPlayingConnection* nowPlaying READ nowPlaying WRITE setNowPlaying)
    

    Then in QML I'm assigning

            DownloadedPodcastsManager {
                id: downloadedPodcastsManager
                mediaPlayer: player
                nowPlaying: nowPlayingConnection
            },
    

    And allocation of property called mediaPlayer works well but assign nowPlayingConnection ends with

    Error: Cannot assign QObject * void

    reported by QML.

    I don't know what the problem is.

    Any clue?

    Tom

    I found most likely the root cause.

    QML is passing the instance of bb::multimedia:QmlNowPlayingConnection instead of bb::multimedia:NowPlayingConnection

    This is the reason why the property declared as bb::multimedia:NowPlayingConnection * cannot be assigned

    So I made this property of the QObject and casting instead I need so it works fine now. Not happy with this, but better than nothing.

  • Current length of track using mm_renderer

    Hello

    IM writing my own MediaPlayer using the API of Client for the multimedia rendering engine. How can I implement a getDuration() method (which must returns the duration of the current track in seconds) using this API? Is it still possible? AFAIK the default MediaPlayer - bb/multimedia/MediaPlayer encapsulates the ROR, so there must be a way to achieve

    Thanks in advance

    Hello iksarp,

    You can make use of the mm-converter of event management new mechanism to achieve this. It is located in the header file: 'mm/renderer/events.h. ' You would have to wait for the events of mm-rendering engine and look in the Dictionary object that it returns for different events. Specifically, for the field "Duration", it is returned in milliseconds and I am pasting a few snippets below:

    
        // At first, set up everything for the mm-renderer context to run
        // The set up steps should be similar to the existing sample application (https://github.com/blackberry/NDK-Samples/blob/next/VideoPlayback/main.c) but WITHOUT THE BPS EVENT HANDLING for mm-renderer
        // That is, you DO NOT need to do handle BPS event handling if you do the following event handling with "mm/renderer/evenths.h"
    
        // Now, do the event handling
        int errorWait;
        const mmr_event_t* event;
    
        for (;;)  {
            errorWait = mmr_event_wait( mmr_context );
    
            if (errorWait != 0 ) {
                //TODO: Error handling
            }
            // now, get the actual event
            event = mmr_event_get( mmr_context);
    
            switch (event->type) {
            // TODO: Handle all other switch cases, for the event types
            case 6:
                //metadata
                printf("###### event->type = 6 = MMR_EVENT_METADATA\n");
    
                const char *duration = strm_dict_find_value( event->data, "md_title_duration");
                fprintf(stdout, "duration= %s\n", duration);
    
                break;
            } // switch
    
            fflush(stdout);
        } // for
    

    Essentially, for each event from mm-rendering engine, a set of attributes are exposed as elements of dictionary (in the 'data' field), to reflect the current state of the mm-engine rendering context (for example, read status, title, duration, etc.).

    What's new with Beta 3 and the documentation is still not published correctly. We apologize for this; I have raised this issue with the documentation teams and I'll try to get them to publish

    Hope this helps and please let us know if you need anything that anyone else.

    See you soon,.

    Rashid

  • MediaPlayer or Media Player-call to play http internet radio url?

    When I try a MediaPlayer ( http://developer.blackberry.com/native/reference/cascades/bb__multimedia__mediaplayer.html ) or call the media player on a http url of an internet radio station that either, they don't play, or I get an error.  I do not use a m3u or pls file. I use a working url for a radio station internet active as the url of the source. I imported "bb.multimedia 1.0" in QML and have "LIBS +=-lbbmultimedia" in my pro account and ask permission to internet for the app. MediaPlayer or Player multimedia native manages these URLS? Someone at - it a working example. Try the SOMAFM radio URL and nothing happens.

    Found: for the shoutcast stream, you have to put a ' /; "after the url.

  • How to use core mediaplayer for YouTube videos?

    Hi all

    I try to use the mediaplayer core to show a YouTube video.

    This is the code I wrote:

    MyApp::startYoutube (QString uri) {}

    InvokeRequest cardRequest;

    cardRequest.setTarget ("sys.mediaplayer.previewer");

    cardRequest.setAction ("bb.action.OPEN");

    cardRequest.setMimeType("video/x-youtube"); also tried with video/mp4 and video/x-flv

    cardRequest.setUri (uri);

    BB::System:InvokeManager invokeMan;

    invokeMan.invoke (cardRequest);

    }

    but in passing the url of YouTube (http://www.youtube.com/v/VIDEO_ID) advice me called card format is not supported.

    I know it's possible beacause of FastTube app, but I can't find the solution.

    Where is the error?

    Thanks in advance.

    Matt

    Hi @beat84,.

    The link you are trying to read is basically a URL for the web browser, correct? It's YouTube would need HTML5 or Flash enabled to show you that the content (it shows the custom controls in the correct YouTube Player?). To play things from YouTube, with this type of format of the URL, you have to play within a WebView component if you wanted to use it in a native application. The webkit runtime has its own (same as seen through the browser application) player who will go to full screen when the user plays the content. Alternatively, you can take a glance at native applications as Nobex Radio or SoundHound who plays video YouTube by WebView.

    To play using the media base Previewer map app (that you are trying to do below), you must know the final destination of the server URL (for example: http://domainName.com/file.mp4). Basically, the server will send the encoded media, according to a protocol recognized by the multimedia platform BlackBerry 10.

    I hope this helps.

    See you soon,.
    Rashid

    Applications development consultant | Relationships with developers

    BlackBerry @surashid

  • MediaPlayer video stream off after 3 seconds

    I have a problem to properly display Http Live Streaming on a Z10 so that they appear correctly on a dev to Alpha Z10.

    Works well on AlphaA 10.9.10.35

    Stop after 3 seconds on AlphaC 10.1.0.138 and Z10 (latest Firmware)

    The code is made of QML:

    vidPlayer.windowId = fwcVideoSurfaceLive.windowId;

    vidPlayer.sourceUrl = XXXXXXXXXX;

    vidPlayer.prepare ();

    vidPlayer.play ();

    Nothing difficult about the installation

    attachedObjects:]

    MediaPlayer {}

    ID: vidPlayer

    objectName: "vidPlayerId."

    videoOutput: VideoOutput.PrimaryDisplay

    The name of the window to create.

    windowId: fwcVideoSurfaceLive.windowId

    onMediaStateChanged: {}

    If (mediaState == MediaState.Started) {}

    actionPlayPause.setEnabled (true);

    } ElseIf (mediaState == MediaState.Stopped) {}

    actionPlayPause.setEnabled (true);

    }

    }

    onError: {}

    pauseLive();

    }

    }

    ]

    {ForeignWindowControl}

    ID: fwcVideoSurfaceLive

    windowId: "liveVideoSurface."

    updatedProperties: WindowProperty.Size | WindowProperty.Position | WindowProperty.Visible

    visible: boundToWindow

    minWidth: 728

    maxWidth: minWidth

    minHeight: 410

    maxHeight: minHeight

    onBoundToWindowChanged: {}

    stubvideoId.visible =! boundToWindow;

    }

    }

    Tested with the browser, same results. Q10, a dialog box displaying a generic error 'multimedia', but it works well on AlphaA

    I checked on Blackberry Forum and found only a single message about the stop mediaplayer

    http://supportforums.BlackBerry.com/T5/Android-runtime-development/streaming-with-MediaPlayer/TD-p/2... It seems not to be the same bug. No redirection in the stream URL.

    Any tips?

    Thank you

    MIK

    We had the same bug if m3u8 stream you play has several bitstreams together, and especially if a stream switch is currently set. If possible, try to change the server to only listen to a single flow and see if that fixes it.

  • Potential bug in MediaPlayer

    Hello

    Looks like I found bug in MediaPlayer (http://developer.blackberry.com/cascades/reference/bb__multimedia__mediaplayer.html).

    It is the sequel URL:

    http://www.eardrumsmusic.com/map/the%20Electones%20-%20Right%20Foot%20From%20Left.MP3

    Now if you open it in browser, you'll notice that there redirect loop. MediaPlayer intercepts not this and completely freezes the app. The only way out of the State is to restart the phone.

    Any ideas how I could work around this problem so that it is not resolved in MediaPlayer?

    What is a good way to report bug in BlackBerry?

    See you soon,.

    Dalius

    Hello @daliusd,

    Thanks for reporting this. Our team of multimedia platform took a glance to this question and it seems that the URL below has an infinite redirection loop; more than 100 redirects. We are looking into it it now to find out how to solve this problem, the best way.

    For reporting problems, you can use the public developer Issue Tracker: https://www.blackberry.com/jira/secure/Dashboard.jspa

    See you soon,.
    Rashid

  • Error() MediaPlayer does not?

    Hey gang,

    I am trying to connect the error() signal in the MediaPlayer to a location private in a custom class.  The code is:

    connect(&m_player, SIGNAL(error(bb::multimedia::MediaError::Type, unsigned int)), this, SLOT(onPlaybackError(bb::multimedia::MediaError::Type, unsigned int)));
    

    and the slot is:

    void Job::onPlaybackError(bb::multimedia::MediaError::Type mediaError, unsigned int position) {
        qDebug() << "Job::onPlaybackError(), mediaError: " << mediaError << ", and position: " << position;
        emit finished(m_taskName, 256);
    }
    

    I can see in the console there is an error if there is no such thing as the mp3 that I'm playing, but my slot onPlaybackError() is never called.  the application compiles and works very well, but the slot never fires.

    I have an another slot defined that I connect to the playbackCompleted() signal in the MediaPlayer, and it works perfectly... Really there is not much difference between the two that I see.  both are defined as private in the header file locations.  that is to say:

    private slots:
        void onPlaybackCompleted();
        void onPlaybackError(bb::multimedia::MediaError::Type, unsigned int);
    

    no idea why we could work and the other is not?

    Thank you!

    J

    Yes, that would be my next suggestion. 'File not found' is not really an error in media, more like a system I/O problem, so maybe as you say that's not pulled the signal of error on MediaPlayer. I expected MediaError.SourceUnavailable to be triggered, but the docs do not provide a lot of details on this one. Maybe you need to use QFile to confirm the existence of the MP3 before submitting it again to MediaPlayer.

    oddboy wrote:

    Hello

    I tried Q_ASSERT (result) on the connect line that bothers me, and the app does not end.

    I also print the qDebug() 'Result' variable.  Here is what says the console:

    ############# Q_ASSERT(result) is  true
    

    And yet, the signal never fires.  I'm starting to wonder if error() signal is not pulled for the problem that I'm trying to catch - which is actually an mp3 player that does not exist.

    My test is simple:

    create a MediaPlayer

    Set the source to a mp3 player that exists

    Play() sound

    result = everything is ok

    Rename the mp3 and try to play the sound

    result = sound is not played, but MediaPlayer::error() does not.

    My onPlaybackError () handler is quite simple...

    void Job::onPlaybackError(bb::multimedia::MediaError::Type mediaError, unsigned int position) {
        qDebug() << "Job::onPlaybackError(), mediaError: " << mediaError << ", and position: " << position;
    }
    

    Here's the MediaPlayer debugging too...

    .. puzzled even...

    START 19 MediaPlayer::setSourceUrl
    MediaPlayer::setSourceUrl: url=QUrl("/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3")
    START 19 MediaPlayerPrivate::detachInput
    START 19 MediaPlayerPrivate::setMediaState
    MediaPlayerPrivate::setMediaState: Attempting to change to same state.  mediaState=Unprepared
    => END 19 ( 4 ms):
    => END 19 ( 9 ms):
    START 19 MediaPlayerPrivate::setMediaState
    MediaPlayerPrivate::setMediaState: Attempting to change to same state.  mediaState=Unprepared
    => END 19 ( 4 ms):
    MediaPlayer::setSourceUrl: emit sourceChanged()
    MediaPlayer::setSourceUrl:   url=QUrl("/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3")
    => END 19 ( 26 ms):
    START 19 MediaPlayer::prepare
    START 19 MediaPlayerPrivate::generateAudioOutputUrl
    MediaPlayerPrivate::generateAudioOutputUrl: audioOutput=Default
    => END 19 ( 4 ms):
    START 19 MediaPlayerPrivate::generateVideoOutputUrl
    MediaPlayerPrivate::generateVideoOutputUrl: videoOutput=None
    MediaPlayerPrivate::generateVideoOutputUrl: windowId=""
    MediaPlayerPrivate::generateVideoOutputUrl: windowGroupId=""
    => END 19 ( 12 ms):
    START 1 MmrContextNotifier::onReadyRead
    START 19 MediaPlayerPrivate::updateAudioOutputParams
    MmrContextNotifier::onReadyRead: QMap(("@output0", PpsAttribute(Object, QFlags(0x4) ,  QMap() ) ) )
    => END 19 ( 3 ms):
    => END 1 ( 5 ms):
    START 19 MediaPlayerPrivate::attachInput
    START 1 MmrContextNotifier::onReadyRead
    MediaPlayerPrivate::attachInput: url=QUrl("/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3")
    MmrContextNotifier::onReadyRead: QMap(("@output0", PpsAttribute(Object, QFlags() ,  QMap(("type", PpsAttribute(String, QFlags() ,  "audio" ) ) ( "url" ,  PpsAttribute( String,  QFlags() ,  "audio:default" ) ) ( "volume" ,  PpsAttribute( String,  QFlags() ,  "100" ) ) )  ) ) )
    MediaPlayerPrivate::attachInput: Attempting to attach input. url="file:///accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3", type="playlist"
    => END 1 ( 4 ms):
    START 19 MediaPlayerPrivate::lastError
    => END 19 ( 2 ms):
    MediaPlayerPrivate::attachInput: Attempting to attach input. url="/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3", type="autolist"
    START 1 MmrContextNotifier::onReadyRead
    MmrContextNotifier::onReadyRead: QMap(("@play-queue", PpsAttribute(Object, QFlags(0x4) ,  QMap() ) ) )
    START 1 MmrContextNotifier::onPpsPlayQueueChanged
    => END 1 ( 1 ms):
    => END 1 ( 10 ms):
    START 1 MmrContextNotifier::onReadyRead
    MmrContextNotifier::onReadyRead: QMap(("@play-queue", PpsAttribute(Object, QFlags(0x2) ,  QMap() ) ) )
    START 1 MmrContextNotifier::onPpsPlayQueueChanged
    => END 1 ( 1 ms):
    => END 1 ( 5 ms):
    START 19 MediaPlayerPrivate::lastError
    => END 19 ( 2 ms):
    MediaPlayerPrivate::attachInput: Unable to attach source input. url="/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3", e=SourceUnavailable
    => END 19 ( 43 ms):
    MediaPlayer::prepare: Error attaching input source, error=SourceUnavailable
    => END 19 ( 82 ms):
    START 19 MediaPlayer::play
    START 19 MediaPlayer::prepare
    START 19 MediaPlayerPrivate::generateAudioOutputUrl
    MediaPlayerPrivate::generateAudioOutputUrl: audioOutput=Default
    => END 19 ( 2 ms):
    START 19 MediaPlayerPrivate::generateVideoOutputUrl
    MediaPlayerPrivate::generateVideoOutputUrl: videoOutput=None
    MediaPlayerPrivate::generateVideoOutputUrl: windowId=""
    MediaPlayerPrivate::generateVideoOutputUrl: windowGroupId=""
    => END 19 ( 6 ms):
    START 19 MediaPlayerPrivate::updateAudioOutputParams
    => END 19 ( 2 ms):
    START 19 MediaPlayerPrivate::attachInput
    MediaPlayerPrivate::attachInput: url=QUrl("/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3")
    MediaPlayerPrivate::attachInput: Attempting to attach input. url="file:///accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3", type="playlist"
    START 19 MediaPlayerPrivate::lastError
    => END 19 ( 1 ms):
    MediaPlayerPrivate::attachInput: Attempting to attach input. url="/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3", type="autolist"
    START 1 MmrContextNotifier::onReadyRead
    MmrContextNotifier::onReadyRead: QMap(("@play-queue", PpsAttribute(Object, QFlags(0x4) ,  QMap() ) ) )
    START 1 MmrContextNotifier::onPpsPlayQueueChanged
    => END 1 ( 2 ms):
    => END 1 ( 6 ms):
    START 1 MmrContextNotifier::onReadyRead
    MmrContextNotifier::onReadyRead: QMap(("@play-queue", PpsAttribute(Object, QFlags(0x2) ,  QMap() ) ) )
    START 1 MmrContextNotifier::onPpsPlayQueueChanged
    => END 1 ( 1 ms):
    => END 1 ( 5 ms):
    START 19 MediaPlayerPrivate::lastError
    => END 19 ( 2 ms):
    MediaPlayerPrivate::attachInput: Unable to attach source input. url="/accounts/1000/appdata/com.oddelement.bron.testDev_lement_brondbbdfa23/shared/misc/sound.mp3", e=SourceUnavailable
    => END 19 ( 39 ms):
    MediaPlayer::prepare: Error attaching input source, error=SourceUnavailable
    => END 19 ( 58 ms):
    MediaPlayer::play: Unable to prepare the player. error=SourceUnavailable
    => END 19 ( 62 ms):
    
  • MediaPlayer error() not marked as Qt signal?

    Hello

    Using the SDK 10.1.0.4828 and try to catch the mistakes of MediaPlayer.  Momentics, the line below is reported as a bug and my slot is never called.

         this->connect(&m_player, SIGNAL(error(bb::multimedia::MediaError::Type mediaError, unsigned int position)), this, SLOT(onPlaybackError()));
    

    the error is:

    MediaPlayer::error(bb::multimedia::MediaError::Type mediaError, unsigned int position) has not been tagged as a Qt signal; make sure all parameter types are fully qualified.
    

    the application compiles and works very well, but if there is a mistake in the reading of the media, my onPlaybackError() function never fires.

    How do I make this signal/slot connection to make it work?

    THX,

    J

    Do not include the parameter names in the connect(), only to types. Also, your site must have parameters to your signal, even if you don't use them. If it is not the connection will fail.

    Finally, it is common to save the return value of connect() function and then test it with Q_ASSERT(), so you are alerted to signal/slot connection issues when you run the application. This can save debugging headaches later.

    oddboy wrote:

    Hello

    Using the SDK 10.1.0.4828 and try to catch the mistakes of MediaPlayer.  Momentics, the line below is reported as a bug and my slot is never called.

           this->connect(&m_player, SIGNAL(error(bb::multimedia::MediaError::Type mediaError, unsigned int position)), this, SLOT(onPlaybackError()));
    

    the error is:

    MediaPlayer::error(bb::multimedia::MediaError::Type mediaError, unsigned int position) has not been tagged as a Qt signal; make sure all parameter types are fully qualified.
    

    the application compiles and works very well, but if there is a mistake in the reading of the media, my onPlaybackError() function never fires.

    How do I make this signal/slot connection to make it work?

    THX,

    J

  • How can I play videos with only a MediaPlayer?

    I want to play two videos with only a MediaPlayer:
    private static MediaPlayerBuilder mpB;
    private static Media mLogo;
    private static Media mSaludo;
    private static MediaPlayer mpLogo;
    private static MediaView mvLogo;
    private static Group gLogo;
    
    public void start(final Stage stage) {
    ...
    mLogo = MediaBuilder.create().source(myGetResource(VIDEOLOGO_PATH)).build();
    mSaludo = MediaBuilder.create().source(myGetResource(VIDEOSALUDO_PATH)).build();
    mpB = MediaPlayerBuilder.create(); 
    mpLogo = mpB.media(mLogo).build();
    mvLogo = MediaViewBuilder.create().mediaPlayer(mpLogo).build();
    gLogo.getChildren().add(mvLogo);
    ...
    sActual = new Scene(gPozos, WIDTH, HEIGHT, Color.BLACK);
    stage.setScene(sActual);
    stage.show();
    When I want to play mLogo:
    sActual.setRoot(gLogo);
    mpLogo.play();
    Then, when I want to play mSaludo I do the following:
    mpLogo = mpB.media(mSaludo).build();
    sActual.setRoot(gLogo);
    mpLogo.play();
    or this:
    mpB.media(mSaludo).applyTo(mpLogo); 
    sActual.setRoot(gLogo);
    mpLogo.play();
    or this:
    mpB.media(mSaludo);
    sActual.setRoot(gLogo);
    mpLogo.play();
    But it is impossible to change the media. It does not work. Sometimes I play video mLogo and sometimes (according to the code) the video mLogo does not start and I see a picture of the first keyframe and nothing else. I have no exception, no error, nothing.
    I want to play mLogo, then mSaludo. How can I do this?

    Thank you
    Noelia

    I want to play two videos with only a MediaPlayer

    You can not.

    MediaPlayer documentation: http://docs.oracle.com/javafx/2.0/api/javafx/scene/media/MediaPlayer.html#MediaPlayer (javafx.scene.media.Media)
    "Create a player for a specific medium. This is the only way to associate a multimedia object with a MediaPlayer: once the player is created, it is not editable. The errors that occur synchronously within the constructor will cause exceptions to be thrown. The errors that occur asynchronously will cause the error to be together and therefore any recall onError property to call. "

    I have no exception, no error, nothing.

    Certain exceptions MediaPlayer, they occur asynchronously and you must explicitly add a listener for them, or you will never know that they occur.
    Your code has additional problems, for example, you cannot change an object built from a manufacturer after the object has already been built.
    --------
    What you want to read a video with a single MediaView, and have the second video starts automatically after the first video is over. Note that it is the MediaView that is shared, not the MediaPlayers.
    Here is an example for this.

    public class TwoVideos extends Application {
      public static void main(String[] args) throws Exception { launch(args); }
      public void start(final Stage stage) throws Exception {
        final StackPane layout = new StackPane();
    
        // create some media players.
        final MediaPlayer logoSrc   = // first video is just 16sec (thank goodness...)
          createPlayer("http://www.hackerdude.com/channels-test/20051210-w50s.flv");
        final MediaPlayer soludoSrc =
          createPlayer("http://download.oracle.com/otndocs/products/javafx/oow2010-2.flv");
    
        // create a view to show the mediaplayers.
        final MediaView mediaView = new MediaView(logoSrc);
    
        // play the logo video, followed by the soludo video, followed by a finished message.
        logoSrc.play();
        logoSrc.setOnEndOfMedia(new Runnable() {
          @Override public void run() {
            mediaView.setMediaPlayer(soludoSrc);
            soludoSrc.play();
          }
        });
        soludoSrc.setOnEndOfMedia(new Runnable() {
          @Override public void run() {
            layout.getChildren().remove(mediaView);
            layout.getChildren().add(new Label("All Done!"));
          }
        });
    
        // layout the scene.
        layout.setStyle("-fx-background-color: cornsilk; -fx-font-size: 20; -fx-padding: 10;");
        layout.getChildren().addAll(mediaView);
        Scene scene = new Scene(layout, 600, 400);
        stage.setScene(scene);
        stage.show();
      }
    
      /** @return a MediaPlayer for the given source which will report any errors it encounters */
      private MediaPlayer createPlayer(String aMediaSrc) {
        final MediaPlayer player = new MediaPlayer(new Media(aMediaSrc));
        player.setOnError(new Runnable() {
          @Override public void run() {
            System.out.println("Media error occurred: " + player.getError());
          }
        });
        return player;
      }
    }
    

    On my machine (win7, javafx 2.0, jdk7), this example will not work correctly about 50% of the time, the rest of the time I get an error from the corruption of the media reported, I guess due to errors in the media stack, because it works sometimes. I'll try it again with the next 2.0.2 version JavaFX and report a Jira if it still does not work. You can try the code above with your videos, and if he does not report errors to the command line, then likely will work best for you.

  • Numbers: Removal of multimedia content don't effect size of the document file.

    Hello people,

    right now I'm working on a very simple table in the Pages.

    I have reproduced a file already created by my colleague, because the page layout and all formulations must remain the same for the work that I do. The size of this document was large 1 GB (probably because there was a lot of images inside).

    But after you remove all of the content, the size is always that great! I don't have more than two empty tables with just a small amount of text inside! It's as if the media is not really gone! I also tried to reduce the size of my project with this feature, but all he said was: cannot reduce the size of the project, it is already optimal!

    So I tried to work around the problem and just copied and pasted my table to a new file. And then he gave me a 98 k file size!

    But I had to resize all my cells and everything, so this work around is not really effective and functional for me.

    I don't understand why the deletion of all media in my file doesn't effect size of my document. Am I missing something?

    I really need to create a large number of these documents and this is something that really bothers me.

    Can someone help me please. Is it possible to really get rid of multimedia content? as to delete the cache, or I don't know.

    Thanks a lot in advance for any kind of help!

    Pages v5.6.2. OS X 10.11.6.

    The key to changes in dynamic document is AutoSave must be activated, which happens only if the document is opened, edited and saved at least once in iCloud drive, or your home account on the boot drive.

    If the above were true, then your removal of images would have a corresponding reduction in the size of the document, as seen by the intermediary to read the information. I tested here with my own images, and the gradual reduction of size of the document is measurable with each image removed by the intermediary to read the information.

    One of the table cells still have images in their midst? Was it originally a Word document with embedded in Excel table data?

Maybe you are looking for

  • I want to access BBC 5 minutes from yesterday.

    The site of the BBC for 5 Minutes was dated last until 18/04/12 and I can't access 5 minutes from yesterday with Peter Ackroyd. This site appears in my browsing history. I tried to book the mark, but he has not appeared in my book mark folders

  • iMac 5 k 64 gig RAM?

    OWC offers a concert 64 for the iMac of 5K and application it works perfectly. Has anyone tried this before?

  • Windows automatic update notification.

    I keep getting notifications for updates for programs I don't have or don't want to and cannot get rid of them. How do I clear the. Specifically for Explorer 8 and Office 2007, neither of which I have or want.

  • can I reinstall my audio device & drivers of my original cd XP Home?

    Hello everyone, my system is a dell dimension 4550, OS XP Home, service 3.  I lost all sound. in the Panel, it says there is no audio device & there is no drivers showing. your help is greatly appreciated.

  • Failed to start after the windows logo screen, please help.

    Original title: STARTUP DO NOT FULLY Hi, I run windows XP Home Edition on my laptop, when I switch it on it boots until the windows logo and no more, can anyone help please. I tried F11 to safemode etc but is still no more than the windows logo.