[Qt-interest] [OT] RE: video codecs

Srdjan Todorovic todorovic.s at googlemail.com
Fri Jun 12 15:15:34 CEST 2009


Hi,

On 12/06/2009, Mehmet Kaplan <mehmetkpln at gmail.com> wrote:
> "What do you mean by THE codec? There is no such thing as THE codec on a
> system."I don't mean a static codec. i mean all the codecs currently
> installed on the system.

> as an example when user tries to process a video file with xvid codec, my
> program won't let it. but after the user installed xvid codec to his/her
> system, without any change on my program i want to process any video file
> with xvid codec.

But that's assuming that *every single* codec uses an identical
interface. Which is unlikely.

As far as I can understand (and I've not played with phonon), you want
something that will automatically enumerate any video codec that
happens to be in any location on the hard drive, and to add these
codecs to a collection, so that your application can pick and choose
which codec to use for decoding a video file.

I can only guess that Phonon already has interfaces built for some
codecs, and has codec enumeration and loading support, so I guess one
does something like:

   /* pseudo-code ! */
   PhononPlayer *player = new PhononPlayer();
   PhononMedia * media = new PhononMedia("/tmp/myVideo.avi");
   player->play(media);

and Phonon will automatically detect the video type (by headers) and
load the correct codec from it's codec collection.

And you dont want to do:

   Player *p = new Player();
   p->setType(h261xa, xanim_drivers, "XAnim's CCITT H.261");
   Media *m = new Media("/tmp/myVideo.avi");
   p->play(media);

Because that means holding a collection of codecs and being able to
detect the codec used in the file.

Is all that right?

Srdjan



More information about the Qt-interest-old mailing list