Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Init DataReader Error...

n_quoc_bao
Beginner
497 Views
I'm a newbie with IPP.
I had read the UMC Manual doc and I saw an example in it.
So I followed that sample and made an uncompletely program (but can be build) -with just only do the data reader initing, as you can see below.
I had made this program on VS 2005 (open a new Win32 Console Application with empty file) and had linked all the libraries needed.
But although it can be built successfully, and it seems that the initing data reader steps process successfully, it still has an error. When you debug, you will see that the stream type of the data reader after that is nothing.
I had taken a look in sample_player's example, I recognized they were done by the same way in general. But when debug with the same input file, it made different results. The stream type is clearly define: AVI_STREAM.
So I think the type of the input video file is not the problem in here.
I don't know why. Did I forget to initialize something? If anyone know this, please help me. I really need your help, ASAP.
Thanks a lot.

Here the code's:

#include
#include
#include

#include
#include
#include
#include
#include
#include

#include "umc_defs.h"
#include "vm_time.h"
#include "umc_structures.h"
#include "umc_data_reader.h"
#include "umc_splitter.h"
#include "umc_video_decoder.h"
#include "umc_video_data.h"
#include "umc_video_render.h"

#include "umc_file_reader.h"
#include "umc_fio_reader.h"
#include "umc_avi_splitter.h"

#include "umc_mjpeg_video_decoder.h"
#include "umc_color_space_converter.h"
#include "fw_video_render.h"

int main(int argc, vm_char* argv[])
{
argc=2;
argv[1]=VM_STRING("E:\Project\dsp\ipp_sample\media\_bin\Win32\Debug\film5.avi");

UMC::Status umcRes=UMC::UMC_OK;

UMC::FileReader *pDataReader=new UMC::FileReader();
UMC::FileReaderParams *params=new UMC::FileReaderParams();
params->m_portion_size=0;
vm_string_strcpy(params->m_file_name,argv[1]);

if (pDataReader->Init(params)==UMC::UMC_OK)
{
UMC::SystemStreamType streamtype=UMC::Splitter::GetStreamType(pDataReader);
}

return 0;
}
0 Kudos
3 Replies
n_quoc_bao
Beginner
497 Views
I had fixed the problem. But I have two questions:
1/ After I downloaded the umc_doc_examples.zip from one other thread, I built it and played it succesfully.
So I take a look at the sample source, and I recognized that, the error is made by the property: common language runtime support.
If the project has /clr, it will run in the wrong way.
If the project has no /clr, it will run succesfully.
So, could anyone tell me why CLR makes the program run error?
2/ Can I code a project with /clr but the program still works fine? Because when I create a new Win32 Console Application in VS2005, the /clr is default chosen. Or can you suggest me which kind of project is the fittest for using UMC?
3/ Can I use UMC to develop an Windows Form App? Which kind of project I should use in VS2005 to do that? Cause before, I had created an Windows Form Application using the AVSync class and other UMC class, and I received a lot of link errors.

Plz help me..... Thank you!
Quoc Bao.

PS: hope you don't mind about my English.
0 Kudos
Vladimir_Dudnik
Employee
497 Views

Hi Quoc,

do not worry about english, I believe engineers could understand each other in any case.

To be honest we did not test media sample compiled with /clr option, so thank you for issue report, we need to investigate the reasons for that.

I think it would be better if you compile UMC components with the options provided by build script and than will use them in binary form in your Windows App Form application.

Regards,
Vladimir

0 Kudos
n_quoc_bao
Beginner
497 Views
Vladimir.
Thanks a lot for your answer.

About the UMC components using in Window App Form, I had done like you said.But...

You know, when create a Window App Form in VS2005, the program has a /MDd and a /clr:pure by default . This is one of dynamic kinds (am I rite?).
* Step 1:
when I use the UMC static link (.lib) with necessary header files, especially the AVSync class (but until that time, I still not declared a AVSync object), I receive a lot of link errors.
So, I chage the /clr:pure to /clr.
After that, all the link errors disappeared. So, did I do rite with this step? Please explain for me, cause I don't know much about configing Windows Project properties.

* Step 2:
When I declare a AVSync object, I receive 21 errors:
Linking...
libcmt.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR80D.dll)
libcmt.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR80D.dll)
libcmt.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR80D.dll)
libcmt.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR80D.dll)
libcmt.lib(calloc.obj) : error LNK2005: _calloc already defined in MSVCRTD.lib(MSVCR80D.dll)
libcmt.lib(realloc.obj) : error LNK2005: _realloc already defined in MSVCRTD.lib(MSVCR80D.dll)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
libcmt.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
...........................
So I searched the MSDN, and I found the /FORCE:MULTIPLE to ignore redefinitions.
I add this "/FORCE:MULTIPLE" to command line in the linker, and all errors became to warnings. (I think I did something wrong till this step).

Step 3:
Then I use the AVSync object.
When I compiled, it was ok.
But when I run, I receive an error message box:
"This application has failed to start because MSVCR80D.dll was not found. Re-installing the application may fix the problem."

I'm sure that, other Win App Form projects I had programmed before still work well.
So MSVCR80D.dll may not "not found". Maybe because of my config with this project.

I attach the project with this post.
Could you take a loot at it?
I greatly appreciate about that.

Hope to see your reply soon.
Bao Nguyen.

0 Kudos
Reply