Changeset 9c4f520e6526f194e27b9d293132a492de05dde8
- Timestamp:
- 10/21/07 17:42:29
(11 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1192981349 +0000
- git-parent:
[734f58f588595ee512f37ce0b29aa2ed5633a597]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1192981349 +0000
- Message:
"Advanced" playlist add
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r77aa5b9 |
r9c4f520 |
|
| 2 | 2 | CSFLAGS = |
|---|
| 3 | 3 | |
|---|
| 4 | | TARGETS = VideoLAN.VLC.Control.dll testvlc.exe |
|---|
| | 4 | TARGETS = VideoLAN.LibVLC.dll testvlc.exe |
|---|
| 5 | 5 | |
|---|
| 6 | 6 | all: $(TARGETS) |
|---|
| 7 | 7 | |
|---|
| 8 | 8 | clean: |
|---|
| 9 | | rm -f -- $(TARGETS) *.netmodule *~ |
|---|
| | 9 | rm -f -- *.netmodule *.dll *.exe *~ |
|---|
| 10 | 10 | |
|---|
| 11 | | VideoLAN.VLC.Control.dll: marshal.cs ustring.cs exception.cs libvlc.cs |
|---|
| 12 | | testvlc.exe: testvlc.cs VideoLAN.VLC.Control.dll |
|---|
| | 11 | VideoLAN.LibVLC.dll: marshal.cs ustring.cs exception.cs libvlc.cs |
|---|
| | 12 | testvlc.exe: testvlc.cs VideoLAN.LibVLC.dll |
|---|
| 13 | 13 | |
|---|
| 14 | 14 | %.netmodule: %.cs Makefile |
|---|
| r54f91fa |
r9c4f520 |
|
| 85 | 85 | |
|---|
| 86 | 86 | [DllImport ("libvlc-control.dll", EntryPoint="libvlc_playlist_loop")] |
|---|
| 87 | | static extern void PlaylistLoop (InstanceHandle self, int b, |
|---|
| | 87 | static extern void PlaylistLoop (InstanceHandle self, bool b, |
|---|
| 88 | 88 | NativeException ex); |
|---|
| 89 | 89 | /** Sets the playlist loop flag */ |
|---|
| … | … | |
| 92 | 92 | set |
|---|
| 93 | 93 | { |
|---|
| 94 | | PlaylistLoop (self, value ? 1 : 0, ex); |
|---|
| | 94 | PlaylistLoop (self, value, ex); |
|---|
| 95 | 95 | ex.Raise (); |
|---|
| 96 | 96 | } |
|---|
| … | … | |
| 172 | 172 | } |
|---|
| 173 | 173 | |
|---|
| 174 | | [DllImport ("libvlc-control.dll", EntryPoint="libvlc_playlist_add")] |
|---|
| | 174 | [DllImport ("libvlc-control.dll", |
|---|
| | 175 | EntryPoint="libvlc_playlist_add_extended")] |
|---|
| 175 | 176 | static extern void PlaylistAdd (InstanceHandle self, U8String uri, |
|---|
| 176 | | U8String name, NativeException e); |
|---|
| 177 | | /** Appends an item to the playlist */ |
|---|
| 178 | | public void Add (string mrl) |
|---|
| 179 | | { |
|---|
| 180 | | Add (mrl, null); |
|---|
| 181 | | } |
|---|
| 182 | | /** Appends an item to the playlist */ |
|---|
| 183 | | public void Add (string mrl, string name) |
|---|
| | 177 | U8String name, int optc, |
|---|
| | 178 | U8String[] optv, NativeException e); |
|---|
| | 179 | /** Appends an item to the playlist with options */ |
|---|
| | 180 | public void Add (string mrl, string name, string[] opts) |
|---|
| 184 | 181 | { |
|---|
| 185 | 182 | U8String umrl = new U8String (mrl); |
|---|
| 186 | 183 | U8String uname = new U8String (name); |
|---|
| 187 | | |
|---|
| 188 | | PlaylistAdd (self, umrl, uname, ex); |
|---|
| 189 | | ex.Raise (); |
|---|
| | 184 | U8String[] optv = new U8String[opts.Length]; |
|---|
| | 185 | for (int i = 0; i < opts.Length; i++) |
|---|
| | 186 | optv[i] = new U8String (opts[i]); |
|---|
| | 187 | |
|---|
| | 188 | PlaylistAdd (self, umrl, uname, optv.Length, optv, ex); |
|---|
| | 189 | ex.Raise (); |
|---|
| | 190 | } |
|---|
| | 191 | public void Add (string mrl, string[] opts) |
|---|
| | 192 | { |
|---|
| | 193 | Add (mrl, null, opts); |
|---|
| | 194 | } |
|---|
| | 195 | public void Add (string mrl, string name) |
|---|
| | 196 | { |
|---|
| | 197 | Add (mrl, name, new string[0]); |
|---|
| | 198 | } |
|---|
| | 199 | public void Add (string mrl) |
|---|
| | 200 | { |
|---|
| | 201 | Add (mrl, null, new string[0]); |
|---|
| 190 | 202 | } |
|---|
| 191 | 203 | }; |
|---|