免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1591 | 回复: 0
打印 上一主题 下一主题

qt video player--- how to display and decode [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-26 11:31 |只看该作者 |倒序浏览
Qt-interest Archive, October 2007
a simple video player on qt引用:http://lists.trolltech.com/qt-interest/2007-10/thread00007-0.html
Message 1 in thread
-->
  • Subject: a simple video player on qt
  • From: "karmendra jain"
  • Date: Mon, 1 Oct 2007 18:23:22 +0530
  • Delivered-to: qt-interest@trolltech.com
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
    s=beta;
    h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
    bh=6e62Wpmp9cOdazKRvTuUBFKlQPQwDp4gaey/yjnzOiY=;
    b=iZ8fon4yeN8LCJK4r7uB0DhJwf+6di11rL5+Viea/ZArSeNzrNqnxb3KLbRb8Bgbt3ciBhBNwjRIXbPK1o4x321/fx1oboi/tOVfhgbTJl0vVlEFqS6+CYyqVmMBSAd3c//rmTvip3Ll+8IGuykbc9+AQ3ZFbFhvGQuuIAIZpVk=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta;
    h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition;
    b=NwzNc4DQhTpUTcmFrJfnwd78s/FWh7SQ/9e/3vxdoRasUCN3rp3q736J8QlcYKNIitVp0UDo7WJP6F+o6/L/kQ5pZHMc9s++Q3LU20aX/Ii6BGmhiYPZG8F9g3tUHe9uhCW0ip4MGL73ZvFoMwddTRU34Xb2YgX65Powogf9rjo=
  • List-help:
  • List-post:
  • List-subscribe:
  • List-unsubscribe:
  • Resent-from:
    qt-interest@xxxxxxxxxxxxx
  • Resent-message-id:
  • Resent-sender:
    qt-interest-request@xxxxxxxxxxxxx
  • To:
    qt-interest@xxxxxxxxxxxxx

Hi All
Can anyone please tell me how to make a video player
ONLY using QT .. such that it will read a raw video(or encoded data)
from a file/buffer and render it on screen of a device which doesnot
has X or open gl  or gtk support ???
any small sample will be really helpfull
Thanks
--
[ signature omitted ]
Message 2 in thread
-->

Em Monday 01 October 2007 14:53:22 karmendra jain escreveu:
> Hi All
> Can anyone please tell me how to make a video player
> ONLY using QT .. such that it will read a raw video(or encoded data)
> from a file/buffer and render it on screen of a device which doesnot
> has X or open gl  or gtk support ???
>
> any small sample will be really helpfull
Take a look at the example that is bundled with Qt:
http://doc.trolltech.com/main-snapshot/widgets-movie.html
It's in your source package as examples/widgets/movie
It requires a running output display. If you're using Qt/X11, then it requires
X11. But it won't require OpenGL.
Finally, note that this example is just about showing what you can do with
simple classes. It is not a full-fledged movie player. It will read only what
image-formats Qt knows about -- in a standard build, that will be GIF and
MNG. That's enough for simple animations (like animated icons, progress
information, etc.), but trying to render a 320x240 30fps movie might take its
toll.
If you want more, you'll have to wait for Qt 4.4.
--
[ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.
Message 3 in thread
-->
  • Subject: Re: a simple video player on qt
  • From: Till Oliver Knoll
  • Date: Mon, 01 Oct 2007 15:45:10 +0200
  • Delivered-to: qt-interest@trolltech.com
  • List-help:
  • List-post:
  • List-subscribe:
  • List-unsubscribe:
  • Organization: AutoForm Engineering GmbH
  • Resent-from:
    qt-interest@xxxxxxxxxxxxx
  • Resent-message-id:
  • Resent-sender:
    qt-interest-request@xxxxxxxxxxxxx
  • To: Qt Interest List

Thiago Macieira schrieb:
> > ...
> If you want more, you'll have to wait for Qt 4.4.
Hmmm, now I'm curious: I've heard that WebKit will be included, which is
a good thing. So what does the rumour say about the media support in Qt
4.4? Any secrets and insider infos you want to share with us? :)
Cheers, Oliver
--
[ signature omitted ]
Message 4 in thread
-->

Quoting Till Oliver Knoll :
> Thiago Macieira schrieb:
>>> ...
>> If you want more, you'll have to wait for Qt 4.4.
>
> Hmmm, now I'm curious: I've heard that WebKit will be included, which
> is a good thing. So what does the rumour say about the media support in
> Qt 4.4? Any secrets and insider infos you want to share with us? :)
It's not a secret if you follow the KDE 4.0 development process:  
Phonon will be part of Qt 4.4 and KDE 4.0.
You can download the current (development) version from the KDE  
Subversion repository (web access:  
http://websvn.kde.org/trunk/KDE/kdelibs/phonon/
)
The main website (quite outdated) is
http://phonon.kde.org
and you can  
find Phonon's main author in #phonon in FreeNode.
--
[ signature omitted ]
Message 5 in thread
-->
  • Subject: Re: a simple video player on qt
  • From: "karmendra jain"
  • Date: Mon, 1 Oct 2007 19:50:59 +0530
  • Cc:
    qt-interest@xxxxxxxxxxxxx
  • Delivered-to: qt-interest@trolltech.com
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
    s=beta;
    h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
    bh=5JHUqwEALJbZnwxe5fROZ5IwPZv/ic9OG699aoiWL6o=;
    b=ubUneDEeYf+edEF+ouMCbcE9nQotSamzEipB1bhe5cKm1Uz+QqzhoqK6+gOiL7eSQt9iy/8rxaUN1HQlpW1ETWptmjiZeCUTv118bfEcvwOL1aMSDccrJkWKzaJKJdgW+E9w7rPMFG3xQ6L8hlVQ98Z0rN1TZzLBZtCe6/N7MsE=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta;
    h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
    b=KwLGbASfPR82HWufBq2o1ORbewJ7rlAK+hLeOAGjlUkHbr3t9/SFJvZk4eq/D5IERD9W2cTBp/yg1hseQ6MQXVvVWduf3WWFYR/za9WITlwSSAgbUnKFGj9ishzUZ281x4bKmPNzV5fNwm52YYXCEzA8q9kCOzIkrhGyqc3Kono=
  • List-help:
  • List-post:
  • List-subscribe:
  • List-unsubscribe:
  • Resent-from:
    qt-interest@xxxxxxxxxxxxx
  • Resent-message-id:
  • Resent-sender:
    qt-interest-request@xxxxxxxxxxxxx
  • To: "Pau Garcia i Quiles"

Can anythin be done in qt 3.3 ????
there was a kiosk /mpeg player kiosk [Qt/Embedded-specific]
    An MPEG player.
in lot of places but i never found the code for it ...
can anyone help in this ???
On 10/1/07, Pau Garcia i Quiles  wrote:
> Quoting Till Oliver Knoll :
>
> > Thiago Macieira schrieb:
> >>> ...
> >> If you want more, you'll have to wait for Qt 4.4.
> >
> > Hmmm, now I'm curious: I've heard that WebKit will be included, which
> > is a good thing. So what does the rumour say about the media support in
> > Qt 4.4? Any secrets and insider infos you want to share with us? :)
>
> It's not a secret if you follow the KDE 4.0 development process:
> Phonon will be part of Qt 4.4 and KDE 4.0.
>
> You can download the current (development) version from the KDE
> Subversion repository (web access:
>
http://websvn.kde.org/trunk/KDE/kdelibs/phonon/
)
>
> The main website (quite outdated) is
http://phonon.kde.org
and you can
> find Phonon's main author in #phonon in FreeNode.
>
>
> --
> Pau Garcia i Quiles
>
http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information:
http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 6 in thread
-->
  • Subject: Re: a simple video player on qt
  • From: "karmendra jain"
  • Date: Mon, 1 Oct 2007 19:28:22 +0530
  • Cc: "Qt Interest List"
  • Delivered-to: qt-interest@trolltech.com
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
    s=beta;
    h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
    bh=oBTiPLXXIU5QYz2zQt3U/24fOO3re7pEc3Kx8C/hm/w=;
    b=Q9yyBeVzhueGtYgqgV0/NhbWFqN5MQsuVjAnsUjaevcdvzGgA4es7VvzNRm4X3P6Z54RRPWkQ64iemSVhVwUN/pVSeXQ5UkTOMHxyYbrPVyADXE8mt9SpETa3xemkPjwByIqm8D450RHGaRaY0tRiSxm7ZVOhi+XDEVGGhbm3qk=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta;
    h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
    b=sxQWlbBV/S9+baNukBdcduD6mrvNBavbloIQqtJobKp3MuVoGCQO+Wek/2KcRLK3gv59BNms9NRa3c0W4cV7exqsYQ7ik8iJ3HUE+7RCQWK5naPtBWwVUlLEDLCw0xZDZSs89FnE2Q9fyw72LP+cb8Be66ozQxcfUbXYok6ibiA=
  • List-help:
  • List-post:
  • List-subscribe:
  • List-unsubscribe:
  • Resent-from:
    qt-interest@xxxxxxxxxxxxx
  • Resent-message-id:
  • Resent-sender:
    qt-interest-request@xxxxxxxxxxxxx
  • To: "Till Oliver Knoll"

Thanks guys
and yes i saw that example .. but its only for gif files and it requires X11 ..
but i'll explain my problem in detail
currently i was tryin to make a player .. back end gstreamer .. front end QT
on a board which doesnot support x11
now backend is ready .. it gives a decoded framer buffer .. which i
can write to a file
now how can i do things in QT ..
Ie use some buffer and display the movie decoded by the gstreamer ???
and on top of this .. i dont have X11 support on that board :(
ne help ppl ??
On 10/1/07, Till Oliver Knoll  wrote:
> Thiago Macieira schrieb:
> > > ...
> > If you want more, you'll have to wait for Qt 4.4.
>
> Hmmm, now I'm curious: I've heard that WebKit will be included, which is
> a good thing. So what does the rumour say about the media support in Qt
> 4.4? Any secrets and insider infos you want to share with us? :)
>
> Cheers, Oliver
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information:
http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 7 in thread
-->

On 01.10.07 19:28:22, karmendra jain wrote:
> Thanks guys
> and yes i saw that example .. but its only for gif files and it requires X11 ..
> but i'll explain my problem in detail
>
> currently i was tryin to make a player .. back end gstreamer .. front end QT
> on a board which doesnot support x11
> now backend is ready .. it gives a decoded framer buffer .. which i
> can write to a file
>
> now how can i do things in QT ..
> Ie use some buffer and display the movie decoded by the gstreamer ???
> and on top of this .. i dont have X11 support on that board :(
Then you can't run Qt anyway, you can run Qtopia though. Other than that
neither Qt nor Qtopia have any support for decoding video data and
displaying it, so you'd have to write your own decoder and use QPainter
to display the data that you decode.
Andreas
--
[ signature omitted ]
Message 8 in thread
-->
  • Subject: Re: a simple video player on qt
  • From: "karmendra jain"
  • Date: Mon, 1 Oct 2007 19:55:29 +0530
  • Delivered-to: qt-interest@trolltech.com
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
    s=beta;
    h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
    bh=EJ936o0i1FzPrC0wltKR0QDlaCvAkzWahkv3vOQWxaM=;
    b=jHIn2WlqokCHEHun0zNVUnTwIJQmh0tjZQD9n8sjVRbtsnP9cH9kktl6FMljjZjxrkMnOG03jS3L+eetQspGUhfcdlR4etLdaeZJ20CspPG1VFP9c4OpMdU8nFkO3Zi57Z0iA8wyCN5+DRWbCVSPtyAmmcB2NaKnp7GwcOda5uo=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta;
    h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references;
    b=WjzbQSe0eE5drpmBjwUYfyKipzrp9y63R3Qe3ilqVgDlP4e8MrlFs0bEN7E/aVi+lsf/Avsbt7PqG1kujprnt+YJlbhisNRFKOr8VGMBI/WrNnrODDEQend7gFkwboAk6gYHr6yf9PnGcg0bri19fFh0ukSBjsLDtSvIOamj4yg=
  • List-help:
  • List-post:
  • List-subscribe:
  • List-unsubscribe:
  • Resent-from:
    qt-interest@xxxxxxxxxxxxx
  • Resent-message-id:
  • Resent-sender:
    qt-interest-request@xxxxxxxxxxxxx
  • To:
    qt-interest@xxxxxxxxxxxxx

Hey yes yesi have written a decoder that decodes the data and provides the decoded framebut how to use painter to get the desired result ???1: where to pass the pointer of the deocded frame2:  how to maintain the decoder and the painter in sink ??is there any sample code that can help ???
On 10/1/07, Andreas Pakulat  wrote:
> On 01.10.07 19:28:22, karmendra jain wrote:
> > Thanks guys
> > and yes i saw that example .. but its only for gif files and it requires X11 ..
> > but i'll explain my problem in detail
> >
> > currently i was tryin to make a player .. back end gstreamer .. front end QT
> > on a board which doesnot support x11
> > now backend is ready .. it gives a decoded framer buffer .. which i
> > can write to a file
> >
> > now how can i do things in QT ..
> > Ie use some buffer and display the movie decoded by the gstreamer ???
> > and on top of this .. i dont have X11 support on that board :(
>
> Then you can't run Qt anyway, you can run Qtopia though. Other than that
> neither Qt nor Qtopia have any support for decoding video data and
> displaying it, so you'd have to write your own decoder and use QPainter
> to display the data that you decode.
>
> Andreas
>
> --
> Avert misunderstanding by calm, poise, and balance.
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information:
http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 9 in thread
-->
  • Subject: Re: a simple video player on qt
  • From: Justin Noel
  • Date: Mon, 01 Oct 2007 10:56:37 -0400
  • Delivered-to: qt-interest@trolltech.com
  • List-help:
  • List-post:
  • List-subscribe:
  • List-unsubscribe:
  • Resent-from:
    qt-interest@xxxxxxxxxxxxx
  • Resent-message-id:
  • Resent-sender:
    qt-interest-request@xxxxxxxxxxxxx
  • To: QtList

QPainter has a method called drawImage. You can do something like the following in a subclass of QWidget:
void VideoWidget::paintEvent()
{
//Get the current frame and size data...
//Passing QImage
QImage frame(frameDataUCharPtr, frameWidth, frameHeight.
QImage::Format_RBG32 );
QPainter painter(this);
painter.drawImage(rect(), frame);
}
Under Qtopia you can use QDirectPainter to write directly to framebuffer
memory and get some faster access for drawing frames. You will have to
do the color conversions yourself to get the frame into your
framebuffer's color model.
--Justin
karmendra jain wrote:
> Hey yes yes
> i have written a decoder that decodes the data and provides the decoded frame
> but how to use painter to get the desired result ???
> 1: where to pass the pointer of the deocded frame
> 2:  how to maintain the decoder and the painter in sink ??
>
> is there any sample code that can help ???
>
> On 10/1/07, Andreas Pakulat  wrote:
>   
>> On 01.10.07 19:28:22, karmendra jain wrote:
>>     
>>> Thanks guys
>>> and yes i saw that example .. but its only for gif files and it requires X11 ..
>>> but i'll explain my problem in detail
>>>
>>> currently i was tryin to make a player .. back end gstreamer .. front end QT
>>> on a board which doesnot support x11
>>> now backend is ready .. it gives a decoded framer buffer .. which i
>>> can write to a file
>>>
>>> now how can i do things in QT ..
>>> Ie use some buffer and display the movie decoded by the gstreamer ???
>>> and on top of this .. i dont have X11 support on that board :(
>>>      
>> Then you can't run Qt anyway, you can run Qtopia though. Other than that
>> neither Qt nor Qtopia have any support for decoding video data and
>> displaying it, so you'd have to write your own decoder and use QPainter
>> to display the data that you decode.
>>
>> Andreas
>>
>> --
>> Avert misunderstanding by calm, poise, and balance.
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
>> List archive and information:
http://lists.trolltech.com/qt-interest/
>>
>>
>>     
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information:
http://lists.trolltech.com/qt-interest/
>   
begin:vcard
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:
http://www.ics.com
version:2.1
end:vcard
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/61322/showart_586780.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP