peilinok / screen-recorder

This repo has been archived, please visit https://github.com/peilinok/traa to get the new project!
GNU General Public License v3.0
152 stars 63 forks source link

when my one pc, have two of three screen, whether it can record ? #18

Closed xinsuinizhuan closed 4 years ago

peilinok commented 4 years ago

typedef struct {

/**
* Left of desktop area
*/
int v_left;

/**
* Top of desktop area
*/
int v_top;

/**
* Width of desktop area
*/
int v_width;

/**
* Height of desktop area
*/
int v_height;

/**
* Output video quality, value must be between 0 and 100, 0 is least, 100 is best
*/
int v_qb;

/**
* Output video bitrate, the larger value you set,
* the better video quality you get, but the file size is also larger.
* Suggestion: 960|1280|2500 *1000
*/
int v_bit_rate;

/**
* FPS(frame per second)
*/
int v_frame_rate;

/**
* Video encoder id
* Must get by recorder_get_vencoders
*/
int v_enc_id;

/**
* Output file path,the output file format is depended on the ext name.
* Support .mp4|.mkv for now.
*/
char output[260];

/**
* Desktop device
* Unused
*/
AMRECORDER_DEVICE v_device;

/**
* Microphone device info
*/
AMRECORDER_DEVICE a_mic;

/**
* Speaker device info
*/
AMRECORDER_DEVICE a_speaker;

}AMRECORDER_SETTING;

You can specifiy the resolution of monitor which you want to record by the param AMRECORDER_SETTING of initialize function.

peilinok commented 4 years ago

For more detail,you can find the function get_dst_adapter of record_desktop_duplication.cpp and do_record of record_desktop_gdi.cpp

peilinok commented 4 years ago

If you do not have other problems,I will close this issue.

xinsuinizhuan commented 4 years ago

whether have any example? Or whether current project could compile in linux?

xinsuinizhuan commented 4 years ago

For more detail,you can find the function get_dst_adapter of record_desktop_duplication.cpp and do_record of record_desktop_gdi.cpp

Thank you very much!

xinsuinizhuan commented 4 years ago

whether have the example that draw rect in windows or linux, that sopport the mult screen?

peilinok commented 4 years ago

whether have any example? Or whether current project could compile in linux?

only support windows for now

peilinok commented 4 years ago

whether have the example that draw rect in windows or linux, that sopport the mult screen?

You can find the test code in the Test project, and give different values to the v_left|v_top|v_width|v_height

xinsuinizhuan commented 4 years ago

whether it can compile with x64, what version of your ffmpeg?

peilinok commented 4 years ago

whether it can compile with x64, what version of your ffmpeg?

It is designed on x86.

Do you still have any problems?

xinsuinizhuan commented 4 years ago

whether it can compile with x64, what version of your ffmpeg?

It is designed on x86.

Do you still have any problems?

First, thankyou very much. Then, I also want to ask: how to get the monitor of my current cursor in?

peilinok commented 4 years ago

We usually enum all monitors and let user to choose one. Well, you can get the point of cursor and rects of all monitors through window api.

xinsuinizhuan commented 4 years ago

We usually enum all monitors and let user to choose one. Well, you can get the point of cursor and rects of all monitors through window api. whether have a function, that pass the current cursor to it, that then i could get the cur monitor?

xinsuinizhuan commented 4 years ago

Well, you can get the point of cursor and rects of all monitors through window api? How to do, i am a newer, do you could give me some guidances?

peilinok commented 4 years ago

Well, you can get the point of cursor and rects of all monitors through window api? How to do, i am a newer, do you could give me some guidances?

GetCursorInfo EnumDisplayDevices

peilinok commented 4 years ago

Do you still have any problems? I will close this issue.

xinsuinizhuan commented 4 years ago

Yes. when i get the current cursor information is: typedef struct { DWORD cbSize; DWORD flags; HCURSOR hCursor; POINT ptScreenPos; } CURSORINFO, PCURSORINFO, LPCURSORINFO; And when i get the all DisplayDevices: typedef struct _DISPLAY_DEVICE { DWORD cb; TCHAR DeviceName[32]; TCHAR DeviceString[128]; DWORD StateFlags; TCHAR DeviceID[128]; TCHAR DeviceKey[128]; } DISPLAY_DEVICE, *PDISPLAY_DEVICE; 1、how to get the current DISPLAY_DEVICE that current cursor in? 2、when get the current DISPLAY_DEVICE that to record, how to match the info IDXGIAdapter?

peilinok commented 4 years ago

https://docs.microsoft.com/en-us/windows/win32/gdi/multiple-display-monitors-functions

It is not about screen-recorder, I will close this issue.