- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir:
I want to decode jpeg2000 codestream from network. I can find the decode sample from Intel which only can decode from a file.
jp2Stream.Open(options.SrcFileName());
....
I had tried to edit it to decode the data from network. But I can not success. I hope you can help me. give me a sample code.
Thanks a lot!
mozart
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Mozart:
jp2Stream is an instance of MapFileBoundedInputBE, soit's not network stream:)
But nothing special with network as well, you just need towrap your own stream with Read/Write functionality named as required (for example look into .srccommonstreammemorystream.h), something like the following
class NetworkInput {
...
Ipp8u Read8u() { ... /* obtain byte from network*/ }
void Read(Ipp8u *dst, unsigned int size) { ... /* fill buffer by data from network */ }
Than you need to add to your stream ready-made functionality of BELE:
typedef ByteInputSigned
After this just put some work-around about nested data boundary problem:
class NetworkBoundedInputBE : public ByteInputBoundService
{
public:
...
void Connect(...) { NetworkInput::Connect(...); PushSize(0xFFFFFFFF); }
void Disconnect() { NetworkInput::Disconnect(); PopSize(); }
};
Now it's ready to substitute in decoder:
DJP2Codestream
an you may work with it to read and decode JPEG 2000 data from network.
With Best Regards,
Mikhail
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page