Regarding buffer based implementaion in the recogniser in symbian

Login to reply to this topic.
Fri, 2008-06-20 07:56
Joined: 2008-06-04
Forum posts: 5

Hi all,

->I want some clarifications if a buffer contains data is passed into the recogniser instead of file name .In this i want to proceed for asf files ie., header data of asf files should be recognised when it is passed as a buffer.

Recogniser signature for dorecognisel fun.:private: virtual IMPORT_C void DoRecognizeL(const TDesC &aName, const TDesC8 &aBuffer);

const TDesC8 &aBuffer::A buffer containing data to be recognized; typically, this is read from the start of the file containing the data. Implement PreferredBufSize() to define the ideal size for this buffer. Note that failure to implement PreferredBufSize() results in a default buffer size of zero.

i thought in 2 ways can able to proceed.

1st way:remove the extension of the file so it contains dump data not a legal file name.
But i am facing some issue ie.,i passed the buffer in test driver.There i am doing open desl instead of openfilel.From here it goes to backend part ie., mediaplayercontroller in which it goes to respective descriptor block and it has to goes to recogniser to recognise it. But in controller itself i am getting the crash for newl of this descriptor as User:19.

Symbian signature:
static IMPORT_C CMMFFormatDecode *NewL(MDataSource *aSource, const TDesC &aPreferredSupplier, TBool aSupportsCustomInterfaces);

MDataSource :*aSource Header data. Must be derived from CMMFClip.
const TDesC &aPreferredSupplier: If this is provided, the list of matching plugins will be further searched for the latest version of a plugin supplied by the specified supplier.

TBool &aSupportsCustomInterfaces: Indicates whether the instantiated FormatDecode supports custom interfaces

Implementation:ipSourceFormat = CMMFFormatDecode::NewL (&aDataSource, _L("string"),isCustomInterfaceSupported));

Backend there is a support for plugins if it is passed as a file;for descriptor it is given like this.There is no respective plugins so that it will go and read the buffer data i feel.

2nd way:Need to pass only if header data is passed into the buffer.In this case header data and its size varies for different file.If i get the full header object size only i can able to get its mime to recognise it.So there is a constraint of identifying full header size for different files

In the SDK help it is given some eg, to hard code the header and find the header passed into the buffer and compare it. In this case(asf),not able to hardcode the header too...

->Is there any other way to check it/test it?What is the usecase for it?

If anybody have come across or done this implementation.Please do help me.

-vite.

  • Login to reply to this topic.