CN109361871A - A method of IP Camera is modeled as USB camera - Google Patents
A method of IP Camera is modeled as USB camera Download PDFInfo
- Publication number
- CN109361871A CN109361871A CN201811456207.4A CN201811456207A CN109361871A CN 109361871 A CN109361871 A CN 109361871A CN 201811456207 A CN201811456207 A CN 201811456207A CN 109361871 A CN109361871 A CN 109361871A
- Authority
- CN
- China
- Prior art keywords
- camera
- equipment
- search
- modeled
- online
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/16—Arrangements for providing special services to substations
- H04L12/18—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/64—Computer-aided capture of images, e.g. transfer from script file into camera, check of taken image quality, advice or proposal for image composition or decision on when to take image
Abstract
The invention discloses a kind of methods that IP Camera is modeled as USB camera, it include: that IP Camera interaction protocol is encapsulated in Linux inner core, after the driving of linux kernel loading equipemtn, the initialization of IP Camera interaction protocol and IP Camera discovery agreement is completed;After searching online equipment, a device node is generated under/the path dev, for the operation driven to Linux standard will to be converted to the operation of camera;Device parameter configuration, for carrying out parameter configuration or configuration parameter template to individual equipment, for carrying out batch setting to equipment;Equipment control is reported for realizing candid photograph to individual equipment, reading audio/video flow and block alarm.Application program of the present invention does not need the Details Of Agreement of concern IP Camera, simplifies the realization of application program, increases substantially the development efficiency of application.
Description
Technical field
The present invention relates to the driver technical fields of IP Camera, are a kind of by IP Camera mould specifically
The method for being intended to be USB camera.
Background technique
IP Camera is the network equipment, needs communications protocol, specification ununified in early days, IP Camera hardware
Commercial city is provided and uses proprietary protocol.With the networked instruments of video monitoring, the division of labor of industrial chain will be increasingly thinner.Some manufacturers
Camera specially is done, video server specially does in some manufacturers, some manufacturers then may specially do platform etc., then by integrated
Quotient integrates, and is supplied to End-Customer.Proprietary protocol can not be competent at this industry cooperation mode, the interface of industry standardization by
This comes into being.Currently, what the standard agreement of IP Camera was most widely used is ONVIF agreement, ONVIF specification is described
Model, interface, data type and the mode of data interaction of network video, and it has been multiplexed some existing standards.ONVIF rule
The target of model is to realize a network video framework agreement, makes different vendor's network video product produced (including before shooting with video-corder
End, video recording equipment etc.) complete intercommunication.Interface defined in equipment management and control section is with Web in ONVIF specification
The form of Services provides.ONVIF standardizes the definition for covering complete XML and WSDL.Each supports ONVIF specification
Terminal device must provide Web Service corresponding with function.The data interaction of server-side and client is (simple using SOAP
Access protocol) agreement.Other parts such as audio/video flow in ONVIF then pass through RTP/RTSP (real-time media stream protocol) into
Row obtains.Camera application management program needs the ONVIF agreement of integrated complex, for managing camera device.For simultaneously
Also USB interface camera is accessed, application program needs while handling two kinds of equipment, brings complexity to application program in this way
Property, it needs respectively to handle IPC and USB camera.
Summary of the invention
The purpose of the present invention is to provide a kind of methods that IP Camera is modeled as USB camera, existing for solving
There is application program in technology to need while handling IP Camera and the more complicated problem of USB camera application program.
The present invention is solved the above problems by following technical proposals:
A method of IP Camera is modeled as USB camera, comprising:
Step S100: IP Camera interaction protocol is encapsulated in Linux inner core, the driving of linux kernel loading equipemtn
Afterwards, the initialization of IP Camera interaction protocol and the initialization of IP Camera discovery agreement are completed;
Step S200: search online equipment after finding online equipment, generates a device node under the/path dev, uses
In the operation of camera will be converted to Linux standard driving operation;
Step S300: device parameter configuration is used for carrying out parameter configuration or configuration parameter template to individual equipment
In to equipment progress batch setting;
Step S400: equipment control, for realizing candid photograph to individual equipment, reading audio/video flow and blocking alarm
It reports.
IP Camera is modeled as USB camera by Linux drive program, conceals complicated IP Camera interaction
Agreement, the realization of agreement have been encapsulated in kernel layers of linux.After linux kernel loads corresponding device drives, association can be completed
The initialization of view can generate a device node under the/path dev, become to the operation of camera when the access for having new equipment
Operation to the driving of linux standard.The setting of control and parameter to equipment obtains linux driving method also by standard
It calls.Application program does not need the model of interested devices, and the connection protocol of equipment access way and equipment room possesses very high
The development scheme of efficiency.Linux drive program includes equipment discovery, device parameter configuration and equipment control.Equipment discovery, is used for
Online equipment is searched for, the equipment for meeting ONVIF protocol specification can be searched;The device parameter configuration is mainly used for list
A equipment carries out parameter configuration and configuration parameter template, is conveniently used for carrying out batch setting to equipment;The device control unit
Point it is mainly used for realizing individual equipment and captures, reads audio/video flow and block the functions such as report of alarm.
Further, the step S200 is specifically included:
Step S210: it is actively searched in local area network according to the search pattern of setting and meets setting online for IP Camera agreement
It is standby;
Step S220: when online equipment accesses, a device node is generated at/dev.
Further, described search mode includes automatic search and manual search, and the automatic search is for by admittedly
Fixed address sends the online equipment of multicast message search and system in the same subnet, the manual search for pass through to
Specified address sends the online equipment in the specified subnet of multicast message search.
Further, it when the step S200 includes: new equipment access to LAN, is sent in the form of multicast to local area network
Information carries out safety certification, obtains the specifying information of equipment after equipment discovery program receives multicast information.
Further, the step S300 is specifically included:
A, the network configuration of IP Camera is modified;
B, acquisition/modification IP Camera video resolution, code rate, frame per second, OSD and cradle head control;
C, time system data of IP Camera is modified;
D, the company-information and version information of IP Camera are obtained.
Further, the equipment in the step S400, which controls, includes:
The equipment of cycle access access, for judging whether equipment is online;
Equipment is opened or closed by open function, close function, equipment access is completed by ioctl function, it is described to set
Standby access includes the acquisition of the modification of facility information, equipment control and network media stream;
Device node when equipment disconnects, under deletion/dev.
Compared with prior art, the present invention have the following advantages that and the utility model has the advantages that
(1) present invention simplifies the realization of application program, increases substantially the development efficiency of application, application program does not need to close
The Details Of Agreement of note IP Camera, device model, access way, the operation of all about IP Camera are reduced to
The operation of linux standard device.
(2) present invention has very big excellent in the application scenarios for needing while accessing IP Camera and USB camera
Gesture, application program, which does not need to do specially treated, can complete control and management to the obstructed equipment of two classes.
Detailed description of the invention
Fig. 1 is flow chart of the invention.
Specific embodiment
The present invention is described in further detail below with reference to embodiment, embodiments of the present invention are not limited thereto.
Embodiment 1:
In conjunction with shown in attached drawing 1, a method of IP Camera is modeled as USB camera, is used for IP Camera
It is modeled as USB camera, application program only needs the linux device drives interface by calling standard, so that it may complete to net
The management of network camera.The present invention is described in detail with reference to the accompanying drawing.
Software general frame, including equipment discovery, device parameter configuration and equipment control.Program is with linux ko (kernel
Driving) mode present.Wherein equipment discovery feature is mainly used for searching for online equipment, including searches for automatically and manual search two
Kind search pattern.Device parameter configuration is mainly used for carrying out parameter configuration and configuration parameter template to individual equipment, facilitates use
In batch setting.Equipment control, including realizing candid photograph to individual equipment, reading audio/video flow and blocking reporting for alarm
Operation.
Described program executes process, includes the following steps,
Step 1: loading equipemtn driving
Program exists in the form of ko (linux device drives), linux kernel starting, after completing netinit
Device drives are corresponded to by linux standard commands load networks camera.Device drives initialize local running environment first,
Then initialization IP Camera finds agreement, and the next step of user is waited to operate;
Step 2: equipment discovery
The search pattern being arranged by application program, scans in a local network.When there is new equipment to be linked into local area network,
Information can be sent into local area network in the form of multicast.It, can further progress peace after equipment discovery program receives multicast information
Full certification, obtains the specifying information of equipment.Whether equipment discovery program, which can also actively search for have in local area network, simultaneously meets net
The equipment of network camera agreement.
Step 3: creation device node
After equipment discovery program search arrives new equipment, can at/dev one device node of addition.In this way for net
The operation of network camera is just similar with the operation of usb camera.Corresponding device node can be opened by open method, completed
Parameter setting and further operation to equipment.
Step 4: heartbeat
It is online in order to judge whether after device node addition, it needs regularly to interact.Driver realizes cycle access
The equipment of access.
Step 5: equipment access
Equipment access is the key that program, and equipment access includes the acquisition of facility information, the modification of facility information, Yi Jishe
The acquisition of standby control and network media stream.The mode of access is that, by open, close either on or off equipment is complete by ioctl
Pairs of equipment is specifically operated.
Step 6: equipment disconnects
Equipment disconnects, and is divided into normal disconnect and disconnects with abnormal.Normal to disconnect, driver will receive what equipment was left
Message.It is abnormal to disconnect, it such as powers off, network failure.For both the above situation.Driver can all delete/dev under equipment section
Point.
Step 7: device uninstallation
Device uninstallation realizes the offloading functions of IP Camera driving, and application program can be completed by this step to journey
The unloading of sequence.
The present invention changes the complicated implementation of IPC camera application programs, and application program can be more simply and easily
Complete the management to IPC equipment.
Although reference be made herein to invention has been described for explanatory embodiment of the invention, and above-described embodiment is only this hair
Bright preferable embodiment, embodiment of the present invention are not limited by the above embodiments, it should be appreciated that those skilled in the art
Member can be designed that a lot of other modification and implementations, these modifications and implementations will fall in principle disclosed in the present application
Within scope and spirit.
Claims (6)
1. a kind of method that IP Camera is modeled as USB camera characterized by comprising
Step S100: being encapsulated in Linux inner core for IP Camera interaction protocol, complete after the driving of linux kernel loading equipemtn
At the initialization of the initialization of IP Camera interaction protocol and IP Camera discovery agreement;
Step S200: search online equipment after finding online equipment, generates a device node under the/path dev, for will
Operation to the driving of Linux standard is converted to the operation of camera;
Step S300: device parameter configuration, for carrying out parameter configuration or configuration parameter template to individual equipment, for pair
Equipment carries out batch setting;
Step S400: equipment control is reported for realizing candid photograph to individual equipment, reading audio/video flow and block alarm.
2. a kind of method that IP Camera is modeled as USB camera according to claim 1, which is characterized in that institute
Step S200 is stated to specifically include:
Step S210: the online equipment that meets IP Camera agreement is actively searched in local area network according to the search pattern of setting;
Step S220: when online equipment accesses, a device node is generated at/dev.
3. a kind of method that IP Camera is modeled as USB camera according to claim 2, which is characterized in that institute
Stating search pattern includes automatic search and manual search, and the automatic search is for by sending multicast message to fixed address
The online equipment of search and system in the same subnet, the manual search are used to disappear by sending multicast to specified address
Online equipment in the specified subnet of breath search.
4. a kind of method that IP Camera is modeled as USB camera according to claim 1, which is characterized in that institute
When stating step S200 and including: new equipment access to LAN, information is sent to local area network in the form of multicast, equipment discovery program connects
After receiving multicast information, safety certification is carried out, the specifying information of equipment is obtained.
5. a kind of method that IP Camera is modeled as USB camera according to claim 1, which is characterized in that institute
Step S300 is stated to specifically include:
A, the network configuration of IP Camera is modified;
B, acquisition/modification IP Camera video resolution, code rate, frame per second, OSD and cradle head control;
C, time system data of IP Camera is modified;
D, the company-information and version information of IP Camera are obtained.
6. a kind of method that IP Camera is modeled as USB camera according to claim 1, which is characterized in that institute
It states the equipment in step S400 and controls and include:
The equipment of cycle access access, for judging whether equipment is online;
Equipment is opened or closed by open function, close function, equipment access is completed by ioctl function, the equipment is visited
Ask the acquisition of modification including facility information, equipment control and network media stream;
Device node when equipment disconnects, under deletion/dev.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811456207.4A CN109361871B (en) | 2018-11-30 | 2018-11-30 | Method for simulating network camera as USB camera |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811456207.4A CN109361871B (en) | 2018-11-30 | 2018-11-30 | Method for simulating network camera as USB camera |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109361871A true CN109361871A (en) | 2019-02-19 |
CN109361871B CN109361871B (en) | 2020-07-24 |
Family
ID=65330690
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811456207.4A Active CN109361871B (en) | 2018-11-30 | 2018-11-30 | Method for simulating network camera as USB camera |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109361871B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102333208A (en) * | 2011-10-14 | 2012-01-25 | 浪潮电子信息产业股份有限公司 | Third-generation (3G)-network-based wireless monitoring system |
CN102413320A (en) * | 2011-12-21 | 2012-04-11 | 上海大学 | Method for realizing wireless network intelligent video monitoring system |
CN102497538A (en) * | 2011-12-14 | 2012-06-13 | 北方工业大学 | High-speed image acquisition and transmission platform based on ARM |
US20140092004A1 (en) * | 2012-09-28 | 2014-04-03 | Ashok K. Mishra | Audio information and/or control via an intermediary device |
CN103780900A (en) * | 2014-01-16 | 2014-05-07 | 国家电网公司 | ONVIF simulating testing device and method |
US20150230274A1 (en) * | 2014-02-07 | 2015-08-13 | Cisco Technology, Inc. | Dynamic acceleration of prioritized mobile application traffic |
CN107528919A (en) * | 2017-09-25 | 2017-12-29 | 江苏英索纳智能科技有限公司 | The method and device that a kind of lan device is found and driver is installed automatically |
CN107733858A (en) * | 2017-09-01 | 2018-02-23 | 北京知道未来信息技术有限公司 | A kind of monitoring device and method of intelligent protection camera information |
CN108449555A (en) * | 2018-05-04 | 2018-08-24 | 北京化工大学 | Image interfusion method and system |
-
2018
- 2018-11-30 CN CN201811456207.4A patent/CN109361871B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102333208A (en) * | 2011-10-14 | 2012-01-25 | 浪潮电子信息产业股份有限公司 | Third-generation (3G)-network-based wireless monitoring system |
CN102497538A (en) * | 2011-12-14 | 2012-06-13 | 北方工业大学 | High-speed image acquisition and transmission platform based on ARM |
CN102413320A (en) * | 2011-12-21 | 2012-04-11 | 上海大学 | Method for realizing wireless network intelligent video monitoring system |
US20140092004A1 (en) * | 2012-09-28 | 2014-04-03 | Ashok K. Mishra | Audio information and/or control via an intermediary device |
CN103780900A (en) * | 2014-01-16 | 2014-05-07 | 国家电网公司 | ONVIF simulating testing device and method |
CN103780900B (en) * | 2014-01-16 | 2016-02-17 | 国家电网公司 | A kind of ONVIF simulating test device and method |
US20150230274A1 (en) * | 2014-02-07 | 2015-08-13 | Cisco Technology, Inc. | Dynamic acceleration of prioritized mobile application traffic |
CN107733858A (en) * | 2017-09-01 | 2018-02-23 | 北京知道未来信息技术有限公司 | A kind of monitoring device and method of intelligent protection camera information |
CN107528919A (en) * | 2017-09-25 | 2017-12-29 | 江苏英索纳智能科技有限公司 | The method and device that a kind of lan device is found and driver is installed automatically |
CN108449555A (en) * | 2018-05-04 | 2018-08-24 | 北京化工大学 | Image interfusion method and system |
Also Published As
Publication number | Publication date |
---|---|
CN109361871B (en) | 2020-07-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7604162B2 (en) | Method and system for management of terminal devices | |
CN101515926A (en) | Device management method for device management system | |
US11146641B2 (en) | Internet of things information system | |
CN104135378B (en) | The method and things-internet gateway management and control entity of control are managed to things-internet gateway | |
CN105319973B (en) | A kind of method and device that smart home device is replaced by scanning the two-dimensional code | |
CN101099398B (en) | Method and devices for matching data between a manager and an agent in a management network | |
US20170250868A1 (en) | Network management using adaptive policy | |
CN108833565A (en) | A kind of method, apparatus of monitoring server, server and storage medium | |
CN104660997B (en) | Service-oriented multi-source heterogeneous video monitoring adaptation method and system | |
WO2019024679A1 (en) | Method for upgrading network function and upgrade management entity | |
CN107864053A (en) | Dynamic Configuration and device based on zookeeper | |
CN113055421A (en) | Service grid management method and system | |
CN108255585A (en) | SDK exception controls and application program operation method, device and its equipment | |
CN107179977A (en) | Database Full-automatic monitoring system based on mpm models | |
CN111611054A (en) | Application deployment method and device | |
US9176719B2 (en) | Resolving prerequisites for a client device in an open service gateway initiative (OSGI) framework | |
CN108471361A (en) | A kind of version upgrading method and device | |
CN111224828A (en) | Network management method of intelligent CPE (customer premise equipment) | |
CN114926163A (en) | Resource cross-chain transfer method and device | |
CN102014007B (en) | Distributed system service management system and method | |
CN109842524A (en) | Automatically updating method, device, electronic equipment and computer readable storage medium | |
CN109361871A (en) | A method of IP Camera is modeled as USB camera | |
US7805733B2 (en) | Software implementation of hardware platform interface | |
CN107347126B (en) | The method of Configuration network camera | |
CN112367296B (en) | Service control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |