Commit Graph

76 Commits

Author SHA1 Message Date
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk e5f4ca7bb8 Remove use of const char * in public API and OS specific where possible
* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
2020-12-07 17:44:50 +00:00
baldurk 381fdbe06b Fix missing format argument in error message 2020-09-17 17:43:28 +01:00
baldurk b2d85982a5 Hide capture progress bar if the application disconnects mid-capture 2020-05-26 16:46:14 +01:00
baldurk 7539533cb9 Populate new child processes immediately in capture connection panel 2020-05-22 22:09:44 +01:00
baldurk 54abdc3d14 Fix racy cross-thread access to target control connection. Closes #1857 2020-04-29 18:48:51 +01:00
baldurk 936e6372cb Remove use of 3rdparty/ prefix from includes
* We instead always have 3rdparty/ in the relevant include search paths and rely
  on that. Each library still has its own unique base dir within 3rdparty to
  clarify where the include is coming from.
2020-03-11 18:00:53 +00:00
baldurk 6579dfc666 Add protection against target control connection dropping immediately 2020-03-05 10:39:36 +00:00
baldurk f7cb742a4c Display capture file size in capture connection window. Closes #1723 2020-02-14 19:31:59 +00:00
baldurk 7dd116abd4 Remove redundant/tautological comparisons identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk e9182377e5 NULL out connection handle after shutdown 2020-01-13 16:55:05 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk e302ecfe83 Don't leak target control handle 2019-12-17 15:51:16 +00:00
baldurk 4458ab3205 Remove assumptions that captures are always frames
* Previously we had "Frame X" and "Start of Frame" hardcoded in the event
  browser, and the end of frame was in many cases assumed to be a present call.
  However with the in-application API this is not necessarily true.
* Presents are now serialised separately in all APIs and displayed wherever they
  happen in the frame, and if there is no present at the end of the frame an
  "End of Capture" marker is inserted. Similarly API-defined captures are not
  given a potentially misleading frame number.
2019-11-21 17:09:01 +00:00
baldurk e9dda8343f When deleting temp files, remove from the recent file list. Closes #1540
* If the UI was launched with a filename as a parameter to open the capture, it
  will be added to the recent capture file list. Only later (relatively
  speaking) if we make a capture connection will we realise that it is temporary
  and potentially delete the file. If we do so, remove the capture from the
  recent file list.
2019-10-10 16:48:42 +01:00
baldurk 6203909791 Expose replay options to the UI
* The defaults can be configured from the settings menu, and there's a new "Open
  Capture with Options" menu option to open a capture with different options
  temporarily.
2019-08-27 18:51:56 +01:00
baldurk 20be9f3d52 Add ReplayOptions struct to contain replay-time configuration
* Not currently exposed to the UI or used by the drivers, we just pass the
  default object through
2019-08-27 18:51:56 +01:00
baldurk 06f2e61b8f Refactor RemoteHost to be copyable with shared storage
* This allows RemoteHost handles to still be valid and usable (if returning
  empty data) when they are deleted/removed if the device is disconnected, as
  well as providing better multi-thread access (they lock internally)
2019-07-31 17:51:12 +01:00
baldurk bd36bccd43 Synchronise properly when passing commands to capture connection thread 2019-06-18 15:54:38 +01:00
baldurk fe406b8ce9 Fix capture times not being timezone-adjusted. Closes #1393 2019-05-27 10:56:08 +01:00
baldurk 605f77217d Don't automatically open a single capture if a dialog is open
* Prevents a crash if the LiveCapture window is closed while it owns a popup
  dialog for e.g. saving or deleting a capture.
2019-05-27 10:21:30 +01:00
baldurk 02abe02fe8 Add the option to save all selected captures at once
* The filename selected is used as a base, then -frameXYZ is appended to each
  capture.
2019-02-13 18:50:52 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
tabi.katalin 369d93b99c Cycle active window with button
A new button is added to the UI so that we can cycle the currently active window when there are more windows to capture.  It's like pressing the F11 button but it works on Android too.
2018-10-10 10:19:43 +01:00
baldurk 91ac88d6b5 Add an '(Active)' suffix on active APIs to be clearer about it 2018-10-04 16:07:36 +01:00
baldurk 553a68de19 Add 'No to All' button when closing a capture connection. Closes #1101 2018-09-07 14:22:47 +01:00
baldurk 296050e298 Add copy progress bar for copies over target control connections 2018-09-06 13:17:12 +01:00
baldurk 9b7581011e Add a per-capture API to target control protocol
* This means that if an application uses more than one API, the correct API is
  listed for each capture.
2018-08-13 18:27:26 +01:00
baldurk 7d55ecbc48 Add 'capture frame immediately' button
* This should be more obvious especially on e.g. android where there's no
  overlay and key shortcut.
2018-08-06 16:23:02 +01:00
baldurk 196daacfb4 Don't clear selection when clicking on an item. Closes #1061 2018-08-01 17:29:35 +01:00
baldurk b3bc00738d Don't enumerate window titles when we just need a list of PIDs 2018-05-23 17:28:56 +01:00
baldurk 082ab4d75d GUIInvoke takes a QObject* to avoid callbacks after object lifetime
* The GUIInvoke object takes a QObject, and uses QPointer to check that
  it hasn't been deleted when the callback fires. This prevents delayed
  callbacks from executing after the object has been deleted and
  crashing.
* In most cases the pointer is just 'this'.
2018-05-08 11:54:34 +01:00
Baldur Karlsson 93cebc715c Only show texture viewer when closing live capture if we got a capture 2018-03-13 15:49:31 +00:00
baldurk 7b3e1be030 When auto-opening a single capture, try to raise the texture viewer
* This gives a better 'first impression' when opening a capture than
  falling back to the last panel that is the launch executable panel
  in 95% of cases.
2018-02-24 23:22:22 +00:00
baldurk 8de37336ad Adjust capture connection scrolling to be reasonable on the mouse wheel 2018-02-12 20:47:58 +00:00
baldurk 10649d9af3 Set number of frames to capture with instantaneous trigger. Refs #871 2018-02-12 16:58:05 +00:00
baldurk e20a31d23f Add friendlier error message when overwriting current file. Refs #862
* Only the currently open capture can save over its file, other captures
  cannot overwrite it while it's in use.
2018-02-09 01:32:49 +00:00
baldurk 5150a9531b Allow queuing a sequence of frames both before capture, or while running
* We also make the frame counting consistent: Frame 0 is the frame from
  device initialisation to first present, Frame 1 is from first present
  to second, and so on after that.
2018-01-24 11:38:37 +00:00
baldurk e305029ddd Update copyright years to 2018 2018-01-01 17:55:29 +00:00
baldurk 0fef1c0a44 Display richer status in capture connection window.
* This includes the capture progress bar that will appear, as well as
  better information about the active API.
2017-12-29 18:30:44 +00:00
baldurk 559656e0f6 Send capture progress over an active target control connection 2017-12-29 18:30:43 +00:00
baldurk d14c7f3894 Track a set of active APIs instead of a single current API.
* We also let an API be active without presenting, and then note when it
  starts presenting. This lets us detect the case where an API has been
  started up and used, but isn't presenting so we're not able to capture
  it. Less confusing than telling the user no API is detected, and lets
  us direct them to the relevant documentation.
* There's also a flag indicating if the API can be captured even if it
  does present.
2017-12-29 18:30:38 +00:00
baldurk ebaefc82a9 Normalise and make python/public interface more consistent
* We enforce a naming scheme more strongly - types, member functions,
  and enum values must be UpperCaseCamel, and member variables must be
  lowerCaseCamel. No underscores allowed.
* eventId not eventID or EID, and Id preferred to ID in general. Also
  for resourceId.
* Removed some lingering hungarian m_Foo naming.
* Some pipeline state structs that are almost identical between the
  different APIs are pulled out into common structs. Where something
  doesn't make sense (e.g. viewport enable for vulkan) it will just be
  set to a sensible default (in that case always true).
* Changed scissors to be x/y & width/height instead of sometimes
  left/top/right/bottom
* Abbreviations are discouraged, e.g. operation not op, function not
  func.
2017-12-22 13:02:36 +00:00
David McFarland 8119f98c65 LiveCapture: specify bpl when creating RGB888 thumbnail
Qt rounds up the bpl to a multiple of 4 bytes, so this was crashing for me with
odd sized thumbnails.
2017-12-20 19:00:50 +01:00
baldurk 0b527fab49 Use rdc types instead of Qt containers in public QRenderDoc interface
* This is to support python bindings - the pyside implementation of
  QVector, QString, etc is not available to SWIG, so SWIG treates these
  all as opaque types.
* Rather than trying to set up bindings that work for rdcarray and
  QList/QVector, or implementing separate bindings, we instead just say
  that the public interface must use the rdc types. In most cases they
  seamlessly convert to/from Qt types anyway.
* In a couple of places we use an array of pairs instead of a map. In
  future we probably want an rdcdict or rdcmap with proper dict bindings
  in python.
2017-12-13 22:43:01 +00:00
baldurk 286e117d56 Add headers needed for compilation without PCH
* Removing includes of Code/CaptureContext.h removed some dependencies.
2017-11-23 00:20:01 +00:00
baldurk 33ff48811b Normalise terminology in UI code - don't call captures 'logs'
* Log is an overloaded term since it can also mean the debug log. We now
  consistently refer to capture files as capture files or just captures
  for short. The log is just for log messages and diagnostics.
* The user-facing UI was mostly already consistent, but many of the
  public interfaces exposed to python needed to be renamed, and it made
  more sense just to make everything consistent.
2017-11-17 16:30:57 +00:00
baldurk e6c5c03896 Remove rdctype namespace. Rename rdctype::str -> rdcstr, rdcarray, etc
* Since these types are more prevalent than originally designed, it
  makes more sense to remove the namespace for ease of typing/naming.
* Also add a specialised type 'bytebuf' for an array of bytes.
* This makes mapping easier to SWIG since there's no special casing for
  namespaced arrays. Especially so for nested cases like
  rdctype::array<rdctype::str> -> rdcarray<rdcstr>
2017-11-03 16:04:59 +00:00
baldurk 5e59616a8c Update rdctype::array to have a more stl-like mutable interface
* For the most part the interface is stl-compatible, but we have a few
  little changes of our own for convenience.
* This class is still needed after deleting the C# UI, because we don't
  want to pass C++ stl structs over module boundaries and possibly run
  into hard to diagnose incompatibilities.
2017-11-03 16:01:58 +00:00
baldurk 0ae61ea088 Fix translation string being incorrectly split 2017-11-03 15:54:06 +00:00