maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Annnounce] Sociality | Facebook client in Qt (https://talk.maemo.org/showthread.php?t=72842)

JohnLF 2011-05-23 22:23

Re: [Annnounce] Sociality | Facebook client in Qt
 
Thats in the next version, or one coming soon.... This app is very early in development (although still very feature rich).

MohammadAG 2011-05-24 00:31

Re: [Annnounce] Sociality | Facebook client in Qt
 
marxian, I tried switching to Phonon, and I'm getting the same result.
When I get the URL, I'm just doing a:
Code:

    // m_player is m_player(new Phonon::VideoPlayer(Phonon::VideoCategory, this))
    m_player->load(Phonon::MediaSource(url));
    m_player->play();

That doesn't seem to be doing anything (and Phonon::VideoPlayer lacks error reporting apparently...)

I looked at cutetube again and saw it's doing the same, though last I checked (a month or two ago), cutetube had a working built in video player.

Edit: oh and images (at least most of them for avatars and such) are now cached.

Any ideas?

marxian 2011-05-24 01:14

Re: [Annnounce] Sociality | Facebook client in Qt
 
The Python version of cuteTube uses Python's urllib to get the URL, but that's the only difference, and it shouldn't affect the playback.

I took a quick look at the source code, and the method used to load the video is the same as yours, so I can't see any reason why it shouldn't play. It might be worth connecting a slot to the mediaobject's tick(qint64) signal, and see if the current position of the video is changing.

Code:


connect(m_player->mediaObject(), SIGNAL(tick(qint64)), this, SLOT(checkPos(qint64)));


void MyPlayer::checkPos(qint64 time) {
qDebug() << time;
]
}


sil 2011-05-24 08:46

Re: [Annnounce] Sociality | Facebook client in Qt
 
Quote:

Originally Posted by laurenward1990 (Post 1013976)
Hey guys, i'm very new to this whole extras-devel stuff, but managed to download the app (i only want it for places because the new mobile site redirects me to m.touch.faceboom). I can't get places to work and it certainly doesn't come up like this photo ^

I click on "Check in" and a box comes up with "nearby" and the "done" button, but no locations show up and I can't check into anything.

i had the same issue (see page 28 & 29 of this thread) ... i ran Sociality in x-term (go to terminal and type /usr/bin/sociality) and got a few error messages ("can't fetch news/places" etc)
logging out and in again did get the app working again ...

MohammadAG 2011-05-24 09:00

Re: [Annnounce] Sociality | Facebook client in Qt
 
Something weird is happening now, youtube-dl and the C++ code both fail to parse the video page (or find it for that matter)
youtube-dl:
ERROR: unable to download video webpage: HTTP Error 404: Not Found
and the alert(QString) signal from your code.
yet qmltube still works fine...

laurenward1990 2011-05-25 19:46

Re: [Annnounce] Sociality | Facebook client in Qt
 
Quote:

Originally Posted by sil (Post 1014215)
i had the same issue (see page 28 & 29 of this thread) ... i ran Sociality in x-term (go to terminal and type /usr/bin/sociality) and got a few error messages ("can't fetch news/places" etc)
logging out and in again did get the app working again ...

Logged out and back in and its working :) thanks.
Do you know when/whether the option to add new places will be available?

MohammadAG 2011-05-25 19:55

Re: [Annnounce] Sociality | Facebook client in Qt
 
Not anytime soon (not until someone reverse engineers it)

http://bugs.developers.facebook.net/...g.cgi?id=13388

marxian 2011-05-25 20:18

Re: [Annnounce] Sociality | Facebook client in Qt
 
Quote:

Originally Posted by MohammadAG (Post 1014228)
Something weird is happening now, youtube-dl and the C++ code both fail to parse the video page (or find it for that matter)
youtube-dl:
ERROR: unable to download video webpage: HTTP Error 404: Not Found
and the alert(QString) signal from your code.
yet qmltube still works fine...

The getVideoUrl() method now takes the YouTube video id as it's only argument (previously it was the YouTube URL). Are you still using the URL?

Also, the gotVideoUrl() signal emits a QString, but I'm sure that MediaSource requires a QUrl, so I'm wondering if that is the reason that the Phonon player didn't work.

MohammadAG 2011-05-25 20:58

Re: [Annnounce] Sociality | Facebook client in Qt
 
Quote:

Originally Posted by marxian (Post 1015454)
The getVideoUrl() method now takes the YouTube video id as it's only argument (previously it was the YouTube URL). Are you still using the URL?

Also, the gotVideoUrl() signal emits a QString, but I'm sure that MediaSource requires a QUrl, so I'm wondering if that is the reason that the Phonon player didn't work.

Nah, I noticed that.

Have a look at http://mediadownloader.cz.cc/
It can play videos in Phonon well, and I passed the URL to QMediaPlayer manually and it worked, no cookies or forbidden stuff.

The source code did get me lost though, too many functions are tied to other classes

marxian 2011-05-26 01:52

Re: [Annnounce] Sociality | Facebook client in Qt
 
Quote:

Originally Posted by MohammadAG (Post 1015498)
Nah, I noticed that.

Have a look at http://mediadownloader.cz.cc/
It can play videos in Phonon well, and I passed the URL to QMediaPlayer manually and it worked, no cookies or forbidden stuff.

The source code did get me lost though, too many functions are tied to other classes

Fixed. Open source FTW! :D

All that is needed is a small amendment to the URL in the parseVideoPage() method:

Code:

QByteArray url = keyAndValue.first().replace("%2C", ",");
That's it. :D :cool:

I would have expected the percent encoded characters to have been replaced anyway, as I use QByteArray::fromPercentEncoding(). :confused:

Since I will now be implementing the QML video player, I have a question: How am I to enable the exporting of the plugin path for end users? I have found that

Code:

viewer.engine()->addPluginPath(QString("/opt/qtm12/plugins"));
doesn't seem to work, so I am doing it from the command line:

Code:

export QT_PLUGIN_PATH=/opt/qtm12/plugins


All times are GMT. The time now is 07:24.

vBulletin® Version 3.8.8