Home > Software engineering >  How to realize the broadcast video data in memory?
How to realize the broadcast video data in memory?

Time:10-08

Such as topic, via the file mapping to the encrypted local video files into memory and then decrypted in memory directly, don't want to make it after decryption inventory to play again, although the media player control play a local file is very simple, but I want to make it to the decrypted memory directly broadcast video data, have a good idea?
, decrypt the existing open source libraries can be used, the main problem is how to play decrypted video data in memory

CodePudding user response:

To convert data in memory to RGB, and then directly to draw on the interface

CodePudding user response:

It depends on the player branch of the third party does not support data flow manner, if support is best, the data directly to the player plug-in line,
If player support only way, in the form of path, interface, you can release the documents to a hidden directory and then play, delete, or, to give players the encrypted file path, but the hooks player related functions, such as HOOK readfile, when reading,
Or, as the upstairs said, its own data decoding frame, draw up by then,

CodePudding user response:

refer to the second floor BeanJoy response:
it depends on the player branch of the third party does not support the data flow manner, if support is best, the data directly to the player plug-in line,
If player support only way, in the form of path, interface, you can release the documents to a hidden directory and then play, delete, or, to give players the encrypted file path, but the hooks player related functions, such as HOOK readfile, when reading,
Or, as the upstairs said, its own data decoding frame, then draw herself,


If the media player controls using VC implementation decryption, specific what function need to hook?

CodePudding user response:

reference TWLKHL reply: 3/f
Quote: refer to the second floor BeanJoy response:

It depends on the player branch of the third party does not support data flow manner, if support is best, the data directly to the player plug-in line,
If player support only way, in the form of path, interface, you can release the documents to a hidden directory and then play, delete, or, to give players the encrypted file path, but the hooks player related functions, such as HOOK readfile, when reading,
Or, as the upstairs said, its own data decoding frame, then draw herself,


If the media player controls using VC implementation decryption, specific what function need to hook?

I have not used the control, roughly said I guess, you first need to HOOK the CreateFile function, when the control interface function set to play after the file path, controls should be calling CreateFile function opens the file, HOOK the function, and then when file called need to play normal open the file and save the file handle, and then to HOOK ReadFile, when ReadFile controls calls, and a file handle to need to play a file handle, you will know that controls need to read the content of the need to play the file, and then according to the parameter values of ReadFile read a file and the content of the corresponding decryption, and then returned to the controls,
Such as the control ReadFile 10 bytes before access to the file, the first thing you want to know whether the ReadFile read any playback file, controls can also be read other files, it don't need to decrypt, so you need to first get CreateFile open play file handle, and then compared with the handle ReadFile, if the two handles, ReadFile is read from the file, but the file is encrypted, read out is 1234567890, for example, you need to decrypt, is 0987654321, for example, in the wake of decryption and then returned to the controls, so controls got is normal playback file data,
  • Related