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
7fef8b87
Commit
7fef8b87
authored
Sep 17, 2006
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* updated all files to yield the playlist instead of finding it
parent
c77d5dcd
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
199 additions
and
371 deletions
+199
-371
modules/gui/macosx/controls.m
modules/gui/macosx/controls.m
+23
-46
modules/gui/macosx/embeddedwindow.m
modules/gui/macosx/embeddedwindow.m
+1
-6
modules/gui/macosx/extended.m
modules/gui/macosx/extended.m
+2
-4
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+46
-64
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+74
-179
modules/gui/macosx/playlistinfo.m
modules/gui/macosx/playlistinfo.m
+11
-25
modules/gui/macosx/wizard.m
modules/gui/macosx/wizard.m
+42
-47
No files found.
modules/gui/macosx/controls.m
View file @
7fef8b87
...
...
@@ -63,24 +63,21 @@
{
vlc_value_t
val
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
if
(
p_playlist
->
i_size
<=
0
)
{
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
[
o_main
intfOpenFileGeneric
:
(
id
)
sender
];
}
else
{
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
}
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
if
(
p_playlist
->
i_size
<=
0
)
{
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
[
o_main
intfOpenFileGeneric
:
(
id
)
sender
];
}
else
{
vlc_mutex_unlock
(
&
p_playlist
->
object_lock
);
vlc_object_release
(
p_playlist
);
}
val
.
i_int
=
config_GetInt
(
p_intf
,
"key-play-pause"
);
var_Set
(
p_intf
->
p_libvlc
,
"key-pressed"
,
val
);
}
...
...
@@ -155,12 +152,7 @@
{
vlc_value_t
val
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
var_Get
(
p_playlist
,
"random"
,
&
val
);
val
.
b_bool
=
!
val
.
b_bool
;
...
...
@@ -185,12 +177,7 @@
{
vlc_value_t
val
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
var_Get
(
p_playlist
,
"repeat"
,
&
val
);
if
(
!
val
.
b_bool
)
...
...
@@ -219,12 +206,7 @@
{
vlc_value_t
val
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
;
}
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
var_Get
(
p_playlist
,
"loop"
,
&
val
);
if
(
!
val
.
b_bool
)
...
...
@@ -345,17 +327,17 @@
}
else
{
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
VLCIntf
);
if
(
p_playlist
&&
(
[
o_title
isEqualToString
:
_NS
(
"Fullscreen"
)]
||
[
sender
isKindOfClass
:[
NSButton
class
]]
)
)
if
(
[
o_title
isEqualToString
:
_NS
(
"Fullscreen"
)]
||
[
sender
isKindOfClass
:[
NSButton
class
]]
)
{
vlc_value_t
val
;
var_Get
(
p_playlist
,
"fullscreen"
,
&
val
);
var_Set
(
p_playlist
,
"fullscreen"
,
(
vlc_value_t
)
!
val
.
b_bool
);
}
if
(
p_playlist
)
vlc_object_release
(
(
vlc_object_t
*
)
p_playlist
);
vlc_object_release
(
p_playlist
);
}
}
...
...
@@ -697,14 +679,9 @@
BOOL
bEnabled
=
TRUE
;
vlc_value_t
val
;
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
if
(
p_playlist
!=
NULL
)
{
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
}
else
return
FALSE
;
vlc_mutex_lock
(
&
p_playlist
->
object_lock
);
#define p_input p_playlist->p_input
...
...
modules/gui/macosx/embeddedwindow.m
View file @
7fef8b87
...
...
@@ -87,12 +87,7 @@
-
(
BOOL
)
windowShouldClose
:(
id
)
sender
{
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
==
NULL
)
{
return
NO
;
}
playlist_t
*
p_playlist
=
pl_Yield
(
VLCIntf
);
playlist_Stop
(
p_playlist
);
vlc_object_release
(
p_playlist
);
...
...
modules/gui/macosx/extended.m
View file @
7fef8b87
...
...
@@ -369,8 +369,7 @@ static VLCExtended *_o_sharedInstance = nil;
id
o_window
=
[
NSApp
keyWindow
];
NSArray
*
o_windows
=
[
NSApp
orderedWindows
];
NSEnumerator
*
o_enumerator
=
[
o_windows
objectEnumerator
];
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
VLCIntf
);
vout_thread_t
*
p_vout
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_VOUT
,
FIND_ANYWHERE
);
vout_thread_t
*
p_real_vout
;
...
...
@@ -848,8 +847,7 @@ static VLCExtended *_o_sharedInstance = nil;
{
/* save the preferences to make sure that our module-changes will up on
* next launch again */
playlist_t
*
p_playlist
=
vlc_object_find
(
VLCIntf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
VLCIntf
);
int
returnedValue
;
NSArray
*
theModules
;
theModules
=
[[
NSArray
alloc
]
initWithObjects
:
@"main"
,
@"headphone"
,
...
...
modules/gui/macosx/intf.m
View file @
7fef8b87
This diff is collapsed.
Click to expand it.
modules/gui/macosx/playlist.m
View file @
7fef8b87
This diff is collapsed.
Click to expand it.
modules/gui/macosx/playlistinfo.m
View file @
7fef8b87
...
...
@@ -135,15 +135,11 @@
else
{
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
{
p_item
=
p_playlist
->
status
.
p_item
;
vlc_object_release
(
p_playlist
);
}
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
p_item
=
p_playlist
->
status
.
p_item
;
vlc_object_release
(
p_playlist
);
[
self
initPanel
:
sender
];
}
}
...
...
@@ -173,14 +169,10 @@
{
/* make sure that we got the current item and not an outdated one */
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
if
(
p_playlist
)
{
p_item
=
p_playlist
->
status
.
p_item
;
vlc_object_release
(
p_playlist
);
}
p_item
=
p_playlist
->
status
.
p_item
;
vlc_object_release
(
p_playlist
);
/* check whether our item is valid, because we would crash if not */
if
(
!
[
self
isItemInPlaylist
:
p_item
]
)
return
;
...
...
@@ -287,8 +279,7 @@
-
(
IBAction
)
infoOk
:(
id
)
sender
{
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
vlc_value_t
val
;
if
(
[
self
isItemInPlaylist
:
p_item
]
)
...
...
@@ -316,15 +307,9 @@
-
(
BOOL
)
isItemInPlaylist
:(
playlist_item_t
*
)
p_local_item
{
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
int
i
;
if
(
p_playlist
==
NULL
)
{
return
NO
;
}
for
(
i
=
0
;
i
<
p_playlist
->
i_all_size
;
i
++
)
{
if
(
p_playlist
->
pp_all_items
[
i
]
==
p_local_item
)
...
...
@@ -430,7 +415,8 @@ static VLCInfoTreeItem *o_root_item = nil;
}
+
(
VLCInfoTreeItem
*
)
rootItem
{
if
(
o_root_item
==
nil
)
o_root_item
=
[[
VLCInfoTreeItem
alloc
]
initWithName
:
@"main"
value
:
@""
ID
:
0
parent
:
nil
];
if
(
o_root_item
==
nil
)
o_root_item
=
[[
VLCInfoTreeItem
alloc
]
initWithName
:
@"main"
value
:
@""
ID
:
0
parent
:
nil
];
return
o_root_item
;
}
...
...
modules/gui/macosx/wizard.m
View file @
7fef8b87
...
...
@@ -1277,63 +1277,58 @@ static VLCWizard *_o_sharedInstance = nil;
{
intf_thread_t
*
p_intf
=
VLCIntf
;
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
if
(
p_playlist
)
playlist_t
*
p_playlist
=
pl_Yield
(
p_intf
);
int
x
=
0
;
int
y
=
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
count
];
while
(
x
!=
y
)
{
int
x
=
0
;
int
y
=
[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
count
];
while
(
x
!=
y
)
/* we need a temp. variable here to work-around a GCC4-bug */
NSString
*
tempString
=
[
NSString
stringWithFormat
:
\
@"%@ (%i/%i)"
,
_NS
(
"Streaming/Transcoding Wizard"
),
\
(
x
+
1
),
y
];
input_item_t
*
p_input
=
input_ItemNew
(
p_playlist
,
\
[[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
\
objectAtIndex
:
x
]
UTF8String
],
\
[
tempString
UTF8String
]
);
vlc_input_item_AddOption
(
p_input
,
[[[
o_userSelections
\
objectForKey
:
@"opts"
]
objectAtIndex
:
x
]
UTF8String
]);
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractFrom"
]
\
isEqualToString
:
@""
]
)
{
/* we need a temp. variable here to work-around a GCC4-bug */
NSString
*
tempString
=
[
NSString
stringWithFormat
:
\
@"%@ (%i/%i)"
,
_NS
(
"Streaming/Transcoding Wizard"
),
\
(
x
+
1
),
y
];
input_item_t
*
p_input
=
input_ItemNew
(
p_playlist
,
\
[[[
o_userSelections
objectForKey
:
@"pathToStrm"
]
\
objectAtIndex
:
x
]
UTF8String
],
\
[
tempString
UTF8String
]
);
vlc_input_item_AddOption
(
p_input
,
[[[
o_userSelections
\
objectForKey
:
@"opts"
]
objectAtIndex
:
x
]
UTF8String
]);
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractFrom"
]
\
isEqualToString
:
@""
]
)
{
vlc_input_item_AddOption
(
p_input
,
[[
NSString
\
stringWithFormat
:
@"start-time=%@"
,
[
o_userSelections
\
objectForKey
:
@"partExtractFrom"
]]
UTF8String
]
);
}
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractTo"
]
\
isEqualToString
:
@""
]
)
{
vlc_input_item_AddOption
(
p_input
,
[[
NSString
\
stringWithFormat
:
@"stop-time=%@"
,
[
o_userSelections
\
objectForKey
:
@"partExtractTo"
]]
UTF8String
]
);
}
vlc_input_item_AddOption
(
p_input
,
[[
NSString
\
stringWithFormat
:
@"start-time=%@"
,
[
o_userSelections
\
objectForKey
:
@"partExtractFrom"
]]
UTF8String
]
);
}
vlc_input_item_AddOption
(
p_input
,
[[
NSString
stringWithFormat
:
\
@"ttl=%@"
,
[
o_userSelections
objectForKey
:
@"ttl"
]]
\
UTF8String
]
);
if
(
!
[[
o_userSelections
objectForKey
:
@"partExtractTo"
]
\
isEqualToString
:
@""
]
)
{
vlc_input_item_AddOption
(
p_input
,
[[
NSString
\
stringWithFormat
:
@"stop-time=%@"
,
[
o_userSelections
\
objectForKey
:
@"partExtractTo"
]]
UTF8String
]
);
}
playlist_PlaylistAddInput
(
p_playlist
,
p_input
,
PLAYLIST_STOP
,
PLAYLIST_END
);
vlc_input_item_AddOption
(
p_input
,
[[
NSString
stringWithFormat
:
\
@"ttl=%@"
,
[
o_userSelections
objectForKey
:
@"ttl"
]]
\
UTF8String
]
);
if
(
x
==
0
)
{
/* play the first item and add the others afterwards */
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
NULL
,
p_item
);
}
playlist_PlaylistAddInput
(
p_playlist
,
p_input
,
PLAYLIST_STOP
,
PLAYLIST_END
);
x
+=
1
;
if
(
x
==
0
)
{
/* play the first item and add the others afterwards */
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
NULL
,
p_item
);
}
vlc_object_release
(
p_playlist
);
}
else
{
msg_Err
(
p_intf
,
"unable to find playlist"
);
x
+=
1
;
}
vlc_object_release
(
p_playlist
);
/* close the window, since we are done */
[
o_wizard_window
close
];
}
...
...
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