Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
b3983d35
Commit
b3983d35
authored
May 28, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtcapture: Initialize our structure no sooner than needed.
parent
d4e0e3d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
modules/access/qtcapture.m
modules/access/qtcapture.m
+17
-14
No files found.
modules/access/qtcapture.m
View file @
b3983d35
...
@@ -55,7 +55,7 @@ vlc_module_begin();
...
@@ -55,7 +55,7 @@ vlc_module_begin();
set_category
(
CAT_INPUT
);
set_category
(
CAT_INPUT
);
set_subcategory
(
SUBCAT_INPUT_ACCESS
);
set_subcategory
(
SUBCAT_INPUT_ACCESS
);
add_shortcut
(
"qtcapture"
);
add_shortcut
(
"qtcapture"
);
set_capability
(
"access_demux"
,
0
);
set_capability
(
"access_demux"
,
1
0
);
set_callbacks
(
Open
,
Close
);
set_callbacks
(
Open
,
Close
);
vlc_module_end
();
vlc_module_end
();
...
@@ -182,13 +182,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -182,13 +182,6 @@ static int Open( vlc_object_t *p_this )
int
i_aspect
;
int
i_aspect
;
int
result
=
0
;
int
result
=
0
;
/* Set up p_demux */
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
info
.
i_update
=
0
;
p_demux
->
info
.
i_title
=
0
;
p_demux
->
info
.
i_seekpoint
=
0
;
/* Only when selected */
/* Only when selected */
if
(
*
p_demux
->
psz_access
==
'\0'
)
if
(
*
p_demux
->
psz_access
==
'\0'
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
@@ -197,12 +190,6 @@ static int Open( vlc_object_t *p_this )
...
@@ -197,12 +190,6 @@ static int Open( vlc_object_t *p_this )
msg_Dbg
(
p_demux
,
"QTCapture Probed"
);
msg_Dbg
(
p_demux
,
"QTCapture Probed"
);
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
memset
(
p_sys
,
0
,
sizeof
(
demux_sys_t
)
);
memset
(
&
fmt
,
0
,
sizeof
(
es_format_t
)
);
QTCaptureDeviceInput
*
input
=
nil
;
QTCaptureDeviceInput
*
input
=
nil
;
QTCaptureSession
*
session
=
nil
;
QTCaptureSession
*
session
=
nil
;
VLCDecompressedVideoOutput
*
output
=
nil
;
VLCDecompressedVideoOutput
*
output
=
nil
;
...
@@ -252,6 +239,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -252,6 +239,7 @@ static int Open( vlc_object_t *p_this )
[
session
startRunning
];
[
session
startRunning
];
int
qtchroma
=
[[[
device
formatDescriptions
]
objectAtIndex
:
0
]
formatType
];
/* FIXME */
int
qtchroma
=
[[[
device
formatDescriptions
]
objectAtIndex
:
0
]
formatType
];
/* FIXME */
int
chroma
=
qtchroma_to_fourcc
(
qtchroma
);
int
chroma
=
qtchroma_to_fourcc
(
qtchroma
);
if
(
!
chroma
)
if
(
!
chroma
)
...
@@ -260,6 +248,21 @@ static int Open( vlc_object_t *p_this )
...
@@ -260,6 +248,21 @@ static int Open( vlc_object_t *p_this )
goto
error
;
goto
error
;
}
}
/* Now we can init */
/* Set up p_demux */
p_demux
->
pf_demux
=
Demux
;
p_demux
->
pf_control
=
Control
;
p_demux
->
info
.
i_update
=
0
;
p_demux
->
info
.
i_title
=
0
;
p_demux
->
info
.
i_seekpoint
=
0
;
p_demux
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
demux_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
memset
(
p_sys
,
0
,
sizeof
(
demux_sys_t
)
);
memset
(
&
fmt
,
0
,
sizeof
(
es_format_t
)
);
es_format_Init
(
&
fmt
,
VIDEO_ES
,
chroma
);
es_format_Init
(
&
fmt
,
VIDEO_ES
,
chroma
);
NSSize
size
=
[[
device
attributeForKey
:
QTFormatDescriptionVideoEncodedPixelsSizeAttribute
]
sizeValue
];
NSSize
size
=
[[
device
attributeForKey
:
QTFormatDescriptionVideoEncodedPixelsSizeAttribute
]
sizeValue
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment