Page 1 of 1

OutofTree Cross-compile : WIN32

Posted: 02 Jun 2012 06:37
by ewong
An imaging device requires several custom modules in order to stream and view images in the VLC Media Player.

The user base is Win32/64 systems running WinXP -> Win7.

A cross-compiler to build win32 applications has been setup using Virtual Box/Ubuntu.

Modules:

Access: A serial stream available through a win32 driver provides the camera input.

Demux: The data stream from the recorder may consist of the several camera views

Decoder: A custom decompression scheme is used.

Cross-Compile of Modules:

Does any have experience building an OutOFTree Module using a cross-compuler enviroment for win32/64.
According to the instructions in the OutOfTreeCompile wiki, the pkg-config environment
variables need to be changed. (Where do you do this?)

Access Module:

Is it possible to pull data from a serial line and use it within an Access Module

Re: OutofTree Cross-compile : WIN32

Posted: 02 Jun 2012 11:26
by Rémi Denis-Courmont
The access module can get its data from pretty much anything, as long as it is a byte stream. A serial line is a byte stream. But if it were not a byte stream, you'd need to combine the access and demux module in one "access_demux" module instead.

Re: OutofTree Cross-compile : WIN32

Posted: 05 Jun 2012 05:57
by ewong
Are there some examples of an access module accessing a flash drive.

How does the access module request more data from the input device. Is it possible to set-up bi-direction communication
with the input device using the access module? The access module will need some way of requesting more data from
the input device.

Re: OutofTree Cross-compile : WIN32

Posted: 05 Jun 2012 08:53
by Rémi Denis-Courmont
Are there some examples of an access module accessing a flash drive.
Uh? Usually flash drive are mounted as a file system and accessed with normal file system functions (modules/access/file.c).
How does the access module request more data from the input device.
Access module needs to define either pf_read or pf_block function to provide data.
Is it possible to set-up bi-direction communication with the input device using the access module?
You can do whatever you want as long as it is code. A module is just a glorified set of callbacks to represent a byte stream, optionally with seek capability.
The access module will need some way of requesting more data from the input device.

Re: OutofTree Cross-compile : WIN32

Posted: 05 Jun 2012 18:37
by ewong
Uh? Usually flash drive are mounted as a file system and accessed with normal file system functions (modules/access/file.c).
Sorry I forgot to detail the question.

The data on the flash drives will be stored in a custom filesystem which is not FAT or FAT32. Data must be read from the drives using RAW byte reads rather than using the standard filesystem calls: fopen(), fread(), ... fclose().

On a Windows OS, this can be accomplished by using ADMINISTRATOR-level access to call device-driver commands to scan for known intefaces: eg. DIGCF_INTERFACEDEVICE, attempting to open and establish a handle to them if found, then proceed with RAW-LEVEL reads.

Can Window-specific header files such as <winioctl.h> be used in a module when cross-compiling vlc?

Re: OutofTree Cross-compile : WIN32

Posted: 05 Jun 2012 19:47
by ewong
In the Building section of the OutOfTreeCompile page, the last sentence states:
If cross-compiling, you will probably need to adjust the pkg-config environment variables. Otherwise pkg-config will use the native VLC development files (if found) or simply fail.
For example, if cross-compiling i686-w64-mingw32 for Windows 32-bits, using the Mingw-w64 toolchain, do
these variables need to be set?

Code: Select all

PKG_CONFIG_LIBDIR=../contrib/i686-w64-mingw32/lib/pkgconfig PKG_CONFIG=/usr/bin/pkg-config
Are there other variables pkg-config environment variables requiring adjustment?

Re: OutofTree Cross-compile : WIN32

Posted: 05 Jun 2012 20:20
by ewong
Access module needs to define either pf_read or pf_block function to provide data.
Is it possible to call to a win32 dll from a function? The drivers for the serial-like communications
are stored in the DLL. The header file is also available.