VirtualBox

Changeset 75313 in vbox for trunk/src/VBox/Main/include


Ignore:
Timestamp:
Nov 7, 2018 5:13:56 PM (6 years ago)
Author:
vboxsync
Message:

Recording: More bugfixes for Main and FE/Qt.

Location:
trunk/src/VBox/Main/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/CaptureScreenSettingsImpl.h

    r75307 r75313  
    102102
    103103    // internal methods
    104     bool i_canChangeSettings();
    105104    int  i_getDefaultFileName(Utf8Str &strFile);
    106105    int  i_initInternal();
  • trunk/src/VBox/Main/include/VideoRec.h

    r75307 r75313  
    2929#include "VideoRecInternals.h"
    3030#include "VideoRecStream.h"
    31 
    32 #if 0
    33 /**
    34  * Enumeration for definining a video / audio
    35  * profile setting.
    36  */
    37 typedef enum VIDEORECPROFILE
    38 {
    39     VIDEORECPROFILE_NONE   = 0,
    40     VIDEORECPROFILE_LOW,
    41     VIDEORECPROFILE_MEDIUM,
    42     VIDEORECPROFILE_HIGH,
    43     VIDEORECPROFILE_BEST,
    44     VIDEORECPROFILE_REALTIME
    45 } VIDEORECPROFILE;
    46 
    47 /** Stores video recording features. */
    48 typedef uint32_t VIDEORECFEATURES;
    49 
    50 /** Video recording is disabled completely. */
    51 #define VIDEORECFEATURE_NONE        0
    52 /** Capturing video is enabled. */
    53 #define VIDEORECFEATURE_VIDEO       RT_BIT(0)
    54 /** Capturing audio is enabled. */
    55 #define VIDEORECFEATURE_AUDIO       RT_BIT(1)
    56 
    57 /**
    58  * Structure for keeping a screen recording configuration.
    59  */
    60 typedef struct VIDEORECSCREENCFG
    61 {
    62     VIDEORECSCREENCFG(void)
    63         : enmDst(VIDEORECDEST_INVALID)
    64         , uMaxTimeS(0)
    65     {
    66 #ifdef VBOX_WITH_AUDIO_VIDEOREC
    67         RT_ZERO(Audio);
    68 #endif
    69         RT_ZERO(Video);
    70     }
    71 
    72     VIDEORECSCREENCFG& operator=(const VIDEORECSCREENCFG &that)
    73     {
    74         enmDst          = that.enmDst;
    75 
    76         File.strName    = that.File.strName;
    77         File.uMaxSizeMB = that.File.uMaxSizeMB;
    78 #ifdef VBOX_WITH_AUDIO_VIDEOREC
    79         Audio           = that.Audio;
    80 #endif
    81         Video           = that.Video;
    82         uMaxTimeS       = that.uMaxTimeS;
    83         return *this;
    84     }
    85 
    86     unsigned long           uScreenId;
    87     /** Destination where to write the stream to. */
    88     VIDEORECDEST            enmDst;
    89 
    90     /**
    91      * Structure for keeping recording parameters if
    92      * destination is a file.
    93      */
    94     struct
    95     {
    96         /** File name (as absolute path). */
    97         com::Bstr       strName;
    98         /** Maximum file size (in MB) to record. */
    99         uint32_t        uMaxSizeMB;
    100     } File;
    101 
    102 #ifdef VBOX_WITH_AUDIO_VIDEOREC
    103     /**
    104      * Structure for keeping the audio recording parameters.
    105      */
    106     struct
    107     {
    108         /** Whether audio recording is enabled or not. */
    109         bool                fEnabled;
    110         /** The device LUN the audio driver is attached / configured to. */
    111         unsigned            uLUN;
    112         /** Hertz (Hz) rate. */
    113         uint16_t            uHz;
    114         /** Bits per sample. */
    115         uint8_t             cBits;
    116         /** Number of audio channels. */
    117         uint8_t             cChannels;
    118         /** Audio profile which is being used. */
    119         VIDEORECPROFILE     enmProfile;
    120     } Audio;
    121 #endif
    122 
    123     /**
    124      * Structure for keeping the video recording parameters.
    125      */
    126     struct
    127     {
    128         /** Whether video recording is enabled or not. */
    129         bool                fEnabled;
    130         /** Target width (in pixels). */
    131         uint32_t            uWidth;
    132         /** Target height (in pixels). */
    133         uint32_t            uHeight;
    134         /** Target encoding rate. */
    135         uint32_t            uRate;
    136         /** Target FPS. */
    137         uint32_t            uFPS;
    138 
    139 #ifdef VBOX_WITH_LIBVPX
    140         union
    141         {
    142             struct
    143             {
    144                 /** Encoder deadline. */
    145                 unsigned int uEncoderDeadline;
    146             } VPX;
    147         } Codec;
    148 #endif
    149 
    150     } Video;
    151 
    152     /** Maximum time (in s) to record.
    153      *  Specify 0 to disable this check. */
    154     uint32_t                uMaxTimeS;
    155 } VIDEORECSCREENCFG, *PVIDEORECSCREENCFG;
    156 #endif
    15731
    15832class Console;
     
    21286protected:
    21387
     88    /**
     89     * Enumeration for a recording context state.
     90     */
     91    enum VIDEORECSTS
     92    {
     93        /** Context not initialized. */
     94        VIDEORECSTS_UNINITIALIZED = 0,
     95        /** Context was created. */
     96        VIDEORECSTS_CREATED       = 1,
     97        /** Context was started. */
     98        VIDEORECSTS_STARTED       = 2,
     99        /** The usual 32-bit hack. */
     100        VIDEORECSTS_32BIT_HACK    = 0x7fffffff
     101    };
     102
    214103    /** Pointer to the console object. */
    215104    Console                  *pConsole;
     
    217106    settings::CaptureSettings Settings;
    218107    /** The current state. */
    219     uint32_t                  enmState;
     108    VIDEORECSTS               enmState;
    220109    /** Critical section to serialize access. */
    221110    RTCRITSECT                CritSect;
    222111    /** Semaphore to signal the encoding worker thread. */
    223112    RTSEMEVENT                WaitEvent;
    224     /** Whether this context is in started state or not. */
    225     bool                      fStarted;
    226113    /** Shutdown indicator. */
    227114    bool                      fShutdown;
  • trunk/src/VBox/Main/include/VideoRecStream.h

    r75307 r75313  
    109109public:
    110110
    111     CaptureStream(void);
    112 
    113     CaptureStream(uint32_t uScreen, const settings::CaptureScreenSettings &Settings);
     111    CaptureStream(CaptureContext *pCtx);
     112
     113    CaptureStream(CaptureContext *pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings);
    114114
    115115    virtual ~CaptureStream(void);
     
    117117public:
    118118
    119     int Init(uint32_t uScreen, const settings::CaptureScreenSettings &Settings);
     119    int Init(CaptureContext *pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings);
    120120    int Uninit(void);
    121121
     
    133133    int close(void);
    134134
    135     int initInternal(uint32_t uScreen, const settings::CaptureScreenSettings &Settings);
     135    int initInternal(CaptureContext *pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings);
    136136    int uninitInternal(void);
    137137
     
    153153protected:
    154154
     155    /**
     156     * Enumeration for a recording stream state.
     157     */
     158    enum RECORDINGSTREAMSTATE
     159    {
     160        /** Stream not initialized. */
     161        RECORDINGSTREAMSTATE_UNINITIALIZED = 0,
     162        /** Stream was initialized. */
     163        RECORDINGSTREAMSTATE_INITIALIZED   = 1,
     164        /** The usual 32-bit hack. */
     165        RECORDINGSTREAMSTATE_32BIT_HACK    = 0x7fffffff
     166    };
     167
    155168    /** Recording context this stream is associated to. */
    156     CaptureContext             *pCtx;
     169    CaptureContext         *pCtx;
     170    /** The current state. */
     171    RECORDINGSTREAMSTATE    enmState;
    157172    struct
    158173    {
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette