Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZRTP
libjitsi
Commits
7961f114
Commit
7961f114
authored
12 years ago
by
Lyubomir Marinov
Browse files
Options
Downloads
Patches
Plain Diff
Adds comments, braces.
parent
1aeb9af9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/jitsi/impl/neomedia/jmfext/media/protocol/quicktime/QuickTimeStream.java
+35
-28
35 additions, 28 deletions
...edia/jmfext/media/protocol/quicktime/QuickTimeStream.java
with
35 additions
and
28 deletions
src/org/jitsi/impl/neomedia/jmfext/media/protocol/quicktime/QuickTimeStream.java
+
35
−
28
View file @
7961f114
...
@@ -157,9 +157,9 @@ public void outputVideoFrameWithSampleBuffer(
...
@@ -157,9 +157,9 @@ public void outputVideoFrameWithSampleBuffer(
QTSampleBuffer
sampleBuffer
)
QTSampleBuffer
sampleBuffer
)
{
{
captureOutputDidOutputVideoFrameWithSampleBuffer
(
captureOutputDidOutputVideoFrameWithSampleBuffer
(
captureOutput
,
captureOutput
,
videoFrame
,
videoFrame
,
sampleBuffer
);
sampleBuffer
);
}
}
});
});
...
@@ -314,13 +314,13 @@ protected Format doGetFormat()
...
@@ -314,13 +314,13 @@ protected Format doGetFormat()
format
format
=
videoFormat
.
intersects
(
=
videoFormat
.
intersects
(
new
VideoFormat
(
new
VideoFormat
(
null
,
/* encoding */
null
,
new
Dimension
(
new
Dimension
(
defaultSize
.
width
,
defaultSize
.
width
,
defaultSize
.
height
),
defaultSize
.
height
),
Format
.
NOT_SPECIFIED
,
/* maxDataLength */
Format
.
NOT_SPECIFIED
,
Format
.
byteArray
,
/* dataType */
null
,
Format
.
NOT_SPECIFIED
));
/* frameRate */
Format
.
NOT_SPECIFIED
));
}
}
}
}
}
}
...
@@ -361,34 +361,40 @@ private Format getCaptureOutputFormat()
...
@@ -361,34 +361,40 @@ private Format getCaptureOutputFormat()
{
{
case
CVPixelFormatType
.
kCVPixelFormatType_32ARGB
:
case
CVPixelFormatType
.
kCVPixelFormatType_32ARGB
:
if
(
captureOutputFormat
instanceof
AVFrameFormat
)
if
(
captureOutputFormat
instanceof
AVFrameFormat
)
{
return
return
new
AVFrameFormat
(
new
AVFrameFormat
(
((
width
==
0
)
&&
(
height
==
0
)
((
width
==
0
)
&&
(
height
==
0
)
?
null
?
null
:
new
Dimension
(
width
,
height
)),
:
new
Dimension
(
width
,
height
)),
Format
.
NOT_SPECIFIED
,
/* frameRate */
Format
.
NOT_SPECIFIED
,
FFmpeg
.
PIX_FMT_ARGB
,
FFmpeg
.
PIX_FMT_ARGB
,
CVPixelFormatType
.
kCVPixelFormatType_32ARGB
);
CVPixelFormatType
.
kCVPixelFormatType_32ARGB
);
}
else
else
{
return
return
new
RGBFormat
(
new
RGBFormat
(
((
width
==
0
)
&&
(
height
==
0
)
((
width
==
0
)
&&
(
height
==
0
)
?
null
?
null
:
new
Dimension
(
width
,
height
)),
:
new
Dimension
(
width
,
height
)),
Format
.
NOT_SPECIFIED
,
/* maxDataLength */
Format
.
NOT_SPECIFIED
,
Format
.
byteArray
,
Format
.
byteArray
,
Format
.
NOT_SPECIFIED
,
/* frameRate */
Format
.
NOT_SPECIFIED
,
32
,
32
,
2
,
3
,
4
);
2
,
3
,
4
);
}
case
CVPixelFormatType
.
kCVPixelFormatType_420YpCbCr8Planar
:
case
CVPixelFormatType
.
kCVPixelFormatType_420YpCbCr8Planar
:
if
((
width
==
0
)
&&
(
height
==
0
))
if
((
width
==
0
)
&&
(
height
==
0
))
{
{
if
(
captureOutputFormat
instanceof
AVFrameFormat
)
if
(
captureOutputFormat
instanceof
AVFrameFormat
)
{
return
return
new
AVFrameFormat
(
new
AVFrameFormat
(
FFmpeg
.
PIX_FMT_YUV420P
,
FFmpeg
.
PIX_FMT_YUV420P
,
CVPixelFormatType
CVPixelFormatType
.
kCVPixelFormatType_420YpCbCr8Planar
);
.
kCVPixelFormatType_420YpCbCr8Planar
);
}
else
else
return
new
YUVFormat
(
YUVFormat
.
YUV_420
);
return
new
YUVFormat
(
YUVFormat
.
YUV_420
);
}
}
...
@@ -397,10 +403,10 @@ else if (captureOutputFormat instanceof AVFrameFormat)
...
@@ -397,10 +403,10 @@ else if (captureOutputFormat instanceof AVFrameFormat)
return
return
new
AVFrameFormat
(
new
AVFrameFormat
(
new
Dimension
(
width
,
height
),
new
Dimension
(
width
,
height
),
Format
.
NOT_SPECIFIED
,
/* frameRate */
Format
.
NOT_SPECIFIED
,
FFmpeg
.
PIX_FMT_YUV420P
,
FFmpeg
.
PIX_FMT_YUV420P
,
CVPixelFormatType
.
CVPixelFormatType
kCVPixelFormatType_420YpCbCr8Planar
);
.
kCVPixelFormatType_420YpCbCr8Planar
);
}
}
else
else
{
{
...
@@ -413,9 +419,9 @@ else if (captureOutputFormat instanceof AVFrameFormat)
...
@@ -413,9 +419,9 @@ else if (captureOutputFormat instanceof AVFrameFormat)
return
return
new
YUVFormat
(
new
YUVFormat
(
new
Dimension
(
width
,
height
),
new
Dimension
(
width
,
height
),
Format
.
NOT_SPECIFIED
,
/* maxDataLength */
Format
.
NOT_SPECIFIED
,
Format
.
byteArray
,
Format
.
byteArray
,
Format
.
NOT_SPECIFIED
,
/* frameRate */
Format
.
NOT_SPECIFIED
,
YUVFormat
.
YUV_420
,
YUVFormat
.
YUV_420
,
strideY
,
strideUV
,
strideY
,
strideUV
,
offsetY
,
offsetU
,
offsetV
);
offsetY
,
offsetU
,
offsetV
);
...
@@ -457,17 +463,18 @@ private Format getVideoFrameFormat(CVPixelBuffer videoFrame)
...
@@ -457,17 +463,18 @@ private Format getVideoFrameFormat(CVPixelBuffer videoFrame)
Dimension
size
=
((
VideoFormat
)
format
).
getSize
();
Dimension
size
=
((
VideoFormat
)
format
).
getSize
();
if
((
size
==
null
)
||
((
size
.
width
==
0
)
&&
(
size
.
height
==
0
)))
if
((
size
==
null
)
||
((
size
.
width
==
0
)
&&
(
size
.
height
==
0
)))
{
format
format
=
format
=
format
.
intersects
(
.
intersects
(
new
VideoFormat
(
new
VideoFormat
(
null
,
/* encoding */
null
,
new
Dimension
(
new
Dimension
(
videoFrame
.
getWidth
(),
videoFrame
.
getWidth
(),
videoFrame
.
getHeight
()),
videoFrame
.
getHeight
()),
Format
.
NOT_SPECIFIED
,
/* maxDataLength */
Format
.
NOT_SPECIFIED
,
Format
.
byteArray
,
/* dataType */
null
,
Format
.
NOT_SPECIFIED
));
/* frameRate */
Format
.
NOT_SPECIFIED
));
}
return
format
;
return
format
;
}
}
...
@@ -494,17 +501,17 @@ public void read(Buffer buffer)
...
@@ -494,17 +501,17 @@ public void read(Buffer buffer)
if
(
dataFormat
!=
null
)
if
(
dataFormat
!=
null
)
buffer
.
setFormat
(
dataFormat
);
buffer
.
setFormat
(
dataFormat
);
Format
bufferF
ormat
=
buffer
.
getFormat
();
Format
f
ormat
=
buffer
.
getFormat
();
if
(
bufferF
ormat
==
null
)
if
(
f
ormat
==
null
)
{
{
bufferF
ormat
=
getFormat
();
f
ormat
=
getFormat
();
if
(
bufferF
ormat
!=
null
)
if
(
f
ormat
!=
null
)
buffer
.
setFormat
(
bufferF
ormat
);
buffer
.
setFormat
(
f
ormat
);
}
}
if
(
bufferF
ormat
instanceof
AVFrameFormat
)
if
(
f
ormat
instanceof
AVFrameFormat
)
{
{
if
(
AVFrame
.
read
(
buffer
,
bufferF
ormat
,
data
)
<
0
)
if
(
AVFrame
.
read
(
buffer
,
f
ormat
,
data
)
<
0
)
data
.
free
();
data
.
free
();
/*
/*
* XXX For the sake of safety, make sure that this instance does
* XXX For the sake of safety, make sure that this instance does
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment