CN102033730B - Method for converting DirectShow video data into high-performance Java image buffering - Google Patents

Method for converting DirectShow video data into high-performance Java image buffering Download PDF

Info

Publication number
CN102033730B
CN102033730B CN2010105312374A CN201010531237A CN102033730B CN 102033730 B CN102033730 B CN 102033730B CN 2010105312374 A CN2010105312374 A CN 2010105312374A CN 201010531237 A CN201010531237 A CN 201010531237A CN 102033730 B CN102033730 B CN 102033730B
Authority
CN
China
Prior art keywords
java
video
directshow
data
frame
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.)
Expired - Fee Related
Application number
CN2010105312374A
Other languages
Chinese (zh)
Other versions
CN102033730A (en
Inventor
张新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Iron & Steel Engineering Technology Group Communications Co Ltd
Original Assignee
Wuhan Iron and Steel Group Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Wuhan Iron and Steel Group Corp filed Critical Wuhan Iron and Steel Group Corp
Priority to CN2010105312374A priority Critical patent/CN102033730B/en
Publication of CN102033730A publication Critical patent/CN102033730A/en
Application granted granted Critical
Publication of CN102033730B publication Critical patent/CN102033730B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a method for converting DirectShow video data into high-performance Java image buffering. The process comprises the following steps of: inserting a frame capture filter into a DirectShow video stream, calculating the frame rate of the video stream, and setting and starting a timer; capturing video frame data, and performing format pixel level conversion on a video frame image; and establishing a Java graphics buffer, directly mapping the Java graphics buffer into a physical memory, and directly filling the converted video frame image data into the physical memory. By the method, the problem that Java cannot provide high-performance solutions for processing and playback of the video data for a long time is solved, conversion interaction between binary video data of system-level main stream multimedia frame DirectShow on Windows and the Java image buffering is realized, and stable and reliable multimedia video processing support is provided for Java.

Description

The DirectShow video data is converted into the method for high-performance Java image buffers
Technical field
The present invention relates to high performance video data format conversion method, relate in particular to the method that the video data that the multimedia framework DirectShow on the Windows operating system is produced converts high performance Java image buffers into.
Background technology
Carry out multimedia video data processing and the design of playback supervisor at windows platform, need use DirectShow.DirectShow is the multimedia framework that the Windows system carries, and functions such as multimedia seizure based on the module plug-in structure, video/audio playback are provided.But because DirectShow is based on C/C++ and develops, its program development interface only provides the support of C/C++ language.On the other hand; Java is as the main flow development technique in present enterprise-level, desktop, multiple field such as embedded; Its multimedia support aspect but is short of always very much; The Java Media Framework that official provides does not obtain upgrading still based on out-of-date technical system for a long time, and especially the support to DirectShow is zero no better than on the Java platform.This gives based on Java exploitation multimedia application software and has brought greatly obstruction.In this problem, emphasis just is that video data that DirectShow produces converts the graphics buffer data of Java into like high performance way how, satisfies the graph rendering requirement of Java, gets through the video data ALT-CH alternate channel between DirectShow and the Java.
Summary of the invention
To above-mentioned technical matters, the present invention provides a kind of and converts the DirectShow video data method of high-performance Java image buffers into, realizes the conversion of DirectShow video data to the Java image buffers.
For solving the problems of the technologies described above, technical scheme of the present invention may further comprise the steps:
ⅰ, the DirectShow video flowing is inserted frame capture filter device,
ⅱ, the video data that DirectShow is produced carry out frame rate calculating, and timer is set up in control based on frame rate, and confirms timer frequency origination point according to this, starts timer;
ⅲ, the video flowing that DirectShow is produced carry out frame-grab,
ⅳ, confirm object format, and oppositely accomplish pixel format conversion fast with the line scanning mode according to the pixel queueing discipline under the Windows environment according to Java graphics buffer optimum matching quality;
ⅴ, set up the Java graphic buffer, and map directly to physical memory;
ⅵ, the frame data after the format conversion directly are filled into said physical memory, form Java graphics buffer data;
ⅵ, the frame data after the format conversion directly are filled into above-mentioned physical memory;
ⅶ, judge whether to exist the subsequent frame data,, then return step ⅲ, realize the playback of the continuous pictures among the Java if exist; Otherwise, stop timer, memory resources release,
ⅷ, end.
Further optimize, after step ⅵ, also comprise, set up the direct access of Java2D, and be mapped as standard Java image object, Java graphics buffer data are rendered into the Java image object the video card video memory;
Preferably; The frame data of said step ⅵ after with format conversion directly are filled into said physical memory, are to accomplish image buffer data in the said physical memory to the mapping conversion of Java graphics buffer through this new bytecode of Java Native Access and local binary code bridge joint mode.
The present invention is through setting up the video data conversion middle layer between DirectShow and the Java; The dynamic image playback that provides the DirectShow video data to change and possess hardware acceleration performance to the high-level efficiency of Java graph data buffer format, and can carry out slewing rate control according to the frame rate quality automatically.The invention solves the problem that Java for a long time can't provide high performance solution to the processing and the playback of DirectShow video data; The binary video data and the conversion between the Java image buffers that have realized the system-level main flow multimedia framework DirectShow on the Windows are mutual; Use abundant decoder resources of DirectShow and Video processing usefulness at a high speed, support for Java provides reliable and stable multimedia video to handle.This method can greatly be simplified the functional development realization of Java to multimedia video data, and have high performance adaptable across any multimedia application software design and development based on Java in the operation of Windows environment.
Description of drawings
Below in conjunction with accompanying drawing and embodiment technical scheme of the present invention is further specified.
Fig. 1 is a FB(flow block) of the present invention.
Embodiment
At first, carrying out frame rate to DirectShow output ground video flowing and calculating, and be provided with according to this and start timer through need inserting DirectShow video capture filtrator.In the frequency origination point of regulation, accomplish the seizure of video requency frame data; Based on compatible Java graphics buffer form video frame images is carried out the conversion of form Pixel-level; Set up the Java graphic buffer and map directly to physical memory, the video frame images data after the conversion directly are filled in the physical memory, Java2D is started hardware-accelerated pattern; Direct access to the video card video memory is provided, Java graphics buffer data is played up to be filled in the video card video memory accomplish high-performance image and play up playback.Judge process that moves in circles of formation based on frame data, owing to there is frame rate to calculate, the frequency origination point of timer can guarantee that the image of constantly playing up is the continuous pictures of facile motion.Below in conjunction with Fig. 1, the process of this embodiment is described:
Adopt C++ completion DirectShow video capture filtrator to be inserted into DirectShow and work as front view;
The video data that DirectShow is generated automatically carries out frame rate calculating, confirms timing frequency;
Utilize the code bridge joint that timing frequency is passed to the Java worker thread, in the Java worker thread, create timer, and start timer after setting frequency;
The DirectShow video is carried out frame catches;
According to the requirement that is compatible with Java graphics buffer form the frame of video of catching is carried out pixel format conversion; Because the coordinate system that system diagram looks like to take under the Windows environment is the mathematics coordinate system, therefore need carries out pixel data in proper order to the initial opposite direction of frame and handle from End of Frame;
In the Java worker thread, set up the Java image buffer, and map directly to physical memory;
Through this new bytecode of Java Native Access and local binary code bridge joint mode; Video requency frame data after the conversion is filled into this physical memory, accomplishes the said image buffer data that are mapped in the physical memory and change to the mapping of Java graphics buffer;
Utilize the hardware-accelerated pattern of Java2D to be opened to the mapping of video card video memory, graphics buffer is rendered into the video card video memory, accomplish the final rendering of two field picture;
Judge whether to exist the subsequent frame data,, then return step ⅲ, realize the playback of the continuous pictures among the Java if exist; Otherwise, stop timer, memory resources release;
Finish.
The content of not doing in this instructions to describe in detail belongs to this area professional and technical personnel's known prior art.
It should be noted last that; Above embodiment is only unrestricted in order to technical scheme of the present invention to be described; Although with reference to preferred embodiment the present invention is specified, those of ordinary skill in the art should be appreciated that and can make amendment or be equal to replacement technical scheme of the present invention; And not breaking away from the spirit and the scope of technical scheme of the present invention, it all should be encompassed in the middle of the claim scope of the present invention.

Claims (2)

1. one kind converts the DirectShow video data method of high-performance Java image buffers into, it is characterized in that, may further comprise the steps:
I, the DirectShow video flowing is inserted frame capture filter device;
Ii, the video data that DirectShow is produced carry out frame rate calculating, and timer is set up in control based on frame rate, and confirms timer frequency origination point according to this, starts timer;
Iii, the video flowing that DirectShow is produced carry out frame-grab;
Iv, confirm object format, and oppositely accomplish pixel format conversion fast with the line scanning mode according to the pixel queueing discipline under the Windows environment according to Java graphics buffer optimum matching quality;
V, set up the Java graphic buffer, and map directly to physical memory;
Vi, the frame data after the format conversion directly are filled into above-mentioned physical memory; Said frame data after the format conversion directly are filled into said physical memory; Be through this new bytecode of Java Native Access and local binary code bridge joint mode; Video requency frame data after the conversion is filled into this physical memory, accomplishes the said image buffer data that are mapped in the physical memory and change to the mapping of Java graphics buffer;
Vii, judge whether to exist the subsequent frame data,, then return step I ii, realize the playback of the continuous pictures among the Java if exist; Otherwise, stop timer, memory resources release;
Viii, end.
2. the method that the DirectShow video data is converted into high-performance Java image buffers according to claim 1; It is characterized in that; After step vi, also comprise; Set up the direct access of Java2D, and be mapped as standard Java image object, Java graphics buffer data are rendered into the Java image object the video card video memory.
CN2010105312374A 2010-11-04 2010-11-04 Method for converting DirectShow video data into high-performance Java image buffering Expired - Fee Related CN102033730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010105312374A CN102033730B (en) 2010-11-04 2010-11-04 Method for converting DirectShow video data into high-performance Java image buffering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010105312374A CN102033730B (en) 2010-11-04 2010-11-04 Method for converting DirectShow video data into high-performance Java image buffering

Publications (2)

Publication Number Publication Date
CN102033730A CN102033730A (en) 2011-04-27
CN102033730B true CN102033730B (en) 2012-05-30

Family

ID=43886675

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010105312374A Expired - Fee Related CN102033730B (en) 2010-11-04 2010-11-04 Method for converting DirectShow video data into high-performance Java image buffering

Country Status (1)

Country Link
CN (1) CN102033730B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677972B (en) * 2012-09-25 2017-04-26 中国电信股份有限公司 Method, device and system for presenting virtual desktop metadata
CN110913265A (en) * 2019-11-29 2020-03-24 四川航天神坤科技有限公司 Video data buffer scheduling method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101702132A (en) * 2009-09-07 2010-05-05 无锡景象数字技术有限公司 2D and 3D software switching method based on DirectShow technology
CN101783941A (en) * 2009-09-15 2010-07-21 上海海事大学 Real-time video transmission method based on IP network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8155205B2 (en) * 2007-02-28 2012-04-10 Arcsoft, Inc. Dynamic decoder switch

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101702132A (en) * 2009-09-07 2010-05-05 无锡景象数字技术有限公司 2D and 3D software switching method based on DirectShow technology
CN101783941A (en) * 2009-09-15 2010-07-21 上海海事大学 Real-time video transmission method based on IP network

Also Published As

Publication number Publication date
CN102033730A (en) 2011-04-27

Similar Documents

Publication Publication Date Title
EP3996381A1 (en) Cover image determination method and apparatus, and device
US10575067B2 (en) Context based augmented advertisement
CN102790843B (en) Image processing equipment and display image generation method
KR101464572B1 (en) A method of adapting video images to small screen sizes
CN106851386B (en) Method and device for realizing augmented reality in television terminal based on Android system
CN102724492A (en) Method and system for transmitting and playing video images
CN103888840B (en) A kind of video mobile terminal Real Time Dragging and the method and device for scaling
US20110102670A1 (en) Audio video recording device
MY144253A (en) Storage medium including text-based caption information, reproducing apparatus and reproducing method thereof
US20150095957A1 (en) Mobile Inline Video Method and System
CN112954201B (en) Shooting control method and device and electronic equipment
CN105554416A (en) FPGA (Field Programmable Gate Array)-based high-definition video fade-in and fade-out processing system and method
CN102033730B (en) Method for converting DirectShow video data into high-performance Java image buffering
CN112565847B (en) Large-screen display control method and device
JP2022036991A (en) Image processing apparatus, image processing method, and program
CN104133607A (en) Handwriting sharing method and handwriting sharing device
AU4061600A (en) Method and apparatus for down conversion of video data
CN113347356A (en) Shooting method, shooting device, electronic equipment and storage medium
CN103200363A (en) Method and apparatus for storing image of camera
CN116634188A (en) Live broadcast method and device and computer readable storage medium
CN1908947A (en) Device and method for producing emulation model of image sensor action
CN113409782A (en) Method, device and system for noninductive scheduling of BI (business intelligence) large screen
CN206364912U (en) Low frame frequency imaging system
KR20210052884A (en) Personalized Video Production System and Method Using Chroma Key
CN111179389B (en) Three-dimensional instant calculation animation production device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171229

Address after: 430000 front of Qingshan District factory in Wuhan, Hubei Province

Patentee after: Wuhan Iron & Steel Engineering Technology Group Communications Co., Ltd.

Address before: 430080 Friendship Avenue, Hubei, Wuhan, No. 999

Patentee before: Wuhan Iron & Steel (Group) Corp.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120530

Termination date: 20201104