Results 1 to 16 of 16

Thread: Phonon and filters

  1. #1
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Phonon and filters

    Hi everybody

    In the application I'm writing I need to link filters in a chain to output video stream. One of the filters is a codec that decrypts an XOR-ed file. I need to link these filters on two systems (Windows and Mac OS X).

    So the question is are there any methods to explicitly link these filters with Phonon ?
    If there aren't phonon methods to do it are there any DirectShow and QuickTime methods to do so?
    C++ & AMD forever

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    So first you have a xor encrypted file, which should after decryption be subject to regular video decoding?

    Phonon::MediaSource takes QIODevice pointer as its argument, so you can create a QIODevice that will do the decryption on the fly. I did it once for RC4 and it's very simple. There is an article on QQ that deals with the subject.

  3. #3
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon and filters

    Thanks for your reply Wysota.

    But the problem is that if DirectShow links filters one can write a codec that will just link on the top of my codec and dump all decrypted data to a file. My codec is a DRM codec so the aim is to protect data (though personally I think that DRM is stupid it's my job )
    C++ & AMD forever

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    Where in the stream does the codec reside?

  5. #5
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon and filters

    AsyncReader->My filter->Haali Media Splitter ( splits stream to audio and video)->something...->render
    C++ & AMD forever

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    So where does the actual frame decoding go?

  7. #7
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon and filters

    What do you mean ?
    C++ & AMD forever

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    Where are the video and audio streams decoded into single images and audio chunks? Before or after your DRM thing?

  9. #9
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon and filters

    They are decoded after my DRM filter. My filter is a low level one and it can only read raw data from asyncreader end decode them into same raw data but unencrypted.
    C++ & AMD forever

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    So how does that make my solution from post #2 invalid? If someone has access to decrypted frames before sending them to the video decoder, using a crafted codec will allow one to intercept the video stream anyway...

  11. #11
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon and filters

    Yes but if I link filters manually it won't be possible
    C++ & AMD forever

  12. #12
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    I think you didn't understand me... Regardless if you link manually or not (?), you'll have to get a stream of data from somewhere. You might pass a file name or read it using QIODevice. At that point you can decrypt your stream and pass it to the regular phonon flow. If I want to steal the stream, I will, it's just a matter of saving the stream from the codec to an external file, so it really doesn't matter what solution you choose - eventually you'll have to go through some backend that can be altered to steal the stream. I really suggest you implement a QIODevice that does the decryption.

  13. #13
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon and filters

    Quote Originally Posted by wysota View Post
    If I want to steal the stream, I will, it's just a matter of saving the stream from the codec to an external file, so it really doesn't matter what solution you choose - eventually you'll have to go through some backend that can be altered to steal the stream.
    If I configure these filters and backends manually I will be able to link only trusted ones. I know that it's possible to do that with DirectShow API. You will not be able to steal the stream because it will go through filters that are embedded in my application.
    C++ & AMD forever

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    In that case use DirectShow and not Qt. I don't see how Phonon could help you here...

  15. #15
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Thanks
    15
    Thanked 11 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Phonon and filters

    I hoped it could
    C++ & AMD forever

  16. #16
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon and filters

    In what? If you want to use DirectShow to manually bind the exact codecs, etc. how could Phonon help you if it doesn't allow strict bindings because it has to be crossplatform so the backend is chosen manually? I'm not sure you can do it in DirectShow, because you never know what codecs you have in your system, but if you insist that it is possible, then I won't say otherwise...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.