HDC-3x Series SDK (Linux) IEI Technology Corp. MODEL: HDC-3x Series SDK (Linux) A SDK software development kit facilitates development of Linux-based application for the HDC-3x Series User Manual Page 1 Rev. 1.
HDC-3x Series SDK (Linux) Revision Date Version Changes 25 March, 2013 1.17 Updated for software version v1.17: - Added scale and source select - Removed One Picture Mode - Modified menu (r157) 31 August, 2012 1.17 Updated for new software version v1.17: - Modified menu (r137) 4 May, 2011 1.02 Added information for the HDC-302E 30 March, 2011 1.01 Added information for the HDC-301 and the HDC-301E and renamed the manual to HDC-3x Series 13 January, 2011 Page 2 1.
HDC-3x Series SDK (Linux) Copyright COPYRIGHT NOTICE The information in this document is subject to change without prior notice in order to improve reliability, design and function and does not represent a commitment on the part of the manufacturer. In no event will the manufacturer be liable for direct, indirect, special, incidental, or consequential damages arising out of the use or inability to use the product or documentation, even if advised of the possibility of such damages.
HDC-3x Series SDK (Linux) Table of Contents 1 HDCAPTURE SDK (LINUX) ...................................................................................... 6 1.1 HDCAPTURE SDK OVERVIEW ................................................................................... 7 1.2 SYSTEM REQUIREMENTS ............................................................................................ 7 1.3 SOFTWARE INSTALLATION .......................................................................................... 7 1.
HDC-3x Series SDK (Linux) 2.4.12 FmbSetFirstDev ............................................................................................. 38 2.4.13 FmbSetNextDev.............................................................................................. 38 2.4.14 DrvBootAll ..................................................................................................... 38 2.4.15 MmuxInit ........................................................................................................ 39 2.
HDC-3x Series SDK (Linux) Chapter 1 1 HDCapture SDK (Linux) Page 6
HDC-3x Series SDK (Linux) 1.1 HDCapture SDK Overview The HDCapture SDK is a video capture tool that allows user to capture video through the HDMI input ports in Linux environment. The HDCapture SDK also includes decoding function that decodes the video signal for video output to the HDMI-enabled display device. This manual includes SDK information for the HDC-3x Series, which includes: HDC-301 HDC-301E HDC-302E HDC-304E 1.
HDC-3x Series SDK (Linux) $ cd HDCapture_3xx-(version)_(date)-(svn version) $ cd HDCapture_3xx-r157_20121212-6339 Step 4: Login as root by typing: $ su Step 5: Enter the password: password: ****** $ Step 6: Install the HDCapture SDK by typing: sh install_ko_hdc3xx.sh Step 7: The system starts to install the HDCapture SDK and shows: Installation start. Installing fmb_player_apl... done. Installing firm... done. Making fmb_driver... `h55fmb.ko' -> `/lib/modules/2.6.43.5-2.fc15.i686/h55fmb.ko' done.
HDC-3x Series SDK (Linux) Step 2: Unzip the file by typing: $ tar xf HDCapture_SDK_(version)_(date)-(svn version).tar.gz $ tar xf HDCapture_3xx-r157_20121212-6339.tar.gz Step 3: Change to HDCapture directory by typing: $ cd (version) $ cd r157 Step 4: Login as root by typing: $ su Step 5: Enter the password: password: ****** $ Step 6: Install the HDCapture SDK by typing: #sh install_hdc3xx.sh Step 7: The system starts to install the HDCapture SDK and shows: Installation start. Making fmb_player_apl...
HDC-3x Series SDK (Linux) 1.4 Launch HDCapture SDK Step 1: To launch the HDCapture SDK, type “hdcapture” as below: $ hdcapture Step 2: The system starts to launch the HDCapture SDK. When the main menu appears, it is ready to use. Step 0: [dev-0] Boot ... [dev-1] Boot ... [dev-2] Boot ... [dev-3] Boot ...
HDC-3x Series SDK (Linux) 8 Video I/O settings 9 Exit fmb-0?> The contents marked in blue are especially for the HDC-302E and the HDC-304E video capture cards. 1.5 Video Capture There two main procedures to capture video by the HDCapture SDK in Linux. First, setup the encoding setting. Second, start capturing video. These two procedures are described in the following sections. 1.5.
HDC-3x Series SDK (Linux) fmb-0?> Step 4: Select a port to configure by entering the port number. For example, type 1 to select the first port. fmb-0?>1 Step 5: The following message shows. < Encode settings - Sub menu > ‘Z’<-~~~~~~~~ Select following number. (Current settings) 1 Output port setting (File ./stream-0.mpg) 2 Video resolution setting (1920x1080_59.
HDC-3x Series SDK (Linux) fmb-0?>1 Step 9: The following message shows the current file name is “stream-0.mpg”. [[[ Encode settings - Sub menu -> Output port -> File ]]] ~~~~->Enter Input filepath of stream. Current filepath is ./stream-0.mpg. fmb-0?> Step 10: Type the new file name. Take “video1.mpg” as an example. fmb-0?>video1.mpg Step 11: The encoding setting sub menu appears. The file name has been changed to “video1.mpg”. < Encode settings - Sub menu > ‘Z’<-~~~~~~~~ Select following number.
HDC-3x Series SDK (Linux) Select following number. 1920x1080_60p * 1920x1080_59.94p 1920x1080_50p 1920x1080_60i 1920x1080_59.94i 1920x1080_50i 1440x1080_60i 1440x1080_59.94i 1440x1080_50i 1280x720_60p 1280x720_59.94p 1280x720_50p 720x480_60i 720x480_59.94i 720x480_50i (* is current setting) Please change the input source resolution if you want to use select others. Then press "Enter" to reload. fmb-0?> NOTE: The contents marked in blue are especially for the HDC-302E and the HDC-304E video capture cards.
HDC-3x Series SDK (Linux) < Encode settings - Sub menu > ‘Z’<-~~~~~~~~ Select following number. (Current settings) 1 Output port setting (File video1.mpg) 2 Video resolution setting (1920x1080_59.94p) 3 Video bitrate setting (CBR, 6000kbps) 4 Audio format (MPEG1L2, 256kbps) 5 Video scale (Not Use) fmb-0?> Step 15: Configure the video Scale, fmb-0?>5 Step 16: The following message shows. [[[ Encode settings - Sub menu -> Video scaler ]]] 'Z'<-~~~~~~~~~~~~->Enter Select following number.
HDC-3x Series SDK (Linux) 5 Video scale (320x240) NOTE: The video scale support 1080(60i) -> 480(60i) 1080(59.94i) -> 480(59.94i) 1080(50i) -> 480(50i) 1080(60i) -> 320x240(30p) 1080(59.94i) -> 320x240(29.97p) 1080(50i) -> 320x240(25p) 720(60p) -> 480 (60i) 720(59.94p) -> 480 (59.94i) 720(50p) -> 480 (50i) 720(60p) -> 320x240(30p) 720(59.94p) -> 320x240(29.97p) 720(50p) -> 320x240(25p) Step 17: Type Z to go back to the sub-menu of the encode setting.
HDC-3x Series SDK (Linux) Step 18: Configure the video bitrate. To configure the video bitrate, type 3 to select the “Video bitrate setting”. fmb-0?>3 Step 19: The following message shows. [[[ Encode settings - Sub menu -> Video ratecontrol -> Video bitrate ]]] ‘Z’<-~~~~~~~~~~~~~~~~~->Enter Select following number. (* is current setting) 1 * CBR 2 VBR fmb-0?> Step 20: To configure the video bitrate as CBR, type 1 to select “CBR”. To configure the video bitrate as VBR, type 2 to select “VBR”.
HDC-3x Series SDK (Linux) 5 Video scale (Not Use) fmb-0?> NOTE: The audio format of the encoding and decoding settings is set by default and can not be changed. 1.5.2 Encoding After configuring encoding settings, the user can start capturing the video by following the steps below. Step 1: Access to the main menu. Type 1 to select “1 Encoding” from the main menu. fmb-0?>1 Step 2: The following message shows. The option marked with * is the selected port for capturing video.
HDC-3x Series SDK (Linux) The contents marked in blue are especially for the HDC-302E and the HDC-304E video capture cards. Step 3: After selecting the port(s), type y. fmb-0?>y Step 4: The current settings of the selected port shows as following. [[[ Encoding - confirm -> Encoding ]]] ‘Z’<-~~~~~~~->Enter Current settings Stream output File ./stream-0.mpg Video format 1920x1080 Video framerate 59.
HDC-3x Series SDK (Linux) 1.6 Decoding There three main procedures to decode video through the HDCapture SDK in Linux. First, configure the decoding setting. Second, configure the video output port setting. Third, start decoding video. These three procedures are described in the following sections. 1.6.1 Decoding Setting Please connect the hardware and follow the instruction below to configure the decoding settings before decoding the video. Step 1: Launch the HDCapture SDK (refer to Section 1.4).
HDC-3x Series SDK (Linux) Select following number. (Current settings) 1 Input port setting (File ./stream-0.mpg) 2 Video resolution setting (1920x1080_59.94i) 3 Audio format (MPEG1L2) fmb-0?> NOTE: The user can enter Z at anytime to go back to the previous page. Step 6: Configure the file name of the decoded file. To configure the file name, type 1 to select the “Input port setting”. fmb-0?>1 Step 7: The following message shows.
HDC-3x Series SDK (Linux) fmb-0?>video1.mpg Step 11: The following message shows. [[[ Decode settings - Sub menu -> Input port -> File -> Start position ]]] ‘Z’<-~~~~~~~~~~~~~~->Enter Input start position in byte. Current value is 0 (Max.18474912) fmb-0?> Step 12: Setup the start point to decode the video. Type 0 to decode the video from the beginning. fmb-0?>0 Step 13: The decoding setting sub menu shows. The file name has been changed to “video1.mpg”.
HDC-3x Series SDK (Linux) 1 1920x1080_60p 2 * 1920x1080_59.94p 3 1920x1080_50p 4 1920x1080_60i 5 1920x1080_59.94i 6 1920x1080_50i i 1280x720_60p j 1280x720_59.94p k 1280x720_50p l 720x480_60i m 720x480_59.94i n 720x480_50i (* is current setting) fmb-0?> NOTE: The audio format of the encoding and decoding settings is set by default and can not be changed. 1.6.2 Video I/O Setting NOTE: This section is only for the HDC-302E and the HDC-304E video capture cards.
HDC-3x Series SDK (Linux) fmb-0?>8 Step 2: The following message shows. ------------------------------------------------------------------------------< Mode list > Select following character. 0 Video output 1 Video input z Return Step 3: Type 1 to select Video input fmb-0?>1 < Device list > Select following character.
HDC-3x Series SDK (Linux) 0 * Video 0 1 Video 1 2 Video 2 3 Video 3 Step 6: Card 1: HDC-304e Channel 0 source change to [Video-1] < Device list > Select following character. ====== Card 1: HDC-304e ====== 0 Video input [Video-1] 1 Video input [Video-1] 2 Video input [Video-2] 3 Video input [Video-3] z Return Step 7: Type Z fmb-0?>z The following message shows ------------------------------------------------------------------------------< Mode list > Select following character.
HDC-3x Series SDK (Linux) Installed with HDC-302E: < Device list > Select following character. === Card 1: HDC-302e === 1 Video output [Video-0] 2 Video output [Video-1] z Return fmb-0?> Installed with HDC-304E: < Device list > Select following character. 1 Video output [Codec-0] fmb-0?> Step 9: Type 1 to select the first video output port. If two HDC-3x Series capture cards are installed, there will be two video output ports to select. fmb-0?>1 Step 10: The following message shows.
HDC-3x Series SDK (Linux) Step 12: The following message shows. Select the codec chip that is used for decoding the video. Please note that the codec chip options may vary by the installed capture card. Step 0: < Device list > ‘Z’<-~~~~~~~~~~~~~~~->Enter Select following number. (* is current setting) 1 * Codec chip 0 2 Codec chip 1 3 Codec chip 2 4 Codec chip 3 fmb-0?> NOTE: To broadcast the encoding video directly, please select “1 Bypass mode” from Step 5.
HDC-3x Series SDK (Linux) fmb-0?>2 Step 2: The following message shows. < Device list > Select following number. 1 /dev/h55fmb0 2 /dev/h55fmb1 3 /dev/h55fmb2 4 /dev/h55fmb3 fmb-0?> Step 3: Select a port by entering the port number. The selected port must be same with the port selected in the decoding setting. The first port is selected in the encoding setting (Section 1.6.1 Step 4), so type 1 to select the first port. fmb-0?>1 Step 4: The current settings of the selected port shows as following.
HDC-3x Series SDK (Linux) p Pause s Slow m Mute (OFF) e Stop and return fmb-0?> Step 6: While decoding, the user can type P to pause, type S to slow down or type M to mute the video. Step 7: Type e to stop decoding video. Step 0: fmb-0?>e [[[ Decoding - finished -> Main menu ]]] ~~~~~~~~->Enter Finished decoding. Press key to return to Main menu. fmb-0?> NOTE: The third option of the main menu, Decoding (Start pause), is similar with Section 1.6.3 Decoding.
HDC-3x Series SDK (Linux) Chapter 2 2 Programming Guide Page 30
HDC-3x Series SDK (Linux) 2.1 Main Thread Step 1: Initialize global variables (FmbInitInfo). Step 2: Set the default of all devices (FmbCreatDevInfoAll) and create a thread for each device (fmbRecvThread). This thread will receive Events sent by codec chip, and send the message to the main thread through the pipe. Step 3: Write firmware to the codec chip and boot codec chip (DrvBootAll). Step 4: Read the current version of the codec chip (CheckVersionInfo).
HDC-3x Series SDK (Linux) Page 32
HDC-3x Series SDK (Linux) 2.2 Encode void FmbReset(void); void FmbInitEnc(void); void FmbStartEnc(void); void FmbStop(void); NOTE: Be sure to use OnFmbMessage () function to confirm the codec chip return the message to switch the state (return FMBEnmResultRequestComplete), then continue to the next action.
HDC-3x Series SDK (Linux) 2.3 Decode void FmbReset(void); void FmbInitDec(void); void FmbStartDecNormal(void); void FmbPause(void); void FmbSetMuteMode(void); void FmbStop(void); void FmbAutoStop(void); void FmbDecStopCore(void); NOTE: Be sure to use OnFmbMessage () function to confirm the codec chip return the message to switch the state (return FMBEnmResultRequestComplete), then continue to the next action.
HDC-3x Series SDK (Linux) 2.4 Functions Reference 2.4.1 OnFmbMessage Description: receive the returned message from codec chip to determine the current state Prototype: enum FMBResultEnum OnFmbMessage (int fd) Parameters: fd: device (codec chip) handle Return Value: Current state: FMBEnmResultContinue, FMBEnmResultRequestComplete enum FMBResultEnum {FMBEnmResultContinue, FMBEnmResultRequestComplete} 2.4.
HDC-3x Series SDK (Linux) Return Value: TRUE: function succeeded; FALSE: functioned failed 2.4.5 FmbDellDevInfoAll Description: release all of codec chip resources Prototype: void FmbDellDevInfoAll(void) Parameters: None Return Value: None 2.4.6 FmbGetDeviceTotal Description: get the current number of codec chip Prototype: int FmbGetDeviceTotal(void) Parameters: None Return Value: codec chip number 2.4.
HDC-3x Series SDK (Linux) FMBEnmDevice_0 = 0, FMBEnmDevice_1, FMBEnmDevice_2, FMBEnmDevice_3, FMBEnmDevice_4, FMBEnmDevice_5, FMBEnmDevice_6, FMBEnmDevice_7, FMBEnmDeviceMax }; Return Value: None 2.4.9 FmbGetCurDeviceNum Description: get the chip number of the current operating codec (numbering by the order of all the codec on the board) Prototype: enum FMBDeviceNumEnum FmbGetCurDeviceNum(void); Parameters: None Reture Value: enum FMBDeviceNumEnum, device number 2.4.
HDC-3x Series SDK (Linux) Prototype: enum FMBDeviceNumEnum FmbGetCurDeviceNum(void) Parameters: None Return Value: enum FMBDeviceNumEnum, device number 2.4.12 FmbSetFirstDev Description: set to switch the current operating device to the first available device code Prototype: enum FMBDeviceNumEnum FmbSetFirstDev(void) Parameters: None Return Value: enum FMBDeviceNumEnum: return the device number set, return FMBEnmDevice_NONE if there is no available devices 2.4.
HDC-3x Series SDK (Linux) 2.4.15 MmuxInit Description: initialize the CPLD to control handle Prototype: MmuxHandle MmuxInit(int deviceNum) Parameters: deviceNum: request to initialize the version of card number and strat from 0 Return Value: MmuxHandle 2.4.16 MmuxRelease Description: release CPLD and control handle Prototype: void MmuxRelease(MmuxHandle hdMmux) Parameters: hdMmux: get handle when MmuxInit executes Return Value: None 2.4.
HDC-3x Series SDK (Linux) Prototype: enum MMUX_RESOLUTION MmuxGetCodecSrcResolution(MmuxHandle hdMmux, int codecNum); enum MMUX_RESOLUTION { MMUX_RESOLUTION_1080P_60, MMUX_RESOLUTION_1080P_59, MMUX_RESOLUTION_1080P_50, MMUX_RESOLUTION_1080I_60, MMUX_RESOLUTION_1080I_59, MMUX_RESOLUTION_1080I_50, MMUX_RESOLUTION_1080P_24, MMUX_RESOLUTION_1080P_23, MMUX_RESOLUTION_720P_60, MMUX_RESOLUTION_720P_59, MMUX_RESOLUTION_720P_50, MMUX_RESOLUTION_720P_24, MMUX_RESOLUTION_720P_23, MMUX_RESOLUTION_480i, MMUX_RESOLUTION_
HDC-3x Series SDK (Linux) Return Value: 0: no signal, 1: signal input 2.4.
HDC-3x Series SDK (Linux) Return Value: 0: set succeeded Page 42
HDC-3x Series SDK (Linux) Chapter 3 3 Linux Open Source Code Page 43
HDC-3x Series SDK (Linux) Linux Open Source Code This product from IEI contains software originating from Fujitsu and its suppliers and also contains component from the open source community. Software code is subject to the GNU General Public License. See the GNU General Public License for the exact terms and conditions of this license. The GPL Code used in this products are distributed without any warranty and are subject to the copyrights of their authors.
HDC-3x Series SDK (Linux) For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
HDC-3x Series SDK (Linux) 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
HDC-3x Series SDK (Linux) Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3.
HDC-3x Series SDK (Linux) 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5.
HDC-3x Series SDK (Linux) This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded.
HDC-3x Series SDK (Linux) 12.
HDC-3x Series SDK (Linux) Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.