Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • videolan/vlc
  • chouquette/vlc
  • bakiewicz.marek122/vlc
  • devnexen/vlc
  • rohanrajpal/vlc
  • blurrrb/vlc
  • gsoc/gsoc2019/darkapex/vlc
  • b1ue/vlc
  • fkuehne/vlc
  • magsoft/vlc
  • chub/vlc
  • cramiro9/vlc
  • robUx4/vlc
  • rom1v/vlc
  • akshayaky/vlc
  • tmk907/vlc
  • akymaster/vlc
  • govind.sharma/vlc
  • psilokos/vlc
  • xjbeta/vlc
  • jahan/vlc
  • 1480c1/vlc
  • amanchande/vlc
  • aaqib/vlc
  • rist/vlc
  • apol/vlc
  • mindfreeze/vlc
  • alexandre-janniaux/vlc
  • sandsmark/vlc
  • jagannatharjun/vlc
  • gsoc/gsoc2020/matiaslgonzalez/vlc
  • gsoc/gsoc2020/jagannatharjun/vlc
  • mstorsjo/vlc
  • gsoc/gsoc2020/vedenta/vlc
  • gsoc/gsoc2020/arnav-ishaan/vlc
  • gsoc/gsoc2020/andreduong/vlc
  • fuzun/vlc
  • gsoc/gsoc2020/vatsin/vlc
  • gsoc/gsoc2020/sagid/vlc
  • yaron/vlc
  • Phoenix/vlc
  • Garf/vlc
  • ePiratWorkarounds/vlc
  • tguillem/vlc
  • jnqnfe/vlc
  • mdc/vlc
  • Vedaa/vlc
  • rasa/vlc
  • quink/vlc
  • yealo/vlc
  • aleksey_ak/vlc
  • ePirat/vlc
  • ilya.yanok/vlc
  • asenat/vlc
  • m/vlc
  • bunjee/vlc
  • BLumia/vlc
  • sagudev/vlc
  • hamedmonji30/vlc
  • nullgemm/vlc
  • DivyamAhuja/vlc
  • thesamesam/vlc
  • dag7/vlc
  • snehil101/vlc
  • haasn/vlc
  • jbk/vlc
  • ValZapod/vlc
  • mfkl/vlc
  • WangChuan/vlc
  • core1024/vlc
  • GhostVaibhav/vlc
  • dfuhrmann/vlc
  • davide.prade/vlc
  • tmatth/vlc
  • Courmisch/vlc
  • zouya/vlc
  • hpi/vlc
  • EwoutH/vlc
  • aleung27/vlc
  • hengwu0/vlc
  • saladin/vlc
  • ashuio/vlc
  • richselwood/vlc
  • verma16Ayush/vlc
  • chemicalflash/vlc
  • PoignardAzur/vlc
  • huangjieNT/vlc
  • Blake-Haydon/vlc
  • AnuthaDev/vlc
  • gsoc/gsoc2021/mpd/vlc
  • nicolas_lequec/vlc
  • sambassaly/vlc
  • thresh/vlc
  • bonniegong/vlc
  • myaashish/vlc
  • stavros.vagionitis/vlc
  • ileoo/vlc
  • louis-santucci/vlc
  • cchristiansen/vlc
  • sabyasachi07/vlc
  • AbduAmeen/vlc
  • ashishb0410/vlc
  • urbanhusky/vlc
  • davidepietrasanta/vlc
  • riksleutelstad/vlc
  • jeremyVignelles/vlc
  • komh/vlc
  • iamjithinjohn/vlc
  • JohannesKauffmann/vlc2
  • kunglao/vlc
  • natzberg/vlc
  • jill/vlc
  • cwendling/vlc
  • adufou/vlc
  • ErwanAirone/vlc
  • HasinduDilshan10/vlc
  • vagrantc/vlc
  • rafiv/macos-bigsur-icon
  • Aymeriic/vlc
  • saranshg20/vlc
  • metzlove24/vlc
  • linkfanel/vlc
  • Ds886/vlc
  • metehan-arslan/vlc
  • Skantes/vlc
  • kgsandundananjaya96/vlc
  • mitchcapper/vlc
  • advaitgupta/vlc
  • StefanBruens/vlc
  • ratajs/vlc
  • T.M.F.B.3761/vlc
  • m222059/vlc
  • casemerrick/vlc
  • joshuaword2alt/vlc
  • sjwaddy/vlc
  • dima/vlc
  • Ybalrid/vlc
  • umxprime/vlc
  • eschmidt/vlc
  • vannieuwenhuysenmichelle/vlc
  • badcf00d/vlc
  • wesinator/vlc
  • louis/vlc
  • xqq/vlc
  • EmperorYP7/vlc
  • NicoLiam/vlc
  • loveleen/vlc
  • rofferom/vlc
  • rbultje/vlc
  • TheUnamed/vlc
  • pratiksharma341/vlc
  • Saurab17/vlc
  • purist.coder/vlc
  • Shuicheng/vlc
  • mdrrubel292/vlc
  • silverbleu00/vlc
  • metif12/vlc
  • asher-m/vlc
  • jeffk/vlc
  • Brandonbr1/vlc
  • beautyyuyanli/vlc
  • rego21/vlc
  • muyangren907/vlc
  • collectionbylawrencejason/vlc
  • evelez/vlc
  • GSMgeeth/vlc
  • Oneric/vlc
  • TJ5/vlc
  • XuanTung95/vlc
  • darrenjenny21/vlc
  • Trenly/vlc
  • RockyTDR/vlc
  • mjakubowski/vlc
  • caprica/vlc
  • ForteFrankie/vlc
  • seannamiller19/vlc
  • junlon2006/vlc
  • kiwiren6666/vlc
  • iuseiphonexs/vlc
  • fenngtun/vlc
  • Rajdutt999/vlc
  • typx/vlc
  • leon.vitanos/vlc
  • robertogarci0938/vlc
  • gsoc/gsoc2022/luc65r/vlc-mpd
  • skeller/vlc
  • MCJack123/vlc
  • luc65r/vlc-mpd
  • popov895/vlc
  • claucambra/vlc
  • brad/vlc
  • matthewmurua88/vlc
  • Tomas8874/vlc
  • philenotfound/vlc
  • makita-do3/vlc
  • LZXCorp/vlc
  • mar0x/vlc
  • senojetkennedy0102/vlc
  • shaneb243/vlc
  • ahmadbader/vlc
  • rajduttcse26/vlc-audio-filters
  • Juniorzito8415/vlc
  • achernyakov/vlc
  • lucasjetgroup/vlc
  • pupdoggy666/vlc
  • gmde9363/vlc
  • alexnwayne/vlc
  • bahareebrahimi781/vlc
  • hamad633666/vlc
  • umghof3112/vlc
  • joe0199771874/vlc
  • Octocats66666666/vlc
  • jjm_223/vlc
  • btech10110.19/vlc
  • sunnykfc028/vlc-audio-filters
  • loic/vlc
  • nguyenminhducmx1/vlc
  • JanekKrueger/vlc
  • bstubbington2/vlc
  • rcombs/vlc
  • Ordissimo/vlc
  • king7532/vlc
  • noobsauce101/vlc
  • schong0525/vlc
  • myQwil/vlc
  • apisbg91/vlc
  • geeboy0101017/vlc
  • kim.faughey/vlc
  • nurupo/vlc
  • yyusea/vlc
  • 0711235879.khco/vlc
  • ialo/vlc
  • iloveyeye2/vlc
  • gdtdftdqtd/vlc
  • leandroconsiglio/vlc
  • AndyHTML2012/vlc
  • ncz/vlc
  • lucenticus/vlc
  • knr1931/vlc
  • kjoonlee/vlc
  • chandrakant100/vlc-qt
  • johge42/vlc
  • polter/vlc
  • hexchain/vlc
  • Tushwrld/vlc
  • mztea928/vlc
  • jbelloncastro/vlc
  • alvinhochun/vlc
  • ghostpiratecrow/vlc
  • ujjwaltwitx/vlc
  • alexsonarin06/vlc
  • adrianbon76/vlc
  • altsod/vlc
  • damien.lucas44/vlc
  • dmytrivtaisa/vlc
  • utk202/vlc
  • aaxhrj/vlc
  • thomas.hermes/vlc
  • structurenewworldorder/vlc
  • slomo/vlc
  • wantlamy/vlc
  • musc.o3cminc/vlc
  • thebarshablog/vlc
  • kerrick/vlc
  • kratos142518/vlc
  • leogps/vlc
  • vacantron/vlc
  • luna_koly/vlc
  • Ratio2/vlc
  • anuoshemohammad/vlc
  • apsun/vlc
  • aaa1115910/vlc
  • alimotmoyo/vlc
  • Ambossmann/vlc
  • Sam-LearnsToCode/vlc
  • Chilledheart/vlc
  • Labnann/vlc
  • ktcoooot1/vlc
  • mohit-marathe/vlc
  • johnddx/vlc
  • manstabuk/vlc
  • Omar-ahmed314/vlc
  • vineethkm/vlc
  • 9Enemi86/vlc
  • radoslav.m.panteleev/vlc
  • ashishami2002/vlc
  • Corbax/vlc
  • firnasahmed/vlc
  • pelayarmalam4/vlc
  • c0ff330k/vlc
  • shikhindahikar/vlc
  • l342723951/vlc
  • christianschwandner/vlc
  • douniwan5788/vlc
  • 7damian7/vlc
  • ferdnyc/vlc
  • f.ales1/vlc
  • pandagby/vlc
  • BaaBaa/vlc
  • jewe37/vlc
  • w00drow/vlc
  • russelltg/vlc
  • ironicallygod/vlc
  • soumyaDghosh/vlc
  • linzihao1999/vlc
  • deyayush6/vlc
  • mibi88/vlc
  • newabdallah10/vlc
  • jhorbincolombia/vlc
  • rimvihaqueshupto/vlc
  • andrewkhon98/vlc
  • fab78/vlc
  • lapaz17/vlc
  • amanna13/vlc
  • mdakram28/vlc
  • 07jw1980/vlc
  • sohamgupta/vlc
  • Eson-Jia1/vlc
  • Sumou/vlc
  • vikram-kangotra/vlc
  • chalice191/vlc
  • olivercalder/vlc
  • aaasg4001/vlc
  • zipdox/vlc
  • kwizart/vlc
  • Dragon-S/vlc
  • jdemeule/vlc
  • gabriel_lt/vlc
  • locutusofborg/vlc
  • sammirata/vlc-librist
  • another/vlc
  • Benjamin_Loison/vlc
  • ahmedmoselhi/vlc
  • petergaal/vlc
  • huynhsontung/vlc
  • dariusmihut/vlc
  • tvermaashutosh/vlc
  • buti/vlc
  • Niram7777/vlc
  • rohan-here/vlc
  • balaji-sivasakthi/vlc
  • rlindner81/vlc
  • Kakadus/vlc
  • djain/vlc
  • ABBurmeister/vlc
  • craighuggins/vlc
  • orbea/vlc
  • maxos/vlc
  • aakarshmj/vlc
  • kblaschke/vlc
  • ankitm/vlc
  • advait-0/vlc
  • mohak2003/vlc
  • yselkowitz/vlc
  • AZM999/vlc-azm
  • andrey.turkin/vlc
  • Disha-Baghel/vlc
  • nowrep/vlc
  • Apeng/vlc
  • Choucroute_melba/vlc
  • autra/vlc
  • eclipseo/vlc
  • fhuber/vlc
  • olafhering/vlc
  • sdasda7777/vlc
  • 1div0/vlc
  • skosnits/vlc-extended-playlist-support
  • dnicolson/vlc
  • Timshel/vlc
  • octopols/vlc
  • MangalK/vlc
  • nima64/vlc
  • misawai/vlc
  • Alexander-Wilms/vlc
  • Maxime2/vlc-fork-for-visualizer
  • ww/vlc
  • jeske/vlc
  • sgross-emlix/vlc
  • morenonatural/vlc
  • freakingLovesVLC/vlc
  • borisgolovnev/vlc
  • mpromonet/vlc
  • diogo.simao-marques/vlc
  • masstock/vlc
  • pratikpatel8982/vlc
  • hugok79/vlc
  • longervision/vlc
  • abhiudaysurya/vlc
  • rishabhgarg/vlc
  • tumic/vlc
  • cart/vlc
  • shubham442/vlc
  • Aditya692005/vlc
  • sammirata/vlc4
  • syrykh/vlc
  • Vvorcun/macos-new-icon
  • AyaanshC/vlc
  • nasso/vlc
  • Quark/vlc
  • sebastinas/vlc
  • rhstone/vlc
  • talregev/vlc
  • Managor/vlc
403 results
Show changes
Commits on Source (19)
Showing
with 504 additions and 25 deletions
......@@ -142,6 +142,8 @@
53C1EF8B2B466B13001AEEF5 /* VLCLibraryHomeViewVideoGridContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C1EF852B466B13001AEEF5 /* VLCLibraryHomeViewVideoGridContainerView.m */; };
53C1EF8C2B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 53C1EF862B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.m */; };
53CBE30B2C159A4D006BF2E3 /* VLCNoResultsLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 53CBE30A2C159A4D006BF2E3 /* VLCNoResultsLabel.m */; };
53D021352CC225C6003C008F /* VLCLibraryWindowTitlesSidebarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D021332CC225C6003C008F /* VLCLibraryWindowTitlesSidebarViewController.m */; };
53D0213D2CC25520003C008F /* VLCPlayerTitle.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D0213C2CC25520003C008F /* VLCPlayerTitle.m */; };
53D21A1F2BB465600085C71B /* VLCLibraryWindowPlaylistSidebarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D21A1E2BB465600085C71B /* VLCLibraryWindowPlaylistSidebarViewController.m */; };
53D8ED9A2B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53D8ED992B583AAF00142EAD /* VLCLibraryModelChangeDelegate.m */; };
53ED472329C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 53ED472229C74D1F00795DB1 /* VLCLibraryAudioTableViewDelegate.m */; };
......@@ -438,6 +440,11 @@
53C1EF8A2B466B13001AEEF5 /* VLCLibraryHomeViewStackViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCLibraryHomeViewStackViewController.h; sourceTree = "<group>"; };
53CBE3092C159A4D006BF2E3 /* VLCNoResultsLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCNoResultsLabel.h; sourceTree = "<group>"; };
53CBE30A2C159A4D006BF2E3 /* VLCNoResultsLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCNoResultsLabel.m; sourceTree = "<group>"; };
53D021322CC225C6003C008F /* VLCLibraryWindowTitlesSidebarViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryWindowTitlesSidebarViewController.h; sourceTree = "<group>"; };
53D021332CC225C6003C008F /* VLCLibraryWindowTitlesSidebarViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCLibraryWindowTitlesSidebarViewController.m; sourceTree = "<group>"; };
53D021362CC22852003C008F /* VLCLibraryWindowTitlesView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCLibraryWindowTitlesView.xib; sourceTree = "<group>"; };
53D0213B2CC25520003C008F /* VLCPlayerTitle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCPlayerTitle.h; sourceTree = "<group>"; };
53D0213C2CC25520003C008F /* VLCPlayerTitle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VLCPlayerTitle.m; sourceTree = "<group>"; };
53D21A1B2BB428A20085C71B /* VLCLibraryWindowNavigationSidebarView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCLibraryWindowNavigationSidebarView.xib; sourceTree = "<group>"; };
53D21A1C2BB428F00085C71B /* VLCLibraryWindowPlaylistView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VLCLibraryWindowPlaylistView.xib; sourceTree = "<group>"; };
53D21A1D2BB465600085C71B /* VLCLibraryWindowPlaylistSidebarViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VLCLibraryWindowPlaylistSidebarViewController.h; sourceTree = "<group>"; };
......@@ -1410,6 +1417,8 @@
5341F1522C9865DD003BDF0A /* VLCLibraryWindowSidebarRootViewController.m */,
53F0209F2A91115D00E79705 /* VLCLibraryWindowSplitViewController.h */,
53F020A02A91115D00E79705 /* VLCLibraryWindowSplitViewController.m */,
53D021322CC225C6003C008F /* VLCLibraryWindowTitlesSidebarViewController.h */,
53D021332CC225C6003C008F /* VLCLibraryWindowTitlesSidebarViewController.m */,
53F020A22A91D4A100E79705 /* VLCLibraryWindowToolbarDelegate.h */,
53F020A32A91D4A100E79705 /* VLCLibraryWindowToolbarDelegate.m */,
);
......@@ -1425,6 +1434,8 @@
5341F14F2C983AF1003BDF0A /* VLCPlayerChapter.m */,
7DE9C7DB220728420089108F /* VLCPlayerController.h */,
7DE9C7DC220728420089108F /* VLCPlayerController.m */,
53D0213B2CC25520003C008F /* VLCPlayerTitle.h */,
53D0213C2CC25520003C008F /* VLCPlayerTitle.m */,
7D445D7F2202524000263D34 /* VLCPlaylistController.h */,
7D445D802202524000263D34 /* VLCPlaylistController.m */,
7D0F640A2202163E00FDB91F /* VLCPlaylistDataSource.h */,
......@@ -2075,6 +2086,7 @@
6B82241A1E4D2A9000833BE1 /* VLCStatusBarIconMainMenu.xib */,
7D713D332201BB130042BEB7 /* VLCLibraryWindow.xib */,
5341F1472C96E544003BDF0A /* VLCLibraryWindowChaptersView.xib */,
53D021362CC22852003C008F /* VLCLibraryWindowTitlesView.xib */,
53D21A1B2BB428A20085C71B /* VLCLibraryWindowNavigationSidebarView.xib */,
53D21A1C2BB428F00085C71B /* VLCLibraryWindowPlaylistView.xib */,
53A5021D2C9ADFF3000C3CD3 /* VLCLibraryWindowSidebarRootView.xib */,
......@@ -2219,6 +2231,7 @@
1CCC89032078A3D500E5626F /* SimplePreferences.xib in Sources */,
537BD6862C59216600446ED0 /* VLCLibraryGroupsViewController.m in Sources */,
530F32B32C8C757600233C03 /* VLCLibraryAbstractSegmentViewController.m in Sources */,
53D021352CC225C6003C008F /* VLCLibraryWindowTitlesSidebarViewController.m in Sources */,
7DE82E7922843781002D341A /* VLCLibraryAlbumTableCellView.m in Sources */,
7D67318622C8F4060000AD40 /* VLCMediaSourceCollectionViewItem.m in Sources */,
536283F0291146BC00640C15 /* VLCLibraryTableView.m in Sources */,
......@@ -2345,6 +2358,7 @@
53A8F9D12A7E1E6300BC11BF /* VLCLibraryPlaylistViewController.m in Sources */,
1C3113D51E508C6900D4DD76 /* VLCTextfieldPanelController.m in Sources */,
53628403291147C500640C15 /* VLCSubScrollView.m in Sources */,
53D0213D2CC25520003C008F /* VLCPlayerTitle.m in Sources */,
1C3113D71E508C6900D4DD76 /* VLCPopupPanelController.m in Sources */,
5360E9A52C5BE5550046BA8B /* VLCLibraryMasterDetailViewTableViewDelegate.m in Sources */,
7DF0994F23E71E76007CA6EE /* NSMenu+VLCAdditions.m in Sources */,
......
......@@ -185,6 +185,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/library/VLCLibraryWindowSidebarRootViewController.m \
gui/macosx/library/VLCLibraryWindowSplitViewController.h \
gui/macosx/library/VLCLibraryWindowSplitViewController.m \
gui/macosx/library/VLCLibraryWindowTitlesSidebarViewController.h \
gui/macosx/library/VLCLibraryWindowTitlesSidebarViewController.m \
gui/macosx/library/VLCLibraryWindowToolbarDelegate.h \
gui/macosx/library/VLCLibraryWindowToolbarDelegate.m \
gui/macosx/library/groups-library/VLCLibraryGroupsDataSource.h \
......@@ -324,6 +326,8 @@ libmacosx_plugin_la_SOURCES = \
gui/macosx/playlist/VLCPlayerChapter.m \
gui/macosx/playlist/VLCPlayerController.h \
gui/macosx/playlist/VLCPlayerController.m \
gui/macosx/playlist/VLCPlayerTitle.h \
gui/macosx/playlist/VLCPlayerTitle.m \
gui/macosx/playlist/VLCPlaylistController.h \
gui/macosx/playlist/VLCPlaylistController.m \
gui/macosx/playlist/VLCPlaylistDataSource.h \
......@@ -480,6 +484,7 @@ libmacosx_plugin_la_XIB_SOURCES = \
gui/macosx/UI/VLCLibraryWindowNavigationSidebarView.xib \
gui/macosx/UI/VLCLibraryWindowPlaylistView.xib \
gui/macosx/UI/VLCLibraryWindowSidebarRootView.xib \
gui/macosx/UI/VLCLibraryWindowTitlesView.xib \
gui/macosx/UI/VLCLibraryTableCellView.xib \
gui/macosx/UI/VLCPlaylistTableCellView.xib \
gui/macosx/UI/VLCLibraryCarouselViewItemView.xib \
......
......@@ -14,7 +14,7 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView identifier="VLCLibraryWindowPlaylistSidebarIdentifier" id="SIR-0h-28I">
<customView identifier="VLCLibraryWindowChaptersViewIdentifier" id="SIR-0h-28I">
<rect key="frame" x="0.0" y="0.0" width="835" height="246"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="23094" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="23094"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="VLCLibraryWindowTitlesSidebarViewController">
<connections>
<outlet property="tableView" destination="5mv-Qc-JwM" id="C8u-Vw-BUa"/>
<outlet property="titleSeparator" destination="zf4-pf-0V2" id="MJk-Fh-4O3"/>
<outlet property="view" destination="SIR-0h-28I" id="yx0-b1-Be5"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView identifier="VLCLibraryWindowTitlesViewIdentifier" id="SIR-0h-28I">
<rect key="frame" x="0.0" y="0.0" width="835" height="246"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<box verticalHuggingPriority="751" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="zf4-pf-0V2">
<rect key="frame" x="20" y="243" width="795" height="5"/>
</box>
<scrollView borderType="none" autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4vZ-4x-fwW">
<rect key="frame" x="0.0" y="0.0" width="835" height="245"/>
<clipView key="contentView" drawsBackground="NO" copiesOnScroll="NO" id="H6H-Cp-iPh">
<rect key="frame" x="0.0" y="0.0" width="835" height="245"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" typeSelect="NO" rowSizeStyle="automatic" viewBased="YES" id="5mv-Qc-JwM" customClass="VLCPlaylistTableView">
<rect key="frame" x="0.0" y="0.0" width="835" height="245"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="VLCLibraryWindowTitlesTableViewNameColumnIdentifier" editable="NO" width="736" minWidth="100" maxWidth="1000" id="9yW-DI-c08">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Title">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="JOU-jI-2dC">
<font key="font" metaFont="message"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView identifier="VLCLibraryWindowTitlesTableViewNameCellIdentifier" id="ZTp-fs-5fE">
<rect key="frame" x="11" y="1" width="741" height="16"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField focusRingType="none" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Wdd-df-zUi">
<rect key="frame" x="0.0" y="0.0" width="96" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="deP-dG-o27">
<font key="font" metaFont="message"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<connections>
<outlet property="textField" destination="Wdd-df-zUi" id="61g-Ze-nvR"/>
</connections>
</tableCellView>
</prototypeCellViews>
</tableColumn>
<tableColumn identifier="VLCLibraryWindowTitlesTableViewLengthColumnIdentifier" editable="NO" width="64" minWidth="64" maxWidth="100" id="KEN-Nu-Iyj">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Length">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="rLm-NE-gfo">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<prototypeCellViews>
<tableCellView identifier="VLCLibraryWindowTitlesTableViewTimeCellIdentifier" id="frg-DF-b49">
<rect key="frame" x="755" y="1" width="68" height="17"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kUX-VS-xeX">
<rect key="frame" x="0.0" y="1" width="68" height="16"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="O2P-TI-H9Y">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<connections>
<outlet property="textField" destination="kUX-VS-xeX" id="eEl-G2-cu4"/>
</connections>
</tableCellView>
</prototypeCellViews>
</tableColumn>
</tableColumns>
<connections>
<outlet property="delegate" destination="-2" id="n2S-Eb-GVz"/>
</connections>
</tableView>
</subviews>
<nil key="backgroundColor"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="L1S-02-OQF">
<rect key="frame" x="-100" y="-100" width="0.0" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="IJr-bf-Dsz">
<rect key="frame" x="494" y="0.0" width="16" height="27"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="zf4-pf-0V2" secondAttribute="trailing" constant="20" id="0Sl-8y-RFJ"/>
<constraint firstItem="zf4-pf-0V2" firstAttribute="leading" secondItem="SIR-0h-28I" secondAttribute="leading" constant="20" id="Ekv-lb-XRR"/>
<constraint firstItem="4vZ-4x-fwW" firstAttribute="top" secondItem="zf4-pf-0V2" secondAttribute="bottom" id="Q2S-Bl-E4g"/>
<constraint firstAttribute="trailing" secondItem="4vZ-4x-fwW" secondAttribute="trailing" id="Vo4-sT-MAu"/>
<constraint firstAttribute="bottom" secondItem="4vZ-4x-fwW" secondAttribute="bottom" id="aRK-vR-wkV"/>
<constraint firstItem="zf4-pf-0V2" firstAttribute="top" secondItem="SIR-0h-28I" secondAttribute="top" id="fUf-47-MSy"/>
<constraint firstItem="4vZ-4x-fwW" firstAttribute="leading" secondItem="SIR-0h-28I" secondAttribute="leading" id="ran-Af-QyV"/>
</constraints>
<point key="canvasLocation" x="-312.5" y="45"/>
</customView>
</objects>
</document>
......@@ -26,6 +26,7 @@
@class VLCLibraryWindow;
@class VLCLibraryWindowChaptersSidebarViewController;
@class VLCLibraryWindowPlaylistSidebarViewController;
@class VLCLibraryWindowTitlesSidebarViewController;
NS_ASSUME_NONNULL_BEGIN
......@@ -51,6 +52,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (readonly) VLCLibraryWindowPlaylistSidebarViewController *playlistSidebarViewController;
@property (readonly) VLCLibraryWindowChaptersSidebarViewController *chaptersSidebarViewController;
@property (readonly) VLCLibraryWindowTitlesSidebarViewController *titlesSidebarViewController;
- (instancetype)initWithLibraryWindow:(VLCLibraryWindow *)libraryWindow;
......
......@@ -33,15 +33,13 @@
#import "library/VLCLibraryWindowChaptersSidebarViewController.h"
#import "library/VLCLibraryWindowPlaylistSidebarViewController.h"
#import "library/VLCLibraryWindowSidebarChildViewController.h"
#import "library/VLCLibraryWindowTitlesSidebarViewController.h"
#import "playlist/VLCPlayerController.h"
#import "playlist/VLCPlaylistController.h"
#include "views/VLCRoundedCornerTextField.h"
const NSInteger VLCLibraryWindowSidebarViewPlaylistSegment = 0;
const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
@interface VLCLibraryWindowSidebarRootViewController ()
@property (readwrite) NSViewController<VLCLibraryWindowSidebarChildViewController> *currentChildVc;
......@@ -64,7 +62,6 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
[super viewDidLoad];
[self setupPlaylistTitle];
[self setupCounterLabel];
[self setupViewSelector];
self.mainVideoModeEnabled = NO;
......@@ -72,9 +69,16 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
[[VLCLibraryWindowPlaylistSidebarViewController alloc] initWithLibraryWindow:self.libraryWindow];
_chaptersSidebarViewController =
[[VLCLibraryWindowChaptersSidebarViewController alloc] initWithLibraryWindow:self.libraryWindow];
_titlesSidebarViewController =
[[VLCLibraryWindowTitlesSidebarViewController alloc] initWithLibraryWindow:self.libraryWindow];
self.targetView.translatesAutoresizingMaskIntoConstraints = NO;
if (@available(macOS 10.13, *)) {
self.viewSelector.segmentDistribution = NSSegmentDistributionFillEqually;
}
[self setupViewSelectorSegments];
[self updateViewSelectorState];
[self viewSelectorAction:self.viewSelector];
......@@ -90,7 +94,6 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
_playlistHeaderLabel = [[NSTextField alloc] init];
self.playlistHeaderLabel.translatesAutoresizingMaskIntoConstraints = NO;
self.playlistHeaderLabel.font = NSFont.VLClibrarySectionHeaderFont;
self.playlistHeaderLabel.stringValue = _NS("Playlist");
self.playlistHeaderLabel.editable = NO;
self.playlistHeaderLabel.bezeled = NO;
self.playlistHeaderLabel.drawsBackground = NO;
......@@ -109,14 +112,24 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
]];
}
- (void)setupViewSelector
- (void)setupViewSelectorSegments
{
self.viewSelector.segmentCount = 2;
[self.viewSelector setLabel:_NS("Playlist")
forSegment:VLCLibraryWindowSidebarViewPlaylistSegment];
[self.viewSelector setLabel:_NS("Chapters")
forSegment:VLCLibraryWindowSidebarViewChaptersSegment];
self.viewSelector.selectedSegment = VLCLibraryWindowSidebarViewPlaylistSegment;
self.viewSelector.segmentCount = 1;
[self.viewSelector setLabel:self.playlistSidebarViewController.title
forSegment:self.viewSelector.segmentCount - 1];
VLCPlaylistController * const playlistController = VLCMain.sharedInstance.playlistController;
VLCPlayerController * const playerController = playlistController.playerController;
if (playerController.numberOfTitlesOfCurrentMedia > 0) {
self.viewSelector.segmentCount++;
[self.viewSelector setLabel:self.titlesSidebarViewController.title
forSegment:self.viewSelector.segmentCount - 1];
}
if (playerController.numberOfChaptersForCurrentTitle > 0) {
self.viewSelector.segmentCount++;
[self.viewSelector setLabel:self.chaptersSidebarViewController.title
forSegment:self.viewSelector.segmentCount - 1];
}
}
- (void)setupCounterLabel
......@@ -151,19 +164,20 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
- (void)updateViewSelectorState
{
[self setupViewSelectorSegments];
VLCPlaylistController * const playlistController = VLCMain.sharedInstance.playlistController;
VLCPlayerController * const playerController = playlistController.playerController;
const BOOL titlesEnabled = playerController.numberOfTitlesOfCurrentMedia > 0;
const BOOL chaptersEnabled = playerController.numberOfChaptersForCurrentTitle > 0;
[self.viewSelector setEnabled:chaptersEnabled
forSegment:VLCLibraryWindowSidebarViewChaptersSegment];
self.viewSelector.hidden = !chaptersEnabled;
self.viewSelector.hidden = !chaptersEnabled && !titlesEnabled;
self.topInternalConstraint.active = !self.viewSelector.hidden;
const NSLayoutPriority priority =
chaptersEnabled ? NSLayoutPriorityDefaultLow : NSLayoutPriorityRequired;
const NSLayoutPriority playlistCompressionPriority =
self.viewSelector.hidden ? NSLayoutPriorityDefaultLow : NSLayoutPriorityRequired;
self.playlistHeaderLabel.hidden = chaptersEnabled;
[self.playlistHeaderLabel setContentCompressionResistancePriority:priority
[self.playlistHeaderLabel setContentCompressionResistancePriority:playlistCompressionPriority
forOrientation:NSLayoutConstraintOrientationVertical];
self.playlistHeaderTopConstraint.active = !self.playlistHeaderLabel.hidden;
......@@ -176,9 +190,10 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
counterLabelConstraintToActivate.active = YES;
counterLabelConstraintToDeactivate.active = NO;
if (!chaptersEnabled &&
self.viewSelector.selectedSegment == VLCLibraryWindowSidebarViewChaptersSegment) {
self.viewSelector.selectedSegment = VLCLibraryWindowSidebarViewPlaylistSegment;
NSString * const selectedSegmentLabel = [self.viewSelector labelForSegment:self.viewSelector.selectedSegment];
if ((!chaptersEnabled && [selectedSegmentLabel isEqualToString:self.chaptersSidebarViewController.title]) ||
(!titlesEnabled && [selectedSegmentLabel isEqualToString:self.titlesSidebarViewController.title])) {
self.viewSelector.selectedSegment = 0;
[self viewSelectorAction:self.viewSelector];
}
}
......@@ -187,9 +202,12 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
{
NSParameterAssert(sender == self.viewSelector);
const NSInteger selectedSegment = self.viewSelector.selectedSegment;
if (selectedSegment == VLCLibraryWindowSidebarViewPlaylistSegment) {
NSString * const selectedSegmentLabel = [self.viewSelector labelForSegment:selectedSegment];
if ([selectedSegmentLabel isEqualToString:self.playlistSidebarViewController.title]) {
[self setChildViewController:self.playlistSidebarViewController];
} else if (selectedSegment == VLCLibraryWindowSidebarViewChaptersSegment) {
} else if ([selectedSegmentLabel isEqualToString:self.titlesSidebarViewController.title]) {
[self setChildViewController:self.titlesSidebarViewController];
} else if ([selectedSegmentLabel isEqualToString:self.chaptersSidebarViewController.title]) {
[self setChildViewController:self.chaptersSidebarViewController];
} else {
NSAssert(NO, @"Invalid or unknown segment selected for sidebar!");
......@@ -206,6 +224,8 @@ const NSInteger VLCLibraryWindowSidebarViewChaptersSegment = 1;
viewController.counterLabel = self.counterLabel;
}
self.playlistHeaderLabel.stringValue = viewController.title;
NSView * const view = viewController.view;
self.targetView.subviews = @[view];
view.translatesAutoresizingMaskIntoConstraints = NO;
......
/*****************************************************************************
* VLCLibraryWindowTitlesSidebarViewController.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2024 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#import "library/VLCLibraryWindowAbstractSidebarViewController.h"
NS_ASSUME_NONNULL_BEGIN
@class VLCLibraryWindow;
@interface VLCLibraryWindowTitlesSidebarViewController : VLCLibraryWindowAbstractSidebarViewController<NSTableViewDelegate>
@property (readwrite, weak) IBOutlet NSTableView *tableView;
@property (readonly) NSArrayController *titlesArrayController;
@property (readwrite, nonatomic) NSTextField *counterLabel;
- (instancetype)initWithLibraryWindow:(VLCLibraryWindow *)libraryWindow;
@end
NS_ASSUME_NONNULL_END
/*****************************************************************************
* VLCLibraryWindowTitlesSidebarViewController.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2024 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCLibraryWindowTitlesSidebarViewController.h"
#import "extensions/NSString+Helpers.h"
#import "library/VLCLibraryDataTypes.h"
#import "main/VLCMain.h"
#import "playlist/VLCPlayerController.h"
#import "playlist/VLCPlayerTitle.h"
#import "playlist/VLCPlaylistController.h"
@interface VLCLibraryWindowTitlesSidebarViewController ()
@property (readwrite) NSUInteger internalItemCount;
@end
@implementation VLCLibraryWindowTitlesSidebarViewController
@synthesize counterLabel = _counterLabel;
- (instancetype)initWithLibraryWindow:(VLCLibraryWindow *)libraryWindow
{
return [super initWithLibraryWindow:libraryWindow
nibName:@"VLCLibraryWindowTitlesView"];
}
- (void)viewDidLoad
{
[super viewDidLoad];
_titlesArrayController = [[NSArrayController alloc] init];
[self.tableView deselectAll:self];
[self.tableView bind:NSContentBinding
toObject:self.titlesArrayController
withKeyPath:@"arrangedObjects"
options:nil];
[self.tableView bind:NSSelectionIndexesBinding
toObject:self.titlesArrayController
withKeyPath:@"selectionIndexes"
options:nil];
[self.tableView bind:NSSortDescriptorsBinding
toObject:self.titlesArrayController
withKeyPath:@"sortDescriptors"
options:nil];
[self updateTitleList];
NSNotificationCenter * const notificationCenter = NSNotificationCenter.defaultCenter;
[notificationCenter addObserver:self
selector:@selector(titleListChanged:)
name:VLCPlayerTitleListChanged
object:nil];
}
- (NSString *)title
{
return _NS("Titles");
}
- (BOOL)supportsItemCount
{
return YES;
}
- (void)setCounterLabel:(NSTextField *)counterLabel
{
_counterLabel = counterLabel;
self.counterLabel.stringValue = [NSString stringWithFormat:@"%lu", self.internalItemCount];
}
- (void)titleListChanged:(NSNotification *)notification
{
[self updateTitleList];
}
- (void)updateTitleList
{
VLCPlayerController * const playerController =
VLCMain.sharedInstance.playlistController.playerController;
const size_t titleCount = playerController.numberOfTitlesOfCurrentMedia;
self.internalItemCount = titleCount;
self.titlesArrayController.content = playerController.titlesOfCurrentMedia;
self.counterLabel.stringValue = [NSString stringWithFormat:@"%lu", titleCount];
}
# pragma mark - NSTableView delegation
- (NSView *)tableView:(NSTableView *)tableView
viewForTableColumn:(NSTableColumn *)tableColumn
row:(NSInteger)row
{
if ([tableColumn.identifier isEqualToString:@"VLCLibraryWindowTitlesTableViewNameColumnIdentifier"]) {
NSTableCellView * const cellView =
[tableView makeViewWithIdentifier:@"VLCLibraryWindowTitlesTableViewNameCellIdentifier"
owner:self];
[cellView.textField bind:NSValueBinding
toObject:cellView
withKeyPath:@"objectValue.name"
options:nil];
return cellView;
} else if ([tableColumn.identifier isEqualToString:@"VLCLibraryWindowTitlesTableViewLengthColumnIdentifier"]) {
NSTableCellView * const cellView =
[tableView makeViewWithIdentifier:@"VLCLibraryWindowTitlesTableViewLengthCellIdentifier"
owner:self];
[cellView.textField bind:NSValueBinding
toObject:cellView
withKeyPath:@"objectValue.lengthString"
options:nil];
return cellView;
}
NSAssert(NO, @"Provided cell view for titles table view should be valid!");
return nil;
}
- (void)tableViewSelectionDidChange:(NSNotification *)notification
{
VLCPlayerTitle * const selectedTitle =
self.titlesArrayController.selectedObjects.firstObject;
if (selectedTitle == nil) {
return;
}
[VLCMain.sharedInstance.playlistController.playerController setSelectedTitleIndex:selectedTitle.index];
}
@end
......@@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
@class VLCInputStats;
@class VLCTrackMetaData;
@class VLCPlayerTitle;
@class VLCProgramMetaData;
@class VLCInputItem;
......@@ -529,6 +530,8 @@ extern const CGFloat VLCVolumeDefault;
*/
@property (readonly) size_t numberOfTitlesOfCurrentMedia;
@property (readonly) NSArray<VLCPlayerTitle *> *titlesOfCurrentMedia;
/**
* get a vlc_player_title by the index
* @note listen to VLCPlayerTitleListChanged in case the list changes so previous indexes will no longer be valid anymore
......
......@@ -27,11 +27,16 @@
#import <vlc_url.h>
#import "extensions/NSString+Helpers.h"
#import "library/VLCInputItem.h"
#import "main/VLCMain.h"
#import "os-integration/VLCRemoteControlService.h"
#import "os-integration/iTunes.h"
#import "os-integration/Spotify.h"
#import "library/VLCInputItem.h"
#import "playlist/VLCPlayerTitle.h"
#import "windows/video/VLCVoutView.h"
#import "windows/video/VLCMainVideoViewController.h"
......@@ -1155,6 +1160,18 @@ static int BossCallback(vlc_object_t *p_this,
return vlc_player_title_list_GetCount(_currentTitleList);
}
- (NSArray<VLCPlayerTitle *> *)titlesOfCurrentMedia
{
const size_t count = [self numberOfTitlesOfCurrentMedia];
NSMutableArray<VLCPlayerTitle *> * const titles = NSMutableArray.array;
for (size_t i = 0; i < count; i++) {
const struct vlc_player_title * const p_title = [self titleAtIndexForCurrentMedia:i];
VLCPlayerTitle * const title = [[VLCPlayerTitle alloc] initWithTitle:p_title atIndex:i];
[titles addObject:title];
}
return titles.copy;
}
- (void)selectedChapterChanged:(size_t)chapterIndex
{
_selectedChapterIndex = chapterIndex;
......
/*****************************************************************************
* VLCPlayerTitle.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2024 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Foundation/Foundation.h>
#include <vlc_player.h>
@class VLCPlayerChapter;
NS_ASSUME_NONNULL_BEGIN
@interface VLCPlayerTitle : NSObject
@property (readonly) size_t index;
@property (readonly) NSString *name;
@property (readonly) vlc_tick_t length;
@property (readonly) NSString *lengthString;
@property (readonly) NSUInteger flags;
@property (readonly) NSUInteger chapterCount;
@property (readonly) NSArray<VLCPlayerChapter *> *chapters;
- (instancetype)initWithTitle:(const struct vlc_player_title *)p_title atIndex:(size_t)index;
@end
NS_ASSUME_NONNULL_END
/*****************************************************************************
* VLCPlayerTitle.m: MacOS X interface module
*****************************************************************************
* Copyright (C) 2024 VLC authors and VideoLAN
*
* Authors: Claudio Cambra <developer@claudiocambra.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import "VLCPlayerTitle.h"
#import "extensions/NSString+Helpers.h"
#import "playlist/VLCPlayerChapter.h"
@implementation VLCPlayerTitle
- (instancetype)initWithTitle:(const struct vlc_player_title *)p_title atIndex:(size_t)index
{
self = [super init];
if (self) {
_index = index;
_name = toNSStr(p_title->name);
_length = p_title->length;
_lengthString = [NSString stringWithTimeFromTicks:_length];
_flags = p_title->flags;
_chapterCount = p_title->chapter_count;
NSMutableArray * const chapters = [NSMutableArray arrayWithCapacity:self.chapterCount];
for (int i = 0; i < self.chapterCount; i++) {
VLCPlayerChapter * const chapter =
[[VLCPlayerChapter alloc] initWithChapter:&p_title->chapters[i]];
[chapters addObject:chapter];
}
_chapters = chapters.copy;
}
return self;
}
@end